32
Assignment of JAVA Email id : [email protected] BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38

Assignment of JAVA

  • Upload
    trista

  • View
    37

  • Download
    1

Embed Size (px)

DESCRIPTION

Assignment of JAVA. Email id : [email protected] BSSE-F10-M-10-JAVA1. Lecture 5. Technologies of J2EE By Mr. Muhammad Shehzad. Review. Traditional enterprise application providers have changed over from 2-tier, client-server application models to three-tier application models. - PowerPoint PPT Presentation

Citation preview

Page 1: Assignment of JAVA

Assignment of JAVA Email id : [email protected] BSSE-F10-M-10-JAVA1

Overview of J2EE/Session 2/Slide 1 of 38

Page 2: Assignment of JAVA

Lecture 5

Technologies of J2EEBy Mr. Muhammad Shehzad

Page 3: Assignment of JAVA

Overview of J2EE/Session 2/Slide 3 of 38

Review Traditional enterprise application providers have changed

over from 2-tier, client-server application models to three-tier application models.

The rapid development of this new model was fuelled by the introduction of various middleware services.

A developer is usually faced with a range of problems while developing an enterprise-wide application.

The different problem domains include:• Programming productivity• Response to demand• Integration with existing systems• Freedom to choose• Maintaining security

The mission of J2EE is to provide a platform-independent, portable, multi-user, secure and standard enterprise-class platform for server-side deployments written in the Java language.

Page 4: Assignment of JAVA

Overview of J2EE/Session 2/Slide 4 of 38

Review Contd… The J2EE specifications include those to:

• Design the enterprise application• Distribute Roles to people involved in developing

the software (Project/Product) i.e. J2EE specifies the rules of engagement that people must agree on when writing enterprise software

• Bundle the files to the clientProgramming productivity

• Standardize the technologies that could be used in J2EE

• Standardize the interaction between the different technologies

Page 5: Assignment of JAVA

Overview of J2EE/Session 2/Slide 5 of 38

Review Contd… The various J2EE components include:

• Application components• Containers• Resource manager drivers• Databases

The J2EE platform communicates with the outside world in different ways. These ways, known as contracts, are well defined, and separated into:

• APIs• Network protocols• Deployment descriptors

One of the most important concepts in J2EE is a platform role. The J2EE standard provides separation between different roles, so that different players in the market can specialize in their role. These roles include:

• J2EE Product Provider• Application Component Provider

Page 6: Assignment of JAVA

Overview of J2EE/Session 2/Slide 6 of 38

Review Contd… One of the most important concepts in J2EE is a platform role.

The J2EE standard provides separation between different roles, so that different players in the market can specialize in their role. These roles include:

• J2EE Product Provider• Application Component Provider• Application Assembler• Deployer• System Administrator• Tool Provider

The J2EE Platform provides several benefits such as:• Simplified architecture and development• Integrating existing enterprise information systems• Scaling• Security

Page 7: Assignment of JAVA

Overview of J2EE/Session 2/Slide 7 of 38

The Objectives… Describe the various technologies

involved in J2EE Explain the component technologies Discuss the service technologies Describe the communication

technologies

Page 8: Assignment of JAVA

Overview of J2EE/Session 2/Slide 8 of 38

J2EE Technologies categories

Java Applets

and Applications

HTML

XML

Client-side Technology

EJBServlets

JSP

Component Technologies

Service Technologies

JDBCJNDI

Java Transaction

API

CommunicationTechnologies

Internet

Protocols

RMIJMS

JavaMail

Page 9: Assignment of JAVA

Overview of J2EE/Session 2/Slide 9 of 38

Page 10: Assignment of JAVA

Overview of J2EE/Session 2/Slide 10 of 38

Component Technologies

Servlets JSPEJBJavaBeans

Page 11: Assignment of JAVA

Overview of J2EE/Session 2/Slide 11 of 38

Servlets

Server-side programs No interface Form basic building blocks of

web applications Provide the means to extend

and enhance web servers Can be used to generate

dynamic content

Server

Client

Servlet

Applet

Page 12: Assignment of JAVA

Overview of J2EE/Session 2/Slide 12 of 38

JSP (Java Server Pages) Extension of servlet

technology Created to support authoring

of HTML and XML pages Easier than servlets to

combine static data with dynamic content

More suited for separating application logic from presentation logic

Server

ClientJSP

WebServer Servlet invoked

JSP Compiled by web server

Result Returned

Page 13: Assignment of JAVA

Overview of J2EE/Session 2/Slide 13 of 38

Enterprise JavaBeans Used to develop

business logic Allow separation of

app logic from system level services

To use services provided by J2EE, business components are implemented by EJB components/Enterprise beans

Server

Middle Tier

Client

---------------

---------------

System level services

Applicationlogic

Page 14: Assignment of JAVA

Overview of J2EE/Session 2/Slide 14 of 38

Enterprise BeansSession Beans Entity Beans

Used exclusively by clients that created them

Stateful Stateless

Client

Does the tasks

Bean destroyed

Exists as long as session exists

Client

Does the tasks

Bean exists

Persists only as long as request is being processed

Data

ClientClient

Client

Bean

• Wrapper for data easing access to

data

• Instance of bean can be shared by multiple

clients

Page 15: Assignment of JAVA

Overview of J2EE/Session 2/Slide 15 of 38

Service Technologies

Generally, containers take care of required J2EE services for components

Developer focuses on business logic

Sometimes services may need to be explicitly called

Developer

Components

Develops

SERVICES

Page 16: Assignment of JAVA

Overview of J2EE/Session 2/Slide 16 of 38

Java Transaction API & Service

TransactionManager

Java Transaction API

ResourceManager

ApplicationServer

TransactionalApplications

Components of Distributed Transaction System

Java Transaction Service specifies the implementation of the Transaction ManagerMost important component in a

transaction processing environmentCreates transactions requested by components, and performs 2-phase commit recovery protocol with Resource Managers

Page 17: Assignment of JAVA

Overview of J2EE/Session 2/Slide 17 of 38

Transactions

Group of operations performed on data

Records

Database

TRANSACTION

-----------------------------

tomic

onsistentsolated

urable

Page 18: Assignment of JAVA

Overview of J2EE/Session 2/Slide 18 of 38

Request sent to Transaction Manager to initiate transaction

Transaction Manager starts transaction & associates it with thread that initiated the process

Transaction Manager creates transactional context -which is shared by all relevant components & threads

Thread issues commit or rollback request

Transact

ion

Begins

Transact

ion

Ends

Page 19: Assignment of JAVA

Overview of J2EE/Session 2/Slide 19 of 38

Component

Service

Communication Technologies

Communication Technologies

Page 20: Assignment of JAVA

Overview of J2EE/Session 2/Slide 20 of 38

Internet Protocols

Client

ServerSendsrequest

Resultssent

Request processed

Web-based, distributed, enterprise applications scenario

Page 21: Assignment of JAVA

Overview of J2EE/Session 2/Slide 21 of 38

HTTP Set of rules for exchanging files on the

World Wide Web

Page 22: Assignment of JAVA

Overview of J2EE/Session 2/Slide 22 of 38

Internet

TCP/IP

TCP breaks up data into packets

TCP assembles packets after checking for errors, missed packets etc.

IP picks up packets, and ensures that they reach destination.TCP tracks the packets

Page 23: Assignment of JAVA

Overview of J2EE/Session 2/Slide 23 of 38

SSL

Data

Encrypted Data

SSL

Encrypted data transmitted

Page 24: Assignment of JAVA

Overview of J2EE/Session 2/Slide 24 of 38

Java Mail

JavaMailJavaMail

Used to exchange messages between users Supports SMTP, POP, IMAP4 Slower than JMS

Page 25: Assignment of JAVA

Overview of J2EE/Session 2/Slide 25 of 38

XML

Internet

XML

XML

For distributing structured information over the Internet

Data interchange format in web- based applications--

Page 26: Assignment of JAVA

Overview of J2EE/Session 2/Slide 26 of 38

The Power of XML

---------------------

XML

Appropriate presentationstyle applied

Same data can be presented in a variety of ways, to a variety of devices

SQL ServerDatabase

OracleDatabase

XML XML

Changes are updated to2 different databases

Page 27: Assignment of JAVA

Overview of J2EE/Session 2/Slide 27 of 38

HTML XML

------------

Fixed predefined tags Tags defined by developer------------Handles content &

presentation

Browser interprets HTML code

CSSCan be optionally used to take care of presentation

Handles ONLY content XSL/CSS

Transforms XML by applying styles to it

Page 28: Assignment of JAVA

Overview of J2EE/Session 2/Slide 28 of 38

J2EE Technologies

Client-SideComponent

TechnologiesService

Technologies

Commun

icatio

n

Techno

logies

ServletsJSP

JavaBeansEJB

Session

Beans Entity

Beans

JDBC

Java Transaction

API & Servi

ceJNDI

Internet

ProtocolsOther

Protocols

HTTPTCP/IP SSL

RMI JMSJavaMail

Page 29: Assignment of JAVA

Overview of J2EE/Session 2/Slide 29 of 38

Summary The J2EE technologies can be broadly

classified into four different categories: Client-side technologies Component technologies Service technologies Communication technologies

Component technologies include: Servlets Java Server Pages Enterprise JavaBeans

Session Beans Entity Beans

Page 30: Assignment of JAVA

Overview of J2EE/Session 2/Slide 30 of 38

Summary Service Technologies include:

Java Database Connectivity Java Transaction API and Service Java Naming and Directory Interface

Transaction - A transaction is a group of operations that are carried out as a single unit on records stored in a database. The group must have a set of characteristics in order to be considered as transactional.

ACID properties include Atomic Consistent Isolated Durable

Page 31: Assignment of JAVA

Overview of J2EE/Session 2/Slide 31 of 38

Summary Contd... The Java Naming and Directory Interface, JNDI

in short, is a naming service. A naming service associates a name with an

object, so that clients can locate the object using the specified name.

A directory service on the other hand, allows attributes as well as names to be associated with objects.

Internet Protocols include: HTTP TCP/IP SSL

Page 32: Assignment of JAVA

Overview of J2EE/Session 2/Slide 32 of 38

Summary Contd... Remote Object Protocols include:

RMI and RMI-IIOP Java IDL JMS JavaMail

XML or Extensible Markup Language is the most popular tool to distribute structured information over the Internet.

XML is used for structured information management.

XML can also be used to create customized views of data .

XML documents come in two flavors – well formed and valid.

J2EE deployment descriptors are written in XML based on predefined DTDs