Top Banner
Course Name : Developing Applications for the Java EE 6 Platform http://www.bisplearnings.com
30
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BISP JT001 J2EE Introduction Class

Course Name : Developing Applications for the Java EE 6 Platform

http://www.bisplearnings.com

Page 2: BISP JT001 J2EE Introduction Class

In this session, you will learn to:

Describe Java Platform

Describe Enterprise Application

Enterprise Edition 6 (Java EE 6)

Describe Web application technologies

Identify the advantages and disadvantages of each Web

application technology

Agenda

http://www.bisplearnings.com

Page 3: BISP JT001 J2EE Introduction Class

Java Platform

Java platform is the name for a bundle of related programs from Sun that allow for

developing and running programs written in the Java programming language.

Java Card APIs

Java card

http://www.bisplearnings.com

Page 4: BISP JT001 J2EE Introduction Class

Enterprise Application

What is enterprise

application ?

http://www.bisplearnings.com

Page 5: BISP JT001 J2EE Introduction Class

Enterprise Application

Enterprise Application is an application which is :

Large in size

Distributed

Secure

Scalable

Highly available

Accessible through multiple types of clients

Things that makes enterprise application

Presentation logic

Business logic

Data Access logic

System Services

Common types of Enterprise application are

Automated billing systems

Enterprise Resource Planning (ERP)

http://www.bisplearnings.com

Page 6: BISP JT001 J2EE Introduction Class

Java™ EE

Java Enterprise Edition

Is a Open and standard based platform for developing, deploying and

managing n-tier, Web-enabled, server-centric, and component-based

enterprise applications.

Typically they will be server based applications focusing on serving the

needs of lots users at one time.

Is built on the foundation of Java Platform, Standard Edition (Java SE).

http://www.bisplearnings.com

Page 7: BISP JT001 J2EE Introduction Class

Java EE Architecture

http://www.bisplearnings.com

Page 8: BISP JT001 J2EE Introduction Class

Java EE APIs and Technologies

Standard Edition (Java SE)

Java Server Pages™ (JSP™)

Java Server Faces™ (JSF™)

Remote Method Invocation (RMI)

Java Persistence API (JPA)

Java Message Service (JMS) API

Java Naming and Directory Interface™ (JNDI) API

Java Transaction API (JTA)

Enterprise JavaBeans™ (EJB™) components

Java API for XML Web Services (JAX-WS)

Java API for Restful Web Services (JAX-RS)

http://www.bisplearnings.com

Page 9: BISP JT001 J2EE Introduction Class

Web Application Technologies

Some of the commonly used Web application technologies

are:

Common Gateway Interface (CGI)

Java Servlets

Java Server Pages (JSP)

Java Server Faces(JSF)

http://www.bisplearnings.com

Page 10: BISP JT001 J2EE Introduction Class

CGI Programs

CGI is a technology used to build Web applications.

CGI programs are executed in the following way:

1. The client sends a request to the server.

2. The server launches the CGI program in a separate Operating

System (OS) shell.

3. The CGI program processes the data and sends the response

to the client as HTML.

http://www.bisplearnings.com

Page 11: BISP JT001 J2EE Introduction Class

Advantages of CGI Programs

The advantages of CGI programs are:

They can be written in various languages, such as Perl.

They do not crash a server if there are bugs in the program.

They do not cause concurrency conflicts.

They are supported by all service providers.

They can be easily referenced by a Web designer.

http://www.bisplearnings.com

Page 12: BISP JT001 J2EE Introduction Class

Disadvantages of CGI Programs

Disadvantages of CGI programs are:

Response time is high due to the creation of new OS shell for

each request.

They are not scalable due to the limited number of OS shells

that can be created on a server.

Languages used for CGI programs are often platform

dependent.

Most of the programming languages used for CGI are not

object oriented.

There is no separation of business logic and presentation logic.

http://www.bisplearnings.com

Page 13: BISP JT001 J2EE Introduction Class

Disadvantages of CGI Programs

The following figure shows the server load while executing a

CGI program for a single request.

http://www.bisplearnings.com

Page 14: BISP JT001 J2EE Introduction Class

Disadvantages of CGI Programs

The following figure shows the server load while executing a

CGI program for multiple requests.

http://www.bisplearnings.com

Page 15: BISP JT001 J2EE Introduction Class

Java Servlet

A Servlet is a Java program that runs on a server.

A Servlet performs the following tasks:

Processes HTTP requests

Generates dynamic HTTP responses

A servlet is similar to a CGI program, but executes inside a

Web container as a thread.

http://www.bisplearnings.com

Page 16: BISP JT001 J2EE Introduction Class

What is a Web Container?

What is a Web

container?

http://www.bisplearnings.com

Page 17: BISP JT001 J2EE Introduction Class

What is a Web Container ?

A Web container is a process

running in the OS that handles

the execution of Servlets.

http://www.bisplearnings.com

Page 18: BISP JT001 J2EE Introduction Class

Execution of Java Servlets

A servlet executes in the following way:

1. The client sends request to the server.

2. The Web container, running inside the server, receives the

request.

3. The Web container creates a new thread to process the

request.

4. The Web container forwards the request to the servlet.

5. The Web container executes the servlet.

http://www.bisplearnings.com

Page 19: BISP JT001 J2EE Introduction Class

Execution of Java Servlets

The following figure shows the execution process of a

Servlet with a single request.

http://www.bisplearnings.com

Page 20: BISP JT001 J2EE Introduction Class

Execution of Java Servlets

The following figure shows the execution process of a

servlet with multiple requests.

http://www.bisplearnings.com

Page 21: BISP JT001 J2EE Introduction Class

Java Servlets

The advantages of Servlets are:

They are efficient.

They are secure and scalable.

They are platform independent.

The disadvantages of Servlets are:

They do not separate presentation and business logic.

They need to handle concurrency conflicts.

http://www.bisplearnings.com

Page 22: BISP JT001 J2EE Introduction Class

Java Servlets

http://www.bisplearnings.com

Page 23: BISP JT001 J2EE Introduction Class

Demonstration: Java Servlets

Let us see how to develop a

Servlet.

http://www.bisplearnings.com

Page 24: BISP JT001 J2EE Introduction Class

Java Server Pages

What is JSP

technology?

http://www.bisplearnings.com

Page 25: BISP JT001 J2EE Introduction Class

Java Server Pages

JSP is a server-side

programming technology that

is used to generate dynamic

Web pages.

http://www.bisplearnings.com

Page 26: BISP JT001 J2EE Introduction Class

Java Server Pages

• JSP technology facilitates the segregation of the work profiles of a Web designer and a Web developer.

• A Web designer can design and formulate the layout for a Web page by using HTML.

• A Web developer, working independently, can use Java code and other JSP specific tags to code the business logic

http://www.bisplearnings.com

Page 27: BISP JT001 J2EE Introduction Class

JSP™ Technology

Advantages of JSP technology:

It provides high performance and scalability.

It is built on Java technology, and is therefore,

platform independent.

It takes advantage of Java and its Application Programming

Interfaces (APIs).

http://www.bisplearnings.com

Page 28: BISP JT001 J2EE Introduction Class

JSP™ Technology

Disadvantages of JSP technology:

It is difficult to debug.

It needs to handle the concurrency issues.

http://www.bisplearnings.com

Page 29: BISP JT001 J2EE Introduction Class

JSP™ Technology

http://www.bisplearnings.com

Page 30: BISP JT001 J2EE Introduction Class

http://www.bisplearnings.com