3. Types of enterprise architecture
1. Single Tier
All 3 layers of enterprise architecture exist
on the same system
2.Two Tier Architecture
- All 3 layers distributed between 2 tiers
- Generally UI and business logic reside on
FE and Data Access on Back end
3
4. 3. Three tier architecture
- All 3 layers separated logically
- Physical separation depends on the
application
- User Interface- client end
Processing – Middle / Business Tier(Apps
server)
Database - Back end
4
5. 4. n.Tier Architecture
- 2nd layer can be broken into multiple layers
User Interface
Business model
Business rules
Business object to data source mapping
Data Access
5
6. Advantages of n tier
1. Improved maintainablity : Applications can
be easily maintained
2. Consistency: In terms of component design
3. Interoperability: Supports component
design in any layer and by any technology
4. Flexibility : Freedom to design any type of
component
5. Scalability: Addition of new components…
6
7. Goals of an Enterprise Architecture
• Robust
• Performance & Scalability
• Capitalize adv of OO Design Priniciple
• Avoid complexity
• Maintainable and Extensible
• Ease of testing
• Reuse of application
• Support multiple client types
• Product delivery on time
7
8. What is J2EE??
• Platform used for n tier application
development
• Compliant with goals of enterprise
architecture
• Based on Java 2 Platform , standard edition
8
9. Benefits of J2EE
1. Simple Architecture
- Provision of a variety of ways to configure
architecture of an application
- supports component based design
( updation, replacement and addition of
new functionality can be wired into
existing app easily)
( Member with specific skill set develops
components under his/her skill area
leading to developmental modularization)
9
10. 2. Easy association with existing Information
system
- includes industry accepted APIs thereby
enabling to access existing Information
systems(J2SE based systems)
- Wiring to existing system through
a) J2EE connector architecture
b) JDBC API
c) JNDI
d) Java Mail
10
11. 3. Freedom of server ,tool and component
choice
- Organisations have plethora of choices in
terms of vendors, hardware, OS,server
configuration.( This has created market for
servers for J2EE platform)
- Component support ensures standardized,
packged and reused components.Vendors
will be able to provide solutions which will
be easily compatible to the current system.
11
12. 4. Scalabilty
- component design support has improved
the scalabilty factor in these application
5. Security model
- EJB and Servlet provide programmatic
security mechanisms
- user based security offered by application at
deployment time
12
13. Features of JEE
• Platform Independence
• Managed Objects through containers
• Reusability
• Modularity
• Easy development
• Simplified EJB technology
• Enhanced Web services
• Support for web2.0
• Ease of Application packaging
• Light weight JPA(POJO based)
13
15. • Run time infrastructure is used for managing
and hosting applications
• Services to manage applications are provided
by runtime infrastructure.(platform level)
• Services- messaging,security and distributed
transactions
• JEE accesses the APIs that provide services
through containers
• J2SE provides core APIs for devloping a JEE
application
15
16. APIs in JEE
1. Enterprise Java Beans (EJB3.0)
- Server side code for business logic
- types – session beans & message driven beans
- Session bean – conversation with client
- message driven bean – session bean + message
listener(asynchronous)
- Entity beans have been replaced by JPA.
16
17. 2. Java Servlet Technology 2.5
- Extends the capability of servers
- Commonly used to extend applications
hosted by Web servers
3. Java Server Pages Technology 2.1
- Text document – HTML+WML+JSP
elements
- Construction of Dynamic content
17
18. 4. Java Server Pages Standard Tag Library 1.1
- JSTL
- Provides standard set of JSP tags instead of
mixing multiple tags by multiple vendors
- iterator and Conditional tags – control flow
in XML documents
- Database access tags using SQL
- Uses JSP container
18
19. 5. Java Server Faces 1.2
- Simplifies UI build process
- server side UI building framework
- Provides a set of reusable UIs from which
new UIs cn be constructed.
6. Java Message Servics 1.1
- JMS
- Componnts to send , receive and read
Messages
- Lossely coupled and Asynchronous.
19
20. 7.Java Transaction API1.1
- JTA – interface for transactions
- default auto commit and rollbacks
8. Java mail 1.4
- email notifications
- 2 types – application level interface &
Service provider level interface
- Java mail + service provider= Internet email
20
21. 9. JavaBeans Activation Framework1.1
- JAF
- provides service for
data identification
access encapsulation
operation identification
JavaBean creation for identification
21
22. 10. Java API for XML processing1.4(JAXP)
- Supports XML document processing
using DOM,Simple API for XML, and
Extensible style sheet Language
Transformation(XSLT).
11. Java API for XML web services(JAX-WS)
-provides web services
12. Java Architecture for XML binding(JAXB)
- convienient bind between XML schema
and Java language programs
22
23. 13. SOAP with attachments API (SAAJ)
- Standard way to send XML documents
over internet.
14. Streaming API for XML(StAX)
- Alternative to DOM,Simple API for XML,
TrAX .
15. Java API for XML registeries(JAXR)
- provides access to business and general
purpose regiters over web
23
24. 16. J2EE Connector Architecture
- Provides solutions for connectivity
between Application servers and EIS.
17. JDBC API
- Supports SQL commands in Java
programing language
18. Java Persistence API (JPA)
- Uses ORM approach to bridge gap
between Object oriented model and
Relational database
24
25. 19. Java Naming and Directory Interface(JNDI)
- provides naming and directory functionality
- enables access to multiple naming and directory
services
20. Java Authentication and Authorization(JAAS)
- Authenticates and Authorizes users for JEE
application.
25
26. Architecture of JEE 5
Client Tier
Client M/c
App HTML
Client Pages
JSP Web Tier
JEE Server
EJB EJB
Business Tier
EIS Tier Data BaSe
Server Server
26
27. Java EE Containers
• JEE provides services in the form of a
container for every component
• Containers are interfaces between
components and Low level platform specific
functionality
• Components should be deployed in the
container before use.
27
28. Container Types
1.EJB Container
- provides an environment in which one or
more Enterprise bean will run
- Combination of classes and interfaces
- Provides EJB component with
lifecycle , state management , naming
services, security mechanisms and
persistence management.
28
29. 2. Web Container
- Manages JSP and Servlet
- Runtime environment for web application
- Web container is always in a web server
- provides context and lifecycle management
3. Application client Container
- Manages execution of application client
components.
4. Applet Conatainer
- Manages the lifecycle of applets
29
30. Developing Java EE 5 Application
Steps to develop a JEE application are
1. Develop application component
2. Compose application components into
modules
3. Compose modules into application
4. Deploy application
30
31. Developing Application component
- All the functional units (components) are
designed in this phase
- component – a class / collection of classes
and interfaces
- 5 types of components
EJB,servlets, JSP , applets, application
client, connectors.
-
31
32. Compose application components into modules
- process of bundling/wiring of components
-3 types of modules can be designed
1. EJB module-
-packaged and deployed as ejb-jar.xml
- contains class files for ejbs,deployment
descriptor
- may contain classes and interfaces for
ejbs not included in J2EE platform
32
33. 2. Web module-
- Packaged and deployed in web.xml file
- Contains class for servlets,JSP,Static
documents , class for applet, web
deployment descriptor.
3. Application client module
- Packaged into jar files
- Contains class for client, application
client deployment descriptor
33
34. 3. Composition of modules into application
- Java EE application is delivered as enterprise
archive(ear) file.
- JEE application packages the modules and
their corresponding deployment descriptors.
- application.xml is required as deployment
descriptor of the entire application
34
36. 4. Application Deployment
- Involves 2 steps
1. Installation of the application – the
deployer copies the ear to the application
server , generates additional container
specific classes and interfaces
2. Configuration of the application- resolves
all external dependencies and follow the
application assembly instruction
36
37. Probable Architectures
• Applet Client with JSP and Database
presentation – Applet
Business - JSP
Database - JDBC
• Application Client with EJB
presentation – JFC/Console application
Business - EJB
Database - JDBC
37
38. • JSP Client with EJB
presentation – Web Browser
Web tier - JSP
Business - EJB
Database - JDBC
• Web Services for application integration
presentation – C# application
Web tier - Web Services
Business - EJB
Database - JDBC
38