Guidelines: Identifying JavaServer
Pages (JSPs)
Topics
Introduction
This guideline focuses on identifying JSPs. Additional guidance on JSPs
is provided in Guidelines: JSPs.
Identifying JSPs
JSPs are similar to servlets in that they interact with web-based clients.
However, while servlets are Java classes, JSPs use a syntax close to HTML. JSPs
are ideal for creating dynamic web pages. They are primarily identified from
boundary classes (see Guidelines: Analysis Class)
in web architectures. They may also contain some control logic, but in general
such logic is better factored out to servlets or other java classes (see Guidelines:
Servlet).
Consider using presentation "template" JSPs to provide a common look
and feel to the application's user interface. See Core J2EE Patterns
- Composite View ([ALU01].
Modeling JSPs
JSPs are represented in RUP by Artifact:
Design Class, and so are modeled as classes (stereotyped as <<ServerPage>>).
General guidance related to modeling of server pages and client pages is provided
by White Paper: Modeling Web Application
Architectures with UML and Modeling Web Application Design with UML at http://www.rational.com/products/whitepapers/100462.jsp.
JSPs are translated into servlets. As with servlets, the JSP designer doesn't
define operations to be called by clients, but rather the JSP designer focuses
on defining the JSP's responsibilities and how it interacts with other design
elements, such as servlets, other JSPs, JavaBean classes, and the characteristics
of the client page that it produces.
|