Introduction
This guideline focuses on identifying JSPs. Additional guidance on JSPs is provided in Guideline: JavaServer Page (JSP)
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 Guideline: 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 Guideline: 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 Whitepaper: Modeling Web Application Architectures with UMLand 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.
|