Sie sind auf Seite 1von 10

Slide 1 of 10 Ver. 1.

0
Web Component Development With Servlet and JSP Technologies
In this session, you will learn to:
Identify the need for design patterns
Identify Web Application Design Patterns

Objectives
Slide 2 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
While designing a Web application, you should ensure that
the Web application meets the following goals:
Extensibility and maintainability
Division of work
Scalability
Portability
Code reusability
Need for Design Patterns
Slide 3 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
A design pattern is a proven solution for a recurring problem
Some of the advantages of using a design pattern are:
They are proven
They are reusable
They are expressive
Need for Design Patterns (Contd.)
Slide 4 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
J2EE Design Patterns
Some of the design patterns, which can be used in J2EE
applications, are:
Value Object
Model-View-Controller (MVC)
Data Access Object (DAO)
Business Delegate
Slide 5 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
Value Object Design Pattern
Is a business tier pattern.
Is also known as data transfer object pattern that describes
how an object can act as a data container to transfer data
between a client and the business object.
Using Value Objects to transfer data not only minimizes
network overhead but also simplifies the coding of the
business methods
Slide 6 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
The MVC Design Pattern
Is a presentation tier pattern.
Represents the presentation tier and is known as the client
tier pattern in three-tier application architecture.
Provides an approach towards the development of J2EE
application with loosely coupled components
Modularity makes developing, managing, and debugging an
application simpler
In the MVC design pattern, you can divide an application
into three different parts:
Model
View
Controller
Slide 7 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
The DAO Design Pattern
Provides solutions to various problems that software
developers may come across while accessing external
resources from the J2EE application
Allows encapsulation of data access logic from the business
logic of a J2EE application.
By using DAO pattern, a data access object can be
implemented that handles the data access logic for the
application.
Only the data access object needs to be updated if there is any
change in the underlying database.
Slide 8 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
The Business Delegate Design Pattern
Hides the complexity of calling remote business methods of
EJB components by Web clients.
Provides a solution to problems of changes in the
implementation of the business objects, by introducing a
business delegate object.
The business delegate object encapsulates the logic to
access business objects from the Web clients. The Web
client remains transparent of how the business object is
implemented and only interacts locally with the business
delegate object.
Slide 9 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
In this session, you learned:
Goals for designing a Web applications are:
Extensibility and maintainability
Division of work
Scalability
Portability
Code reusability
You can define a design pattern as a proven solution for a
recurring problem.
Some important design patterns used in J2EE applications are:
The Value object design pattern
The MVC design pattern
The Data Access Object design pattern
The Business Delegate design pattern
Summary
Slide 10 of 10 Ver. 1.0
Web Component Development With Servlet and JSP Technologies
The Value Object pattern is a business tier pattern which
provides solution for problems that occur when a client
accesses a business object.
The Model View Controller design pattern is a presentation tier
pattern.
The MVC design pattern is also known as the client tier pattern
in three-tier application architecture.
Data Access Object pattern allows encapsulation of data
access logic from the business logic of a J2EE application.
Data Access Object pattern allows encapsulation of data
access logic from the business logic of a J2EE application.
The Business Delegate design pattern hides the complexity of
calling remote business methods of EJB components by Web
clients.
The business delegate object encapsulates the logic to access
business objects from the Web clients.
Summary (Contd.)

Das könnte Ihnen auch gefallen