Chap 2 csc584
Chap 2 csc584
Java EE Patterns
• large-scale
• multi-tiered
• scalable
• reliable
• secure network applications.
The benefits of an enterprise application are helpful, even essential, for individual developers
and small organizations in an increasingly networked world.
The java EE platform is designed to reduce the complexity of enterprise application development
by providing a development model, API, and runtime environment that allows developers to
concentrate on functionality. reudce the cost/ sharing
OVERVIEW OF JAVA EE PLATFORM
Today, java EE offers a rich enterprise software platform and
with over 20 Compliant Java EE Implementations to choose
from.
https://www.oracle.com/my/java/technologies/java-ee-glance.html
WHAT'S NEW IN JAVA EE 8
Java EE 8 continues to improve API and
programming models needed for today's
applications and adds features requested by our
world-wide community.
For example:
• Each time you use an app like Facebook, send an instant message, or check the
weather on your phone, you're using an API
KEYWORD→REST (REPRESENTATIONAL STATE
TRANSFER)
REST API - uses HTTP requests to GET, PUT, POST and DELETE data.
The REST used by browsers can be thought of as the language of the internet.
RESTful APIs are used by such sites as Amazon, Google, LinkedIn and Twitter.
KEYWORD→CDI EVENT (CONTEXTS AND
DEPENDENCY INJECTION)
Is the standard dependency injection
framework of the Jakarta EE platform.
The client tier consists of a client program that makes requests to the
middle tier.
JAVA EE ARCHITECTURE
(SOME EXAMPLES)
2
3
THE CLIENT TIER
The client tier consists of application clients that access a java EE server and that are usually
located on a different machine from the server.
The server processes the requests and returns a response back to the client.
Many different types of applications can be java EE clients, and they are not always, or
even often java applications.
Clients can be a web browser, a standalone application, or other servers, and they run
on a different machine from the java EE server.
THE WEB TIER
The web tier consists of components that handle the interaction between
clients and the business tier.
• database servers,
• enterprise resource planning systems,
• and other legacy data sources,
• Eg: mainframes.
These resources typically are located on a separate machine
than the java EE server, and are accessed by components on the
business tier.
JAVA EE TECHNOLOGIES USED IN THE EIS
TIER
JAVA EE RECENT ARCHITECTURES
MVC - Model-View-Controller.
• It is a design pattern that separates the business logic, presentation logic and data.
• Controller acts as an interface between View and Model.
• Controller intercepts all the incoming requests.
Spring
• Spring is an open source application framework.
• Not dependent on any programming model.
• Spring framework has become very popular among Java programmers.
• Spring framework acts as a replacement or an addition to Java’s own EJB
(Enterprise Java Beans).
ACTIVITY 1 (Individually, Search an information)
Java EE servers host several application component types that correspond to the
tiers in a multi-tiered application.
The java EE server provides services to these components in the form of a container.
ROLE OF APPLICATION SERVERS : JAVA EE SERVERS
Server communications
The client communicates
with the business tier
running on the Java EE
server either directly or,
as in the case of a client
running in a browser, by
going through web
pages or servlets
running in the web tier.
The various elements that can make up the client tier
SOME OF JAVA APPLICATION SERVERS
JAVA EE PATTERNS
Benefits:
1. Provide insight into how to solve
JAVA EE PATTERNS distributed enterprise applications
2. Many are still applicable
Description of communication objects and classes that are customized to solve general
design problem in a particular context
3 java EE components:
• Application clients and applets → run on the client.
• Java servlet, JavaServer Faces, and JavaServer Pagestm (JSPtm) technology
components are web components → run on the server.
• Enterprise JavaBeanstm (EJBtm) components (enterprise beans) are business
components → run on the server.
JAVA EE COMPONENTS
1. Application
clients &
applets
2. Java servlet,
Java Server
Faces & Java
Server Pages
3. EJB
JAVA EE COMPONENTS
-1. THE CONTAINERS-
Java EE server: The runtime portion of a Java EE
product.
Enterprise JavaBeans (EJB) container:
Manages the execution of enterprise beans for
Java EE applications.
Web container: Manages the execution of JSP
page and servlet components for Java EE
applications. Web components and their
container run on the Java EE server.
Application client container: Manages the
execution of application client components.
Application clients and their container run on the
client.
Applet container: Manages the execution of
applets. Consists of a web browser and Java Plug-
in running on the client together.
JAVA EE COMPONENTS CONT. -1. THE CONTAINERS-
Java EE Java EE containers are the interface between the component and the
lower-level functionality provided by the platform to support that
Containers component.
The functionality of the container is defined by the platform, and is
different for each component type.
The server allows the different component types to work together to
provide functionality in an enterprise application.
The Web The web container is the interface between web components and the web
Container server.
A web component can be a servlet, a JavaServer Faces Facelets page,
or a JSP page.
The container manages the component's lifecycle, dispatches requests to
application components, and provides interfaces to context data, such as
information about the current request.
JAVA EE COMPONENTS CONT. -1. THE CONTAINERS-
The Application Client Container
• The application client container is the interface between Java EE application
clients, which are special Java SE applications that use Java EE server
components, and the Java EE server.
The application client container runs on the client machine, and is the gateway
between the client application and the Java EE server components that the
client uses.
Differentiate • GlassFish
the following • JBoss Enterprise Application Platform
JAVA • WildFly
application • Apache Tomcat
• JOnAS
servers