Enabling Web and Software Technologies: Electronic Commerce (WS-02/03) 3-1
Enabling Web and Software Technologies: Electronic Commerce (WS-02/03) 3-1
Business Logic
Tier
Database Tier
Business Processes define the interface to the users: „What can a user
Business Logic do in an ECommerce system (shop, knowledge portal, expert site)?“
Tier They
o use the containers to
Business Logic
Tier
Database Tier
The J2EE architecture follows the three-tier component architecture, i.e., it has a logical
software partitioning into the layers:
o The presentation layer contains components dealing with user interface and user
interaction.
Technologies: Java Server Pages (JSP), Java Servlets and/or Java Applets.
o A business logic layer contains business process and business entity
components that work together to solve business problems.
Technologies: Enterprise JavaBeans.
o A data layer is used by the business logic layer for persistence of entity states and -
optionally - process states. Central to the data layer are one or more databases
that house the persistent states [Roman99].
Technologies: RDBMS (Oracle, MS SQL Server, MySQL, ...)
Electronic Commerce (WS-02/03) 3-7
Mô hình J2EE (2)
DB Driver
Enterprise JavaBeans được triển khai đến một EJB máy chủ (máy chủ ứng dụng), in which they
are running inside an EJB Container that realizes
o Persistence
o Transactions
o Transparent Distribution o
Concurrency Support
o Recovery / Transparent fail-over for entity beans - and optionally for session beans The
components (EJBs) do not have to provide these functionalities.
Further reading:
Java runs on any platform with a Java VM. C# only runs in Windows for the
foreseeable future.
o C# is implicitly tied to the Common Language Runtime (CLR), and is compiled
entirely into native code (just-in-time compiled bytecode is possible).
Java code runs as Java Virtual Machine (VM) bytecodes that are either interpreted
in the VM, compiled to native code or Just-in-time compiled).
[Farley00]
Electronic Commerce (WS-02/03) 3-15
Comparison J2EE / .NET (2)
Runtime & Distribution
IL Common Language Runtime vs. Java Virtual Machine and CORBA IDL and ORB:
o .NET common language runtime allows code in multiple languages to use a
shared set of components, on Windows. Underlies nearly all of .NET framework
(common components, ASP+, etc.).
Java's Virtual Machine spec allows Java bytecodes to run on any platform with a
compliant JVM. In addition, CORBA allows code in multiple languages to use a
shared set of objects, on any platform with an ORB available. However, CORBA is
not nearly as tightly integrated into J2EE framework as COM+ is integrated into
.NET.
[Farley00]
Electronic Commerce (WS-02/03) 3-16
Comparison J2EE / .NET (3)
Distribution & Data Exchange
ADO+ and SOAP-based Web Services vs. JDBC, EJB, JMS and Java XML Libraries
(JAXP)
o ADO+ is built on the premise of XML data interchange (between remote data
objects and layers of multi-tier apps) on top of HTTP (this is called SOAP). .NET's
web services in general assume SOAP messaging models.
o EJB, JDBC, etc. leave the data interchange protocol at the developer's discretion,
and operate on top of either HTTP, RMI/JRMP (Java-specific remote method
invocation protocol) or the Internet InterObject Protocol (IIOP).
Server-Side Web Service Architecture
Active Server Pages+ (ASP+) vs. Java Server Pages (JSP)
o ASP+ uses Visual Basic, C#, and other languages for code snippets. All get
compiled into native code through the common language runtime (as opposed to
being interpreted each time, like ASPs).
o JSPs use Java code (snippets, or JavaBean references), compiled into Java
bytecodes (either on-demand or batch-compiled, depending on the JSP
implementation). [Farley00]
Electronic Commerce (WS-02/03) 3-17
Comparison J2EE / .NET (4)
Graphical User Interface / Web Interface
Win Forms and Web Forms vs. Java Swing:
o Win Forms and Web Forms support rapid application development (RAD) through
the MS Visual Studio Integrated Development Environment (IDE) - no other IDE
support currently available.
o Java lacks similar standardized web components (e.g., based on JSP). Some
proprietary components are available through Java IDEs, etc.
standardized Swing (Java-based GUI) support is available in many Java IDEs and
tools.
[Farley00]
Electronic Commerce (WS-02/03) 3-18
3. Enabling Web and Software Technologies
3.1 Client / Server Architectures and the Internet
Modules (proxy, JSP / Servlet server, distributed authoring and versioning, ...)
o must be purchased separately
o can be integrated easily into the web server
Information to log:
o Request
o Response o Date
and time o Session key
(User) o Requested
resource
There is a standard log file format that can be analyzed with off-the-shelf statistics tools
(commercial & Freeware).
Network
Example: Internet
Host: www.this.com:80/entry.html
Request for
Host: www.that.com:80/entry.html
entry.html
www.this.com www.that.com
entry.html entry.html
Server: 134.28.70.1
Electronic Commerce (WS-02/03) 3-27
Application Service Provider (ASP)
The ECommerce business company may provide additional application executables.
Application Service Provider (ASP) provides everything else.
Network
o Inclusion of multimedia content: Graphics, audio and video clips, server-side includes.
o Statistics: Functionality to retrieve statistical information about shop.
o Basic online product catalogs: Usually hierarchical product categories. Exclude product variants.
o Shopping cart functionality
o Order functionality: Merchant is notified of orders by mail. Order processing done by merchant.
Usually such solutions do not comprise
ISP ISP
Net Net
Easy maintenance,
Lowest Cost suitable for low
volume services
Electronic Commerce (WS-02/03) 3-30
Business Connectivity Options: SP / ASP Solutions
3) Mixed solution
2) Full outsourcing
Corporate Purchased,
Intranet
LAN
Server
Remote
maintenance
SP / ASP SP / ASP
Purchased / Purchased /
Leased Leased,
Server Internet Server
Net Net
Internet
Online- Mailing lists, Chat, Mailing lists, groupware, Mailing lists, inter-
Community Search Engines, workflow systems, organizational workflows.
services knowledge management knowledge management
systems
Data exchange Marketing Employment lists, tender catalogs, pricing lists,
information, document repositories, terms and conditions, product
Product administrative data information, distribution
information information, XML / EDI
LAN
LAN
+ Application independent
+ Ease of maintenance.
by Security (sub)layer in end systems. This is hardware and operation system-
dependent. The security (sub)layer is integrated transparently into the Internet
protocol layer.
+ Cheaper solution +
End-to-end security
NOTE: As VPNs require the management of numerous keys/passwords, there is an
interest to set up a public key infrastructure (PKI), see chapter 5.