Title: Gartner Day
1(No Transcript)
2Workshop Agenda
- Understanding the Application Architecture
- Designing and Implementing the Business Tier with
Enterprise JavaBeans - Designing the Web Tier Using MVC and Struts
- Securing Access to the Application
- Tuning and Debugging J2EE Applications
3Who Are We?
- Person AProduct ManagementOracle Application
Server 10g - Person BProduct Management Oracle JDeveloper
10g
4Understanding the Application Architecture Session
1
Kevin WongSenior Product Manager Oracle
Corporation
5Agenda
- An example application
- J2EE application tiers
- J2EE architecture choices
6An Example Application
- A common problem - FAQ
- A system could reduce effort and produce better
results - More accurate information
- More timely updates
- Base application on requirements from key players
7Application Requirements
- Must be accessible and flexible
- Browser access encourages use
- Data gathering
- Domain expertise is split across different areas
- Areas should sub-divided
- Answers may be applicable across different areas
- Extensible and flexible
- Early requirement to produce reports for
publishing - Future requirements for bulk loading, Web
services
8Use Cases
9Domain Objects
- What are the things we need to work with?
Area a specific problem space
Topic a category of an area
QA the question and answer
10From Requirements to Design
- From the use case
- Page flows for Web interactions
- Interactions with domain model
- From the domain model
- Object model for business objects and tasks
11D E M O N S T R A T I O N
The FAQ Application
12Agenda
- An example application
- J2EE application tiers
- J2EE architecture choices
13Application Layers
- J2EE helps developers build layered applications,
each providing different services.
Presentation
Control
Business Logic
Persistent Objects
14Application Layers Mapped to J2EE Tiers and
Technology
- Analyze how the requirements fall into the layers
and map to technology
J2EE Technology
Application Layer
J2EE Tier
HTML, JSP
Presentation
Web Tier
Servlets
Control
Web Tier
Java Objects, Session Beans
Business Logic
Business Tier
Java Objects, Entity Beans
Persistent Objects
Business Tier
15Mapping to Implementation Technology
- The FAQ Application implementation
Application Layer
J2EE Tier
FAQ Implementation
Page Flow JSP Struts
Session Facade
Business Logic
Business Tier
EJB Entity Beans
Persistent Objects
Business Tier
16Agenda
- An example application
- J2EE application tiers
- J2EE architecture choices
17Web Application / JDBC
- Simplest of architectures
- Combines presentation and business logic in one
tier - Business logic separated into separate classes
Web Container
JSP Servlet UI
Business Logic JDBC
18Web Application / JDBC
- Pros
- Simple to build
- Simple to package and deploy
- Low overhead from container
- Relatively easy to test
- Cons
- Needs discipline to keep UI and logic separate
- No container transaction support
- Must code all database calls
Web Container
JSP Servlet UI
Business Logic JDBC
19Web Application / Local EJB
- Next generation J2EE architecture
- Presentation logic with JSP and Servlets in Web
container - Separates business logic into EJB tier exposed
via local interfaces
Web EJB Container
JSP Servlet UI
local
Session Bean - Logic Entity Bean - Persistence
20Web Application / Local EJB
- Pros
- Separation of business logic
- Entity beans for persistence
- No serialization or network calls
- Concurrency managed
- Can convert to remote interface and Web service
endpoint if required - Cons
- Uses EJB infrastructure
- Harder to test business logic behind local
interfaces
Web EJB Container
JSP Servlet UI
local
Session Bean - Logic Entity Bean - Persistence
21Web Application / Remote EJB
Web Container
- The theoretical J2EE architecture
- EJB tier exposed via remote interfaces
- EJB tier can run on separate server
JSP Servlet UI
Web Container
remote
EJB Container
Session Bean - Logic Entity Bean - Persistence
22Web Application / Remote EJB
Web Container
- Pros
- Most flexible architecture
- Can separate EJB container to different server
- Multi client enabled
- Can be exposed as Web service endpoint
- Cons
- Slower performance, remote network calls and
serialization - Can be difficult to configure and debug
JSP Servlet UI
Web Container
remote
EJB Container
Session Bean - Logic Entity Bean - Persistence
23Application Architectures
- The architecture choice you make heavily
influences how you build the application - Using EJBs allows you to more easily move between
local and remote architectures - If in doubt, design for flexibility and monitor
performance
24Summary
- Application design should be driven from
requirements - J2EE provides support for layering of application
- J2EE supports a wide variety of deployment
architectures
25Learn Oracle From Oracle
- Instructor led training
- Self-Study
- Online learning
- Oracle Certification
- Oracle iLearning
- Oracle Tutor
oracle.com/education Recommended Class
Oracle9i Build J2EE Applications
26otn.oracle.com
Join Over 3,000,000 Developers!
Free Technical Advice
Free Software Downloads
otn.oracle.com/tech/java
27(No Transcript)