Enterprise Java TYIT Sem 5 Unit 1 Chapter 1 and 2 PPT

dcruzsophia24 54 views 33 slides Jul 21, 2024
Slide 1
Slide 1 of 33
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33

About This Presentation

This ppt consists of Chapter 1 and 2 of Unit 1 for Enterprise Java from BSc. IT Third Year Sem 5 Mumbai University


Slide Content

Understanding Java EE Ms. Sophia Dcruz Enterprise Java USIT506

What is an Enterprise Application ? EA is a business application. In corporate environment, applications are complex, scalable, distributed, component-based and mission centric. They may be deployed on a variety of platforms across corporate networks, intranets or the Internet. Challenges Of Enterprise Application Development: Programming Productivity Response to Demand Integration with Existing System Freedom to Choose Maintaining Security

EA… Architecture of an EA: A distributed, multi-tiered application model. Application logic is divided into components. (Different components on different systems at different locations) EA divided into following tiers: Client Tier Services: Runs on c lient machine Web Tier Services: Runs on the server Business Tier Services: Runs on the server Enterprise Information System[EIS]: Runs on EIS server

What is Java Enterprise Edition ? Java EE is a set of coordinated technologies Enables developing, deploying and managing multi-tier server centric EA. Advantages: Powerful set of APIs Reduced Development T ime Reduced Application Complexity Improved Application Performance Java EE is also influenced by the internet Write Once, Run Anywhere (WORA) philosophy

Java EE … Java EE provides a collection of: Standardized components that help creating commercial application . Standard interface that define how various application modules interconnect . Standard services that define how different software modules communicate.

Java EE Technologies Web Application Technologies (Java Servlet, JSP, JSTL, JSF,Facelets ) Enterprise Application Technologies (EJB, JPA, JTA, JMS, Java EE Connector) Web Services Technologies (SOAP and RESTful, JAXR) Security Technologies (JACC, JASPIC)

Web Application Technologies Java Servlet: Extends the functionality of a web server. Receive a request, dynamically generate response, send response containing HTML/XML document . JavaServer Pages (JSP ): Helps to generate dynamic content for a web client. Contains two types of text: Static Data, JSP elements JavaServer Pages Standard Tag Library (JSTL ) Encapsulates core functionality of JSP Allows creating standard set of tags Has iterator and conditional tags for handling control flow Tags for manipulating XML documents Tags for accessing databases using SQL

Web App Technologies… 4. JavaServer Faces (JSF ) User interface for building web application 5. Facelets Page declaration language developed for use with JSF Built specifically f or JSF

Enterprise Application Technologies Enterprise JavaBeans (EJB) Has methods to implement modules of business logic. They are scalable, transactional, secure and are building blocks Java Persistence API (JPA) API for Object-Relational Mapping (ORM) Helps bridge the gap between object oriented model and a relational database. JPA consists of: The Java Persistence API The query language Object/relation mapping meta data

Enterprise Application Technologies… 3. Java Transaction API (JTA ) Standard interface for demarcating transactions. Provides command over commit and rollbacks. 4. Java Message Service (JMS ) Messaging standard that allows Java EE application components to create, send, receive and read messages. Enables loosely coupled, reliable and asynchronous communication. 5. Java EE Connector Architecture Helps create resource adapters that support access to EIS can be plugged into any Java EE product. 6. Java Mail A service provider interface that allows application components to send emails.

Web Services Technologies SOAP and RESTful Java API for RESTful Web Services (JAX-RS): Web services built according to REST architectural style. Java API for XML-Based Web Services (JAX-WS): Supports web services using the SOAP/ HTTP protocol. Java API for XML Registries (JAXR) Accessing business and general-purpose registries over the Web.

Security Technologies JACC Java Authorization Contract for Containers (JACC) defines a contract between a Java EE application server and an authorization policy provider. Enables to authenticate and enforce access controls upon users. JASPIC Java Authentication Service Provider Interface for Containers defines a S ervice P rovider Interface by which authentication providers implement message authentication mechanisms.

Java EE Evolution

GlassFish Server 4.0 Built using an open source license. GlassFish Server 4.0 provides the following: A lightweight and extensible core based on OSGi Alliance standards A web container An easy-to-use Administration Console for configuration and management Update Tool connectivity for updates and add-on components Support for high availability clustering and load balancing

GlassFish Server … Administration The main responsibilities are to establish a secure GlassFish Server environment and to oversee the services, resources and users that participate in that environment. The key tasks include configuring resources and services managing GlassFish Server at runtime fixing problems that are associated with the server installing software, integrating add-on components deploying applications.

GlassFish Server … Developers: Offers a lightweight runtime that starts in seconds and enables rapid iterative development with Active Redeploy that saves session state when an application is redeployed. IT Operations: For IT Operations, GlassFish Server offers a feature-rich web console for manual operation and a feature-equivalent command line utility for automated environment .

Features of GlassFish Server… Java API for JSON Processing 1.0 Java API for WebSockets 1.0 Java Batch 1.0 Concurrency Utilities for Java EE 1.0 Java Message Service [JMS] 2.0 Java API for RESTful Web Services [JAX-RS] 2.0 Enterprise Java Beans [EJB] 3.2 Contexts and Dependency Injection for Java EE [CDI] 1.1 Java Persistence API [JPA] 2.1 JavaServer Faces [JSF] 2.2 Java Servlet 3.1 Bean Validation [BV] 1.1 Expression Language [EL] 3.0 Interceptors 1.2 Java Transaction API [JTA] 1.2 JavaServer Pages [JSP] 2.3 JavaMail 1.5

Java EE Architecture, Server and Containers

Introduction Applications are developed to support companies in their business operations. They take data as input, process the data based on business rules and provide data or information as output . Based on this fact, all applications have three elements: The User Interface or the presentation element , through which data is taken as input The Application Logic or the business rule element , which helps in implementing the operations to be performed on the data input The Data Storage or the data management element , which manages the storage and retrieval of data These three elements form the core of all application architecture used in Commercial Application Development.

Introduction… As a developer, before deciding on the number of tiers in application architecture, the following factors must be considered: Scalability : The capability of an application to adapt to any new hardware environment Availability : The ability of an application to cater to the increased demands from client Extensibility : The ability of an application to incrementally add features from time to time to improve performance and provide better functionality to the client Maintainability : The ability of an application to respond to bug-fixes with the minimal utilization of resources in terms of people, time and technology Security : The ability of an application to maintain the integrity of data Performance : The ability of an application to respond to a client request in the minimum time

Types of System Architecture Single Tier Architecture Two Tier Architecture Three Tier Architecture Multi Tier Architecture Enterprise Architecture

Single Tier Architecture The user interface of a Web application i.e. the presentation layer, The middle ware i.e. the business rules ,The data access layer are all contained in one single computer.

Single Tier … Advantages : The simplest and least expensive alternative Less equipment to purchase and maintain Disadvantages : This type of implementation is lower security and the lack of scalability . An architecture is scalable when it can be easily expanded or augmented to meet increasing performance needs Having all of the site's major components and data on a single computer behind the domain firewall leaves the site more vulnerable to malicious attacks Running all of the site's components on a single computer also limits expansion and optimization possibilities If the developer knows that the application will not grow over time, then the developer may decide to use single tier architecture.

Two Tier Architecture In this architecture, an application is divided into two components: Client Implements the user interface Contains business logic Server Used to store and access business data, captured by the user interface run on the Client in a data store at the Server The User Interface is always physically located in the user's desktop The database management services are always physically located on a Server

Advantages : Adds additional security by removing sensitive customer data from the single computer Having the database on a separate computer improves the overall performance of the site Allows optimizing each machine for more specific performance requirements Disadvantages: The increased cost and complexity of the architecture

Three Tier Architecture User Services - Presentation Layer: Provides service such as the Graphical User Interface and other automation tasks that the application has to perform Business Services - Business Layer: Implements business rules. This layer encapsulates the business logic from users such that they need not know how business logic is applied When business is upgraded, only the business layer is affected and must be a upgraded , the rest of the application services can remain untouched Data Services - Data Layer: Provides data availability and integrity. It is responsible for adding , modifying and deleting data from the data store Most expensive but most s calable and secure

The main functions of: The Presentation Layer is network I/O The Business Layer is CPU-intensive The Data Layer is disk I/O intensive

Multi Tier Architecture User Interface Tier: Handles users interaction with the application. Presentation Tier: Provides an interface for the end user to the application data manipulation code spec. Business Tier: Contains business rules, data manipulation and so on.(brain) Infrastructure Services: Provides additional functionalities (messaging, transactional support, etc. ) Integration Tier/ Data Access Tier: Provide access to backend resources Data Tier: Any DBMS, Binary Files, Plain text files, etc.

Enterprise Architecture

Java EE Server Java EE Server is a server application that implements the Java EE platform APls and provides the standard Java EE services. Java EE servers are sometimes called Application Servers because they allow serving application data to clients, much as how Web Servers serve web pages to Web Browsers. Java EE servers host several application component types that correspond to the tiers in a multi-tiered application. The Java EE server provides services to these components in the form of a Container. During the deployment process, installation of Java EE application components takes place in the Java EE Containers on the Java EE Server.

Java EE Containers Containers are like i nterface connecting them with the low-level platform specific functionality. Container is the only way to access the functionality of a component object . The component is first assembled into Java EE Module and deployed into its container. Then only the component can be executed. The following are the services provided by container to a component: Allows configuring a web component or enterprise bean so that only authorized users can access the system resources Allows specifying relationships among methods that make up a single transaction so that all methods in one transaction are treated as a single unit Provides a unified interface to multiple naming and directory services in the enterprise so that application components can access these services Manage low-level communications between clients and enterprise beans .

Container Types Enterprise JavaBeans [EJB] Container: provides local and remote access to EJB, is responsible for spawning the EJB on demand , binding the EJB to appropriate naming service so that other applications can find and use the EJB. Web Container: Hosts web application, responsible for instantiating, initializing and invoking Servlets and supporting the HTTP and HTTPS protocols. Application Client Container: Provides services required for the execution of application client components. Applet Container: Gives a secure environment to applets