j2ee archi
Post on 10-Apr-2018
240 Views
Preview:
TRANSCRIPT
-
8/8/2019 J2EE Archi
1/30
BY
SUNITA D. RATHOD
-
8/8/2019 J2EE Archi
2/30
J2EE
y Objective:
- simplify development andmaintenance of enterprise applications( B2B, B2C ).
-
8/8/2019 J2EE Archi
3/30
Enterprise applications goals
To support or advance the goals of theorganization.
To be able to compete effectively.
To streamline operations.
To save or make money.
-
8/8/2019 J2EE Archi
4/30
Need for J2EE
Integration with legacy EIS.
Reliability and confidence.
Complexity (mission-critical) in building and
maintaining.
Modules exist on heterogeneous environment.
Different modules written in different languages.
Different versions of the same software may exist.
-
8/8/2019 J2EE Archi
5/30
J2EE goals To provide an architecture to:
Reduce server down-time.
Increase application scalability (raise to demands).
Application stability (should execute as expected
without crashing without exhibiting buggy nature
or incompleteness).
Secure (be tolerant to unauthorized access of vitaldata).
Simplicity (to enable faster development and
maintenance).
-
8/8/2019 J2EE Archi
6/30
Advantages of J2EE
Being developed and enhanced under theordinance of JCP, meets the real-timerequirements of enterprise application developers.
Portable deployment develop once, deployanywhere mantra.
Forces to abide by three-tiered architecture and
supports n-tier.
-
8/8/2019 J2EE Archi
7/30
Advantages of J2EE
Provides infrastructure/design to enabledevelopers to create, distributed and interoperableenterprise apps.
It is a distributed, multi-tiered and componentbased architecture that facilitates scalableapplications.
Scalability of not only applications performancebut also of application development process.
-
8/8/2019 J2EE Archi
8/30
What is J2EE? Its a separate edition of Java optimized to meet the usage
and performance requirements of enterprise solutions.
J2EE is J2SE + additional APIs (that provide enterprisecomputing capabilities) and an execution environment forthem.
It is designed for construction of distributed apps and is
based on MVC paradigm, a proven approach for designingmulti-tier, enterprise apps that are scalable andmaintainable.
-
8/8/2019 J2EE Archi
9/30
What is J2EE? It is an architecture specification to provide/support
distributed, multi-tiered, component basedplatform/infrastructure to enable developers to create(develop) and deploy enterprise applications that aresecure, distributed, interoperable and scalable.
It simplifies enterprise application development and
maintenance by basing them on standardized,modular components, by providing a complete set of
services to those components, and by handling detailsof application behavior automatically.
-
8/8/2019 J2EE Archi
10/30
When do I use J2EE?y To provide fast, reliable access to corporate databases
from the Web.
y To build dynamic, data-driven web applications for
large user populations that expect 24*7 availability.y To automate E-Mail or wireless communications with
partners, vendors, employees or customers.
y To implement complex business logic.
-
8/8/2019 J2EE Archi
11/30
When do I use J2EE?y To provide robust user
authentication/authorization for web resourcesand other services.
y To write applications that seamlessly integrate datafrom disparate sources on multiple platforms.
y To execute distributed transactions across multiple
data stores.
-
8/8/2019 J2EE Archi
12/30
Evolution of Enterprise ApplicationFramework
y Single tier
y Two tier
y Three tier
y N- tier
-
8/8/2019 J2EE Archi
13/30
About Enterprise Applications
y Things that make up an enterprise application
y Presentation logic
y Business logic
y Data access logic (and data model)y System services
y The evolution of enterprise application frameworkreflects
y How flexibly you want to make changesy Where the system services are coming from
-
8/8/2019 J2EE Archi
14/30
Single Tier (Mainframe-based)
y Dumb terminals are directlyconnected to mainframe
y Centralized model (as opposeddistributed model)
y Presentation, business logic, and dataaccess are intertwined in one
monolithic mainframe application
y Eg. FOXPRO
-
8/8/2019 J2EE Archi
15/30
Single-Tier : Pros & Cons
y Pros:
y No client side management is required
y Data consistency is easy to achieve
y Cons:
y Functionality (presentation, data model, businesslogic) intertwined, difficult for updates and
maintenance and code reuse
-
8/8/2019 J2EE Archi
16/30
Two-Tier
y Fat clients talking to back enddatabase
y
SQL queries sent, raw datareturned
y Presentation, Business logicand Data Model processing
logic in client application Client Server systems
Ex:- Unix, mainframes
-
8/8/2019 J2EE Archi
17/30
Two-Tier : Pros & Cons
y Pro:
y DB product independence (compared to single-tier model)
y Cons:
y
Presentation, data model, business logic are intertwined (atclient side), difficult for updates and maintenance
y Data Model is tightly coupled to every client: If DBSchema changes, all clients break
y Updates have to be deployed to all clients making System
maintenance nightmarey DB connection for every client, thus difficult to scale
y Raw data transferred to client for processing causes highnetwork traffic
-
8/8/2019 J2EE Archi
18/30
Three-Tier (RPCbased)
y Thinner client: business & datamodel separated frompresentationy
Business logic and data accesslogic reside in middle tier serverwhile client handlespresentation
y Middle tier server is nowrequired to handle system
servicesy Concurrency control,
threading, transaction, security,persistence, multiplexing,performance, etc.
-
8/8/2019 J2EE Archi
19/30
Three-Tier (RPCbased) : Pros &Consy Pro:
y Business logic can change more flexibly than 2-tier
modely Most business logic reside in the middle-tier server
y Cons:
y Complexity is introduced in the middle-tier server
y
Client and middle-tier server is more tightlycoupled(than the three-tier object based model)
y Code is not really reusable (compared to object modelbased)
-
8/8/2019 J2EE Archi
20/30
N-Tier
N-Tiered architecture: Various components that make upthe application are logically separated or distributed acrossnetwork.
Client Server Server Database
Eg. ATM Application
-
8/8/2019 J2EE Archi
21/30
TierArchitecture in J2EE
-
8/8/2019 J2EE Archi
22/30
TierArchitecture in J2EE
Front end (Client):
Viewed and manipulated by the users.
It can live in a Web browser or a standalone application.
Presents customized information to clients requirements.
Servlets and JSP is used as Front end development.
-
8/8/2019 J2EE Archi
23/30
TierArchitecture in J2EE Middle:
Contains business logic Ex: Discounts.
It may contain two sub-tiers:
Web Tier It handles communication to client.
EJB Tier It manages business logic and access tocorporate data.
Backend (EIS):
Provides access to various corporate data stores(Databases, E-Mail system, Legacy systems)
-
8/8/2019 J2EE Archi
24/30
TierArchitecture in J2EE
-
8/8/2019 J2EE Archi
25/30
Need for MVC
yJ2EE designers were faced with a question of whereto place the code in a distributed environment.
yReasonable solution: To divide the code and putthem closer to their respective tier.
yThis approach reminds a popular, proven 20 yearold application design pattern called MVC.
yMVC is a design pattern for building maintainableapplications, introduced by Xerox researchers.
-
8/8/2019 J2EE Archi
26/30
What is MVC?
Technique aimed to make large applications
flexible/simple during development and maintenance.
It is a design pattern for partitioning of labor into three
layers.
The "model" is the internal workings of the program
(the algorithms), the "view" is how the user sees the
state of the model and the "controller" is how the userchanges the state or provides input.
-
8/8/2019 J2EE Archi
27/30
What is MVC?
y In this pattern, application flow is mediated by a
central controller that delegates requests to an
appropriate handler.
y Controller is the means by which users interacts with
web application. Controller is responsible for input to
the model.
-
8/8/2019 J2EE Archi
28/30
What is MVC?
y Ex: A pure GUI controller accepts input from the user
and instructs the model to create a view based on that
input. If an invalid input is sent to the controller from
the view, model informs controller to direct the view
that error occurred and to tell it to try again.
-
8/8/2019 J2EE Archi
29/30
MVC Example
getBalance()
Transfer()
Withdraw()
Deposit()
VIEW CONTROLLER MODEL
Account DB
ATM Network
ATM
-
8/8/2019 J2EE Archi
30/30
y THATS ALL FOR TODAY
yGOOD DAY
top related