Ajs 1 a
- 1. Introducing J2EE Architecture
Objectives
In this lesson, you will learn to:
• Identify the need for an architecture
• Identify the various types of architectural attributes
• Apply a specific architectural model in a given scenario
• Identify the various components and application areas of J2EE Architecture
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 1 of 28
- 2. Introducing J2EE Architecture
Architectural Concepts
• Architecture is the study of design and the orderly arrangement of parts or
structure of a system.
• Architecture helps you to get the preview of an application.
• Architecture is needed to support the service-level requirements, such as
performance, scalability, extensibility, maintainability, manageability, and
security of a system.
• The architecture also defines the protocols for communication, synchronization,
and data access.
• An architect is a person who creates the architecture of a system.
• The various roles of an architect are:
• Listening to the clients
• Understanding the needs of the clients
• Identifying the required resources
• Performing a feasibility study
• Creating a blueprint
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 2 of 28
- 3. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Role of an Architect (Contd.)
• The role of an architect can be divided into following phases:
• Pre-Design Phase:The architect listens to the client to understand the
scope of the project, key design points, requirements, and the
expectations of the client.
• Domain Analysis Phase:The architect identifies the domains for which
the system will be built and document the domains to learn the client
requirements in detail.
• Schematic Design Phase: The architect prepares the architectural-
level designs depicting the domain characteristics and technology
structure.
• Design Development Phase: The architect expands the details of the
design and refines the design to create the final design.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 3 of 28
- 4. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Role of an Architect (Contd.)
• Project Document Phase:The architect documents the development
process and the roles of the team members of the development
team.
• Contracting Phase:The architect identifies the actual developers of
the system and submits the bid for the projects that are to be
outsourced.
• Construction Phase: The architect reviews the construction-level
designs to analyze the problems and requests changes wherever
required.
• Post-Construction Phase: The architect helps the client with the
project rollout and migration to the new system.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 4 of 28
- 5. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Architectural Terminology
• Architecture refers to an abstract representation of the components and
behaviors of a system.
• The important architectural terms are:
• Abstraction: Entails breaking down the planned system into an
extended hierarchy in terms of the functions and intentions of the
design.
• Surface Area: Describes the way in which the components of a
system interact with one another.
• Boundaries: Are the areas where two components of a system
interact with each other.
• Brittleness: Specifies the degree to which a system gets effected
incase a small change occurs in any of the existing modules.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 5 of 28
- 6. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Architectural Terminology (Contd.)
• Friction:Specifies the level of interaction that occurs between two
components of a system.
• Layering: Represents an architectural pattern that breaks up a
complicated system into some modules. Layers are divided based on
the functional responsibilities of the modules. The common layers
are:
• Presentation layer: Displays the end user interface components
and handles end user requests. It is the high-level layer.
• Business layer: Handles the application specific business logic. It
is the middle-level layer.
• Data Layer: Provides services, such as database connectivity,
messaging systems, and transaction management. It is the low-
level layer.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 6 of 28
- 7. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Architectural Attributes are the nonfunctional, observable system quality
attributes, which includes:
• Scalability: Is the ability of a system to support the required
performance and availability as the load increases.
• Two types of scalabilities are:
• Vertical Scalability : Is achieved by increasing capacities of an
existing system.
• Horizontal Scalability: Is achieved by expanding the existing
system.
• Maintainability: Is the ability to correct drawbacks of an existing
component without making an impact on the other components of
the system.
• Reliability: Is the ability that ensures the consistency and integrity of
an application.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 7 of 28
- 8. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Architectural Attributes (Contd.)
• Availability: Assures that services provided by a system are available
to the users for the required duration.
• Extensibility: Is the ability to extend the functionality of the system.
• Manageability: Is the ability to manage a system to ensure the
availability and performance of the system.
• Performance: Is the ability to perform a task within the specified
timeframe to achieve the desired goals.
• Security: Is the ability to ensure that any information is not accessed
or modified without the prior permission of the concerned authorities.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 8 of 28
- 9. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Architecture Models
• The type of architecture used for a particular application depends on the type,
usage, and deployment of the application.
• Different types of architecture are:
• Single-Tier Architecture: Contains the user interface, the business logic
and the data stores in a single computer.
• Two-Tier Architecture: Is composed of multiple clients and a single server.
The clients connect to the server over a network using network protocols,
such as TCP/IP. The client implements the user interface and contains the
application logic. The server contains the business logic and stores data.
• Three-Tier Architecture: Divides each application into three separate
logical layers, presentation layer, business layer, and data layer. The
three-tier architecture is useful in a distributed client/server environment.
The three tier architectural design hides the complexity of distributed
processing from the end-user.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 9 of 28
- 10. Introducing J2EE Architecture
Architectural Concepts (Contd.)
• Architecture Models (Contd.)
• Multi-Tier Architecture: Contains unlimited numbers of layers. This
architecture generally contains four tiers, the client tier, presentation tier,
business tier, and data tier. The client tier contains the client systems,
presentation tier contains the Web server, business tier contains the
application server, and the data tier contains the database.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 10 of 28
- 11. Introducing J2EE Architecture
Overview of J2EE Architecture
• J2EE architecture is defined as the study of designing J2EE applications.
• The application design involves deciding on the types of components to be used,
such as Java Server Pages (JSP), Enterprise Java Bean (EJB), Java Message Service
(JMS), servlets and the hardware that will be required to run the components.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 11 of 28
- 12. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Component Technologies
• J2EE applications are made up of components that operate within a specific
environment.
• The components are functional software units assembled into J2EE applications
along with the related class files. These components communicate with other
J2EE components for performing the required application logic.
• The components defined by J2EE specification are:
• J2EE Clients: Represent the user interface of an application that interacts
with the end-user. Some of the client components are:
• Application Client: Are standalone applications that run on a client
system.
• HTML Page: Is the common form of GUI that is used to interact with
the end user in a Web application.
• Applet: Is written in the Java programming language, which runs in
the Web browser and expands the capabilities of the Web browsers.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 12 of 28
- 13. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Component Technologies (Contd.)
• Java WebStart: Is similar to the applet and makes deploying an
application a simple process.
• Web Component: Includes Java Server Pages (JSP) and servlets. Servlets
are server side Java components that dynamically process requests and
generate responses. Servlet are deployed in Web containers that is
responsible for providing the execution environment of servlet. JSPs are
server side documents containing HTML code along with Java code used to
generate dynamic content. JSP is an extension to the Java servlet
technology. When a JSP page is requested for the first time, a
corresponding servlet is generated in the background.
• Business Components: Implements the business logic in J2EE applications.
Enterprise Java beans (EJB) are server side components based on Java
component-based technology. EJB defines component architecture for
multi-tier client/server system.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 13 of 28
- 14. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• J2EE Containers
• The J2EE server provides some underlying services in the form of a container
for every component type.
• Containers are the interface between a component and the low-level platform-
specific functionality that supports the component. The containers provided by
J2EE are:
• Application Client Container: Provides runtime environment for application
clients and also manages the execution of all application clients for a
single J2EE application.
• Applet Container: Manages the execution of applets and is a combination
of the Web browser and Java plug-in.
• Web Container: Provides runtime environment for Web components, such
as servlets and JSP and manages the execution of JSP page and servlets.
• EJB Container: Provides runtime environment and various services, such
as connection pooling, security, and transactions for enterprise beans.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 14 of 28
- 15. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Application Areas of J2EE Architecture
• The application areas of J2EE are:
• Providing distributed environment: A distributed application is designed to
run on more than one computer. The functionality of the application is
separated into tiers, such as client, service, and data store.
• Supporting Enterprise Integration: J2EE provides generic interfaces for
both developers and service providers. The generic interface enables an
organization to pick and choose products, which they require without the
fear of vendor lock-in.
• Supporting Productivity: J2EE applications increase the productivity of the
developer by reducing the time required for coding. J2EE provides a
feature-rich set of high quality APIs and some default implementations.
• Providing Extensibility: J2EE should be able to keep up with organizational
growth and technological changes. The application server in J2EE can be
used to connect to any kind of database.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 15 of 28
- 16. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Key Architectural Issues
• You can create a robust and scalable application by implementing the following
architectural features:
• Architectural Documents: You need to use the architectural process to
create a blueprint for an application. The blueprint includes the following
documents:
• Vision document: Includes key features, such as business
opportunities and stakeholder requirements.
• Requirement specifications document: Specifies the functional
requirements, such as the operational aspect of the system.
• Risk identification and mitigation plan: Includes anticipation of
possible risks, assessment of risks, and mitigation plans to overcome
risks.
• Domain model: Specifies the structural and behavioral relationship
between the system level components.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 16 of 28
- 17. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Key Architectural Issues (Contd.)
• Context description: Specifies the deployment environment and
shows how the software and service components should be located
and how these components should communicate with each other.
• Project plan: Specifies milestones that terminate the project phases.
The project plan also includes the plan for the maintenance work.
• The list of assumptions: Lists all the assumptions associated with the
application development. Assumptions of critical issues, such as
security implications, user volume, and transaction load need to be
properly documented.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 17 of 28
- 18. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Key Architectural Issues (Contd.)
• Selecting J2EE Technologies: The architect selects the technologies that
will successfully implement the required system. The architect is
responsible for convincing the clients on the selection of the appropriate
technology.
• Risk Management: An architect needs to anticipate the possible risks to
ensure that the client requirements are met by the system design. An
architect also needs to decide how much risk control is sufficient by
comparing the risk and the mitigation strategies.
• Pattern Usage: Is defined as a proven solution to a problem in a given
context. Each pattern is a solution that you can apply repeatedly to the
same or similar problem encountered in software development.
• Prototyping : Is a process of analyzing a system and determining the
necessary modifications.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 18 of 28
- 19. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Servers in J2EE Technology Systems
• J2EE technology system comprises of several servers:
• Web Server: Handles the request of a Web client and provides static or
dynamic Web pages to the client. The dynamic behavior of the Web page
is provided by JSP and servlets. A Web server should be able to handle
various concurrent requests to operate efficiently.
• Application Server: Implements a framework to provide services to the
applications that run within the server. The services are security services,
transaction management services, and resource management services.
• Resource Servers: Provides access to the data resources for a J2EE
application.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 19 of 28
- 20. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Various Available J2EE Application Servers are:
• J2EE 1.4 Application Server: The Application Server Platform Edition 8 provided
by the Sun Microsystem is a compliant implementation of the J2EE 1.4
platform. The application server supports all the APIs described in J2EE 1.4
platform. The application server also includes various J2EE technologies and
tools that are not a part of the J2EE 1.4 platform but are provided to help the
developers.
• BEA WebLogic: BEA WebLogic Server provides platform for building integrated,
enterprise-class applications that share information, deliver services, and
automate collaboration among different companies.
• IBM Web Sphere: IBM WebSphere Application Server is a high-performance
and scalable transaction engine for dynamic e-business applications. The
application server allows you to deploy an operating environment that works as
a platform capable of handling secure transactions and Web services.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 20 of 28
- 21. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• JBoss Application Server: The JBoss Application Server is an open-source EJB
solution that is available under GPL. JBoss server improves scalability and
performance by enabling clustering of any Java object, such as EJB, HTTP, and
servlet. JBoss offers modular and services-oriented architecture.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 21 of 28
- 22. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Criteria for Selecting J2EE Application Server are:
• Performance: You need to ensure that the application server implementation is
efficient. You should check whether the application server implements
connection pooling and supports JDBC. The application server should also
efficiently tie into Web servers to ensure fast response between the Web
request and the application server.
• Cost: You should check the maintenance costs per CPU or per server,
debugging and development tool costs, training costs for administrators and
developers, while selecting the server.
• Compliance: You should check whether the application server is in compliance
with the J2EE specification. The application server should be J2EE licensed and
J2EE certified.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 22 of 28
- 23. Introducing J2EE Architecture
Overview of J2EE Architecture (Contd.)
• Criteria for Selecting J2EE Application Server are (Contd.):
• Scalability and availability: The application server should be able to perform
load balancing, efficient connection pooling, and caching to ensure availability
of a system. The application server needs to be flexible, so that you can add
CPUs to provide a multi-thread process implementation and cost-effective
licensing.
• J2EE support: The application server should support all the versions of JDK. The
application server should support the available operating systems, such as
Linux, MacOS, HP/Unix, Windows, and Solaris.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 23 of 28
- 24. Introducing J2EE Architecture
Summary
In this lesson, you learned:
• Architecture is the study of design and the orderly arrangement of parts or
structure of a system. Architecture consist of the system architecture and
the software architecture.
• The various roles of an architect are, understanding the needs of the clients,
identifying the required resources, performing a feasibility study, forming a
practical vision of a structure, and creating a blueprint during the different
phases of software development.
• The various architectural terms that are used to describe various aspects of
the architecture are abstraction, surface area, boundaries, brittleness,
capabilities, friction, and layering.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 24 of 28
- 25. Introducing J2EE Architecture
Summary (Contd.)
• Architectural attributes are the nonfunctional, observable system quality
attributes, which includes scalability, manageability, performance,
availability, reliability, and security.
• The various types of architecture models are single-tier architecture, two-tier
architecture, three-tier architecture, and multi-tier architecture.
• In single-tier architecture, the standalone application runs on a single
computer, provides user interface, handles all the input, validates data, and
maintains the data store.
• Two-tier Architecture is composed of multiple clients and a single server. The
business logic may reside on the client-side or the server-side.
• In three-tier architecture, application is divided into three separate logical
layers, presentation layer, business layer, and data layer.
• Multi-tier architecture may contain unlimited numbers of layers.
• J2EE architecture is defined as the study of designing J2EE applications.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 25 of 28
- 26. Introducing J2EE Architecture
Summary (Contd.)
• The components defined by J2EE specification are J2EE Clients, Web
Components, and Business Components.
• The various client components are Application Client, HTML Page, Applet, and
Java WebStart.
• J2EE Web components include Java Server Pages (JSP) and servlets.
• Business logic is the logic used to solve the functional requirements of a
particular business domain.
• J2EE containers are the interface between a component and the low-level
platform-specific functionality that supports the component. The various
types of J2EE containers are Application Client Container, Applet Container,
Web Container, and EJB Container.
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 26 of 28
- 27. Introducing J2EE Architecture
Summary (Contd.)
• J2EE provides components, containers and several API that helps the
developer to code an application efficiently. The various application areas of
J2EE are:
• Providing distributed environment
• Supporting enterprise integration
• Supporting productivity
• Providing extensibility
• By implementing the following architectural features a robust and scalable
application can be created:
• Architectural documents
• Selecting J2EE technologies
• Risk management
• Design patterns
• Prototyping
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 27 of 28
- 28. Introducing J2EE Architecture
Summary (Contd.)
• The key architectural issues that need to be taken care while designing
architecture are architectural documents, selecting J2EE technologies, risk
management, design patterns, and prototyping.
• J2EE technology system comprises of several servers, such as Web server,
application server, and resource server.
• The various application servers are J2EE 1.4 application server, BEA
WebLogic, IBM Web Sphere, and JBoss Application Server.
• The following criteria’s needs to be taken into consideration while selecting a
J2EE application server:
• Performance
• Cost
• Compliance
• Scalability and availability
• J2EE support
©NIIT Architecting J2EE Solutions Lesson 1A / Slide 28 of 28