J2EE Intro
J2EE Intro
TM
1
Objectives
• Why J2EE?
• What is J2EE?
• How to use J2EE?
2
Why J2EE?
Client Server
4
Why J2EE?
5
Why J2EE?
6
Why J2EE?
Java Applet-based Web
Client/Server
• Interaction of two-tier architecture
• Client: uses Java Applet for client-side
computation
• Server: provides Applet bytecode
• Fat Client/Thin Server
7
Why J2EE?
Two-tier Client/Server
Architecture
• So, important processing needs to be run on the server
• Then, Java needs to run on the server too to be more useful enterprise
• The server is almost like what CGI-programming does
• Client: data access applying business logic and presentation of data
(computation)
• Server: serves only as service-database server, not application server web
server
Client Server
9
Why J2EE?
Vision of J2EE
• An open standard
• Umbrella for anything Java-related
• For designing, developing, assembling,
and deploying component-based
enterprise applications
• Separation of business logic from
presentation
• Reusability, enhanceability, scalability,
interoperability
10
Why J2EE?
11
Why J2EE?
• Simplifies the complexity of a building n-
tier application
• Standardizes an API between components
and application server container
• J2EE Application Server and Containers
provide the framework services
12
What is J2EE?
• Defines the standard for developing multitier
enterprise applications
• Simplifies enterprise applications by:
– Basing them on standardized, modular components
– Providing a complete set of services to those
components
– Handling many details of application behavior
automatically, without complex programming
13
What is J2EE?
14
J2EE Tiers
• Client Presentation
HTML or Java applets
deployed in Browser
XML documentations
transmitted through HTTP
Java clients running in
Client Java Virtual Machine
(JVM)
• Presentation Logic
Servlets or JavaServer
Pages running in web
server
• Application Logic
Enterprise JavaBeans
running in Server
15
J2EE Components & Services
• Components
- Java Servlets
- JavaServer Pages (JSP)
- Enterprise JavaBeans (EJB)
• Standard services & supporting technologies
- Java database connectivity(JDBC) data access API
- Java Messaging Service (JMS)
(Remote Method Invocations (RMI))
- Extensible Markup Languages(XML)
- JavaIDL (Interface Description Language)
- JavaMail
- Java Security
- CORBA technology
- Design Patterns
16
Advantages of Multi-tiers
• Tiers separate functionality:
– Presentation Logic, Business Logic, Data
Schema
• Easier upgrade since one tier can be
changed without changing the rest
• Lower deployment and maintenance cost
• More flexible (can support changes), more
extensible (can add functionality)
17
18
What is J2EE?
19
What is J2EE?
4-Tier Model
Web Tier
Client Tier
EIS Tier
Business
Tier 20
What is J2EE?
21
Application Server: Key Services
22
GlassFish Server
23
JBoss- Application Server
24
What is J2EE?
J2EE Components
• Java Servlets
25