Académique Documents
Professionnel Documents
Culture Documents
What is Http? - Http is a protocol that runs on top of TCP/IP TCP: It is responsible for making sure that a file sent from one network node to another ends up as a complete file at the destination, even though the file is split into chunks when it is sent IP: It is underlying protocol that routes the chunks (packets) from one host to another on their way to the destination
HTTP is the protocol clients and servers use on the web to communicate
HTTP defines the requests that a client can send to a server Each request contains a URL, which is a string that identifies a Web component or a static object such as an HTML page or image file.
Http Requests
An Http request consists of a request method, a request URL, header fields and a body HTTP 1.1 defines the following methods Get: Retrieves the resource identified by the request URL Head: returns the headers identified by the request URL Post: sends data of unlimited length to the web server Put: Stores a resource under the request URL Delete: removes the resource identified by the request URL Options: returns the Http methods the server supports Trace: returns the header fields sent with the request
Http Responses
An Http response contains a result code, header fields and a body Some commonly used status codes include: 404: Indicates that the requested resource is not available 401: Indicates that the request requires HTTP authentication 500: Indicates that an error occurred inside the HTTP server that prevented it from fulfilling the request 503: Indicates that the HTTP server is temporarily overloaded and unable to handle the request
Workgroup server
High-end server
Micro Edition
Standard Edition
Enterprise Edition
Security domain technologies Persistence technologies Transaction technologies Networking and distributed object technologies Messaging, connector and related technologies
Communication with other enterprise and legacy applications Service location assistance
ebXML
Container Management
Developers
API Layer
Service Layer
Vendor specific
Embedded EJB Container Web Container Application Client Container EJB Container
Database
JavaMail Java Persistence JTA Connectors JMS EJB Container WS Metadata EJB
Web Services
Web Beans JACC JASPIC JAXR JAX-RS JAX-WS JAX-RPC New in Java EE 6 SAAJ Java SE Java Persistence Application Client Container Application Client
JavaMail JSTL JSF Java Persistence JTA Connectors JMS Management WS Metadata Web Services Web Beans JACC JASPIC JAXR JAX-RS JAX-WS JAX-RPC
Web Container
JSP
Servlet
HTTP SSL
HTTP SSL
SAAJ
Database
Java SE
Management
Applet Container
Java SE
Applet
SAAJ
Java SE
Client Tier
Presentation Tier
Business Tier
Integration Tier
The N-tier architectural model: Programmatically separates application functionality across three or more tiers Has tier components and tier infrastructure that is uniquely suited to a particular task Has programmatic interfaces that define the tier boundaries
Client Tier
Presentation Tier
Business Tier
Integration Tier
DBMS SQL
UI Client
UI Client
Views
Model Resource
The introduction of EJB Lite in Java EE 6 allows the use of some EJB technology in web-centric architectures.
DBMS SQL
UI Client
Java EE Profiles
Java EE 6 standardized profiles for application developers that do not need the full Java EE platform but require application portability. Developers can choose between:
The Java EE 6 Web Profile: Similar to Tomcat, when developers are working primarily on web applications The Java EE 6 Full Platform: Complete Java EE 6 application servers
Technically Full Platform is not a profile. The only profile included in the Java EE 6 specification is the web profile. Additional profiles may be added in future releases.
EJB 3.1 Lite is covered in more detail in the lesson titled EJB Component Model.
Web Container
EJB Container
Java EE Server
Web Container
EJB Container
Java EE Server
EIS Resources
POJO
Java EE Patterns
Patterns provide a standard solution for well understood programming problems. The Java EE pattern catalog:
Helps a developer create scalable, robust, high-performance, Java EE technology applications Presupposes the use of the Java programming language and the Java EE technology platform Is, in many places, closely related to the Gang of Four (GoF) patterns
Java EE Patterns
GoF Patterns
Architectural Principles
Design Principles
Session
Entity
DAO
JNDI API
Java EE BluePrints
Developed by the Java software group Provide a set of guidelines and a sample application Used as a reference when designing and developing a Java EE application or Java EE application components Known as the Java BluePrints Solutions Catalog for Java EE
Model 2 architecture:
Servlets handle request processing, interact with the business logic, and collect data for display. JSP components render the data for display.
Model Updates model Notifies changes Retrieves data Sends events View Sends data Controller
Selects view
Updates model
Retrieves data
Controller Servlet
2 1
Controller
4a
BankMgrDelegate class
BankMgr
Controller
Web Tier