1.2 Understand Java EE Platform
Java EE (Enterprise Edition) Platform
It is the standard in community-driven enterprise software.
Using the Java Community Process, with contributions from industry experts, commercial and open source organizations, Java User Groups, and countless individuals.
Improves application portability, and increases developer productivity.
Provides an API and runtime environment for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications.
Help developers create large scale, multi-tiered, scalable, reliable and secure network applications.
Java SE
Provides the core functionality of the Java programming language.
It defines everything from the basic types and objects of the Java programming language to high-level classes that are used for networking, security, database access, graphical user interface (GUI) development, and XML parsing.
It consists of a virtual machine, development tools, deployment technologies, and other class libraries and toolkits commonly used in Java technology applications.
Java Enterprise Platform
Presentation Logic
Known as Client layer--main functionality is to communicate with Business layer--passes the information which is given by the user in terms of keyboard actions, mouse clicks to the Business Layer--Example: When login gmail, we can only see textbox of email and password--In a simple words, it is to view the application.
3 Components
Servlets
Handle the presentation logic--page-to-page navigation dispatchers--provide session management--provide input validation--must be written in Java--call JSPs, EJB components, and JDBC objects
JSP
Handle most application display tasks--work in conjunction with servlets to define the application’s presentation screens and page navigation
Static Content
Images and HTML
Uniform appearance across different browsers--Efficient HTML loading across slow modem connections
Business Logic Layer
3 Components
Session Beans
encapsulates business logic that can be invoked programmatically by a client over local, remote, or web service client views--performs work for its client, shielding it from complexity by executing business tasks inside the server --Example:could calculate taxes for a billing invoice.
Entity Beans
represent persistent objects, such as a database row (JDBC)
--Example: The developer might translate a customer table, invoice table, and order table into corresponding customer, invoice, and order objects.
Message-Driven Beans
persistent objects that are likely to call a full range of JDBC interfaces, much like entity beans--have no local or remote interfaces as do other EJB components, and they differ from entity beans in how they are accessed.
Data Access Logic
The data is stored in this layer. Application layer communicates with Database layer to retrieve the data--It contains methods that connects the database and performs required action--Example: insert, update, delete etc--In a simple words, it is to share and retrieve the data.
JDBC is used to connect to databases, make queries, and return query results, and custom connectors work with the Sun Java System Application Server to enable communication.
Java Application
Web Application
Mobile Application
Embedded System
Desktop GUI Applications
Web Servers and Application Servers
Enterprise Applications
Scientific Applications
Java Virtual Machine (VM)
Can run on any compatible system with all the advantages of the Java programming language
It is platform-independence, power, stability, ease-of-development, and security.
Java ME
Provides an API and a small-footprint virtual machine for running Java programming language applications on small devices, like mobile phones.
The API is a subset of the Java SE API, along with special class libraries useful for small device application development.
Various technologies in Java EE
HTML for Client Side
Language that the browser renders to the web pages that make up a web application’s user interface--When the web server receives an HTTP request from a browser, the server gets the requested HTML file from disk and sends the file back to the browser in the form of an HTTP response--Browser render the HTML document into a web page that the user can view when receives the HTTP response.
Servlets / JSP for server side
Java web applications consist of Java Server Pages and servlets.--A servlets/JSP engines or container, is the software that allows the web server to work with servlets and JSPs--Java EE specification describes how web servers can interact with servlets/JSP engines.
Enterprise Java Beans (EJB)
Server-side component architecture for Java Platform -Enterprise Edition (Java EE)--
EJB technology enables rapid and simplified development of distributed, transactional, secure and portable applications based on Java technology.
Java Applet
Special kind of Java program that a browser enabled with Java technology can download from the internet and run--
It is typically embedded inside a web page and runs in the context of a browser.