1.2 Understand Java EE Platform
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.
Various technologies in Java EE
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.
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.
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.
Java ME
The API is a subset of the Java SE API, along with special class libraries useful for small device application development.
Provides an API and a small-footprint virtual machine for running Java programming language applications on small devices, like mobile phones.
Java Virtual Machine (VM)
It is platform-independence, power, stability, ease-of-development, and security.
Can run on any compatible system with all the advantages of the Java programming language
Java Application
Scientific Applications
Enterprise Applications
Web Servers and Application Servers
Desktop GUI Applications
Embedded System
Mobile Application
Web Application
Java Enterprise Platform
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.
Business Logic Layer
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.
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.
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.
Presentation Logic
3 Components
Static Content
Images and HTML
Uniform appearance across different browsers--Efficient HTML loading across slow modem connections
JSP
Handle most application display tasks--work in conjunction with servlets to define the application’s presentation screens and page navigation
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
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.
Java SE
It consists of a virtual machine, development tools, deployment technologies, and other class libraries and toolkits commonly used in Java technology applications.
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.
Provides the core functionality of the Java programming language.
Java EE (Enterprise Edition) Platform
Help developers create large scale, multi-tiered, scalable, reliable and secure network applications.
Provides an API and runtime environment for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications.
Improves application portability, and increases developer productivity.
Using the Java Community Process, with contributions from industry experts, commercial and open source organizations, Java User Groups, and countless individuals.
It is the standard in community-driven enterprise software.