Professional Documents
Culture Documents
How To Build An E-Commerce Application Using J2Ee: Carol Mcdonald Code Camp Engineer
How To Build An E-Commerce Application Using J2Ee: Carol Mcdonald Code Camp Engineer
using J2EE
Carol McDonald
Code Camp Engineer
Code Camp Agenda
E-Commerce Apps:
Many Clients,
lots of reading,
less updating,
low contention
Need High performance and scalability for Reading
data
Insurance Intranet App:
Fewer Clients, Low concurrency
High transaction isolation level, Need Higher
Consistency
Reliability of Updates to DB more important than
performance for Reading data
The Relationships between the Elements of
Architecture
J2SE
RMI/IIOP
RMI/IIOP
JDBC
JDBC
JavaMail
JNDI
JavaMail
JNDI
JMS
JTA
JMS
JTA
App Client
Container JAF JAF
App HTTP/
Client HTTPS J2SE
RMI
RMI/IIOP
JDBC
JNDI
JMS
J2SE J2SE
Container provides Runtime environment, J2SE & J2EE APIs, and remote
communication
Layers of Services: The Application Server provides services to
the Container, which in turn provides services to the EJB.
Application Server
Application
Container
Client O
R EJB EJB EJB
B Container Services
Application
Naming Server Services
Transactions Persistence
DB
Layers
Dispatching
Thread
Allocation
Developer
Object Pooling
Security
Transaction
Management
Clustering
Load
Balancing
EJB Container Services
Application Server
Life Cycle
Persistence State
Management
Container
Remote
Transaction Security
Interface
Transaction
manager
Components
Monolithic:
1 binary file Components:
Recompiled & plug-gable Parts.
linked for any Implementation separated from
changes Interface, only Interface published
hides implementation details
Better design, easier updates
Better Flexibility, Extensibility
Architecture and the Cube
n-tier Architecture with J2EE
Container Beans
RDBMS
Java RMI / IIOP
clients
Data Base
network
network
C++, VB..
clients HTTP PeopleSoft
SAP R/3
Legacy
Browser
clients Systems
Tiers
Web App
Server Server
R R
O O
U
T Web U
T
App
E
R Server E
R Server
Web App
Server Server
J2EE Architecture
Sun BluePrints Design Guidelines
Architecture of the sample application
The J2EE Platform
Has a Rich Set of APIs
Firewall
Application
Client Server
Enterprise
Enterprise Information
JavaBean Systems (EIS):
Client
Client Relational-
Enterprise Database,
Web Server Legacy
Client JavaBean
JSP, Servlet, Applications,
HTML, XML ERP Systems
Client
Other Services:
JNDI, JMS,
JavaMail
J2EE J2EE
Specification Reference
Implementation
J2EE
J2EE
J2EE
Compatibility
Test Suite BluePrints
Java Pet StoreDemo
Some Key BluePrints Questions
-Issues Faced by Developers
Browse Catalog
Customer
<<includes>>
<<includes>>
Send Receipt
Shopping Scenario Sequence Diagram
: Customer
browse products
create order
update inventory
Cart
Shopping Cart Module: allows user to save
selected items for the session.
Order
Order Processing Module: performs order
Processing when user buys the items in the
cart.
2) Divide the Application Into Modules
Based on Services
Inventory
Inventory Module: maintains information
on the number of each type of product in
stock.
Control
Control Module: control interactions
between user (browse, add items,
check out) and business objects.
Interrelationship of the modules
browse
User
Catalog
interface
Control
new/existing account
Account
add/remove
items
checkout Cart
Order Mail
Inventory
J2EE Blueprints
Model
Business Event
Get
Data
To Display
View selection
View Controller
User event
JSP Session EJB
JavaBeans And
components Servlet classes
Assignment of Functionality to Tiers
presentation logic
Build Controller in the Web / EJB tier
Servlet for dispatching
objects
Build Model in the EJB tier
Session beans for Business Services:
Services Process
and Rules
Entity beans to maintain model data
#A
Assignment of Functionality to Tiers or
Vertical Layering
Presentation Business Domain Data Access
Control Services Objects Objects
Presentation
Layout
JSP
What are Domain Objects?
Controller Inventory
Shopping
JSP Orders
Java Order
Bean
Mailer
Java
JSP Accounts
Bean Account
We went over:
Advantages of horizontal layers
Advantages of Vertical Tiers
Affect of Layers and Tiers on Capabilities.
the process of architecting the sample
application
the Model View Controller Design Pattern