Sei sulla pagina 1di 23

INTRODUCTION

TO
J2EE
Java Enterprise Edition

- A. Madhav

(BCA 3-1Semester)

WHAT IS J2EE ?
Java EE is Oracles enterprise Java computing

platform.

Platform provides an API and runtime environment

for developing and running enterprise software.


Java EE extends theJava Platform, Standard

Edition(Java SE/J2SE),providing an API for object


relational mapping, distributed and multi-tier
architectures.

WHAT MAKES A
PLATFORM?

J2EE

is neither a hardware(it can run on any


hardware with apt JVM) , nor a software exactly (J2EEcompatible systems available).
So what sort of a platform is J2EE ?
In the world of software, aplatformis a combination

of hardware and software necessary to run applications.

PLATFORM
REQUIREMENTS
Consistency : Consistency is a basic platform
requirement. Applications depend on platforms to
provide a specific set of well-known services.

Adoption : Adoption provides established platforms


with enormous momentum and market clout.

Openness : Some degree of openness is necessary for


software vendors to develop products for a platform.

Specification : The platform specification defines the


platform, usually in terms of required APIs, policies,
and interfaces.

J2EE BUILDING BLOCKS


Servlets : A servlet is a small Java program that runs
within a Web server. Servlets receive and respond to
requests from Web clients, usually across HTTP.

JSP : With JSP you could write HTML in a JSP file,


and the server would automatically create a servlet from
the page. JSP also allows you to write blocks of Java
code inside the JSP.

Web Frameworks : The shortcomings of plain


servlets and JSP sparked the creation of manyWeb
frameworksthat intended to make Web application
development easier.

A timeline with the release dates of some Web frameworks.


Most of them are Java frameworks, but some other ones are included.

J2EE HISTORY
The

original J2EE specification was developed by Sun


Microsystems.
The

year 2000 has seen J2EE compliancy move out of


realm of marketing and into nine shipping products.
JSR 58 specifies J2EE 1.3 and JSR 151 specifies the
J2EE 1.4 specification.

The Java EE 5 specification was developed under JSR


244 and the final release was made on May 11 2006.

In short, the server side java industry has gone


through a whirl wind of change.

Overview
architecture

of

J2EE

JAVA WEB APPLICATION


SERVERS
Understanding the differences between a web server, a
servlet container and an application server is important
when learning how a Java Web application is presented
to itsend users.
The servlet/application/EJB container terms are a bit
ambiguous, but we will try to come to a workable
definition.
Lets take a look.

1. WEB SERVER
A Web server handles the HTTP protocol. When the
Web server receives an HTTP request, it responds with
an HTTP response.

The

Web server itself does not dynamically generate


responses, it just handles receiving the request and
sending the response.
The

most commonly used Web servers


areApache,Microsoft IISandnginx.

2. WEB CONTAINER
A

Web container (or servlet container) is a program that


provides an environment for the servlets and JSP to run.
The

Web container is responsible for managing the


lifecycle of servlets, mapping a URL to a particular servlet
and ensuring that the URL requester has the correct
access rights.
So a Web container provides a runtime environment for
asubsetof the Java EE specification, usually only the JSP
and Servlet parts.

The most common Web container are TomcatandJetty

3. Application
Server
An application server is a server that provides support for

theentire Java EE specification.


In addition it provides the capabilities of a Web Container as
well as of a Web Server.

J2EE DEPLOYMENT
How do you present a Web application to the
server?
Web applications are packaged in WAR and EAR files.
Web containers (e.g. Tomcat) accept WAR files.
Application servers (e.g. Glassfish) accept WAR files and
EAR files.
A Java EE application is delivered in a Java Archive
(JAR) file, a Web Archive (WAR) file, or an Enterprise
Archive (EAR) file.
A WAR or EAR file is a standard JAR file with a .war or
.ear extension.

1. JAR : JAVA ARCHIVE

JAR is an archive file format typically used to


aggregate many Java class files and associated metadata
and resources into one file to distribute application
software or libraries on the Java platform.
Amanifest

fileis a specific file contained within a JAR


archive. It is used to define information about the JAR.
Application

client modules are packaged as JAR files


with a .jar extension.

2. WAR : Web Application


ARchive
A WAR file is a JAR file used to distribute a Web Module.
The top-level directory of a web module is thedocument rootof the
application.
The structure of a WAR file looks like this:

3. EAR : Enterprise
Archive
When a large Web application is deployed, all its .jar and .war
files are packaged as JAR file with .ear extension and deployed
into an application server.
Deploying EAR files requires an application server such as Glassfish.
Web containers such as Tomcat can notdeploy EAR files, only WAR
files.
EAR file structure :

FUTURE OF JAVA
TECHNOLOGY
When Java was developed initially , even its developers
were not sure in which direction thetechnologywill
grow. And actually Java has taken an unexpected turn
around as a development technology.
Some people say there is no need of separate Core Java,
which is now known as J2SE. J2SE comprise of core
Java components and libraries like core language
library, utilities, SWT, Swing, Networking, Security etc.
Let us examine possible directions where there are
chances Java will grow as development technology.

NEW TRENDS
People

are always in search of implementing J2EE, a


way that it can be used optimally.
Several

new frameworks, practices and design patterns


are developed to make proper utilization of advantages
of J2EE.
Some

of them are discussed here :

Design Patterns :For enterprise applications , it is


very important that they are well designed prior to start
of their development phase because they are large in
scale.

Some

of the design patterns are MVC (Model-ViewController), DAO (Data Access Objects) and many more.

Frameworks :
Some

organizations have developed their own


frameworks over the top of J2EE.
Also

such frameworks implement best J2EE practices


to achieve high performance and other advantages of
J2EE.
Some

popular J2EE frameworks are Struts, Spring etc.

J2EE Best Practices :


Ways to utilize J2EE framework that it can perform at
its best with its all advantages like scalability, remote
access etc.
Such practices are used by many developers and proven
to be useful to achieve such goals in J2EE applications.
and are also known as J2EE best practices.

New Technologies
The Java community which is controlled by Sun keeps
including new features and technologies to J2EE such as
JFS (Java Faces Service), Java.net, Java gaming, Java
AI etc.

Go Mobile
Mobile phone applications are very wide scope area
where Java is being used for its portability and
independence.
Most of mobile phones operate over Java
implementations.
Embedded
Java is gaining more popularity to develop embedded
applications. The reason after such popularity is its
platform independence.
The principle of reusability is gaining more popularity
among embedded applications community and so Java.

SUMMARY
After

examining scope, usage and potential of different


areas of Java technology we can summarize that it has
still long way to go.
Java has got a lot of potential to develop and grow in
many areas.

For

existing areas like desktop applications and


enterprise applications there are chances for Java to
gain better role.
Also it has got to grow in new areas of embedded
applications in future.

SOURCES

http://encyclopedia2.thefreedictionary.com/J2EE

http://www.j2eebrain.com/java-J2ee-j2ee-history.

html

http://pic.dhe.ibm.com/infocenter/wbihelp/v6rx

mx/index.jsp?topic=%2Fcom.ibm.wics_developer.d

oc%2Fdoc%2Faccess_dev_j2ee%2Faccess_dev_j2ee15
.htm

http://www.exforsys.com/tutorials/j2ee/future-of

-java-technology.html

THANKYOU !

Potrebbero piacerti anche