UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory UML Weekend Crash Course™ - To Parent Directory

crnarupa.singidunum.ac.rs
from crnarupa.singidunum.ac.rs More from this publisher
01.01.2015 Views

Session 29—Design of a Web Application 305 Tom Pender tom@pender.com Business Analyst and Designer Web Application Extension Jim Conallen of Rational Software created an extension to the Unified Modeling Language to facilitate Web modeling in UML. He devised a set of strategies, stereotypes, and icons for UML Web modeling. This extension is called the Web Application Extension (WAE). These three sessions do not explicitly use the WAE, because you may be using tools that do not support WAE. On the other hand, the strategies recommended in these sessions are completely compatible with the WAE. Reading about the WAE may give you a few extra strategies for enhancing your UML Web models. In addition, WAE recommends a set of icons that can be used in UML diagrams instead of using textual stereotypes. For example, rather than using the standard component with a stereotype shown on the left in Figure 29-10, you could use the WAE servlet icon shown in Figure 29-10 on the right. WiredWebController WiredWebController Figure 29-10 Standard UML component with stereotype and WAE servlet icon Many tools, such as Rational Rose and Popkin’s System Architect, support WAE. Check the Help file of your UML modeling tool to see if and how it supports WAE. You can also get more information from Jim Conallen’s Web site at www.conallen.com/technologyCorner/ Webextension/welcome.html or do an Internet search on “WAE UML.”

306 Sunday Afternoon REVIEW The Model 2 Architecture is an MVC architecture for Java Web development. JavaBeans are used for the data model and business data services. JSP pages are used to display the view of the data. A single Java servlet is used for the controller, which verifies HTTP parameters, prompts the JavaBeans to do business processing, and selects a JSP page view to be returned to the user. No matter what technologies you use to develop Web applications, you can apply the goals and concepts of the Model 2 Architecture. In particular, keep your Web content separate from your business logic and controller code whenever possible. UML Deployment and Collaboration diagrams are very handy for showing the architecture of your Web application. UML Sequence, Collaboration, Class, and Object diagrams are useful for showing the details of your Web application design. Sometimes, to get the most use out of these diagrams, you’ll need to be a bit liberal with the definition of class or object when deciding what you can place on a diagram. Remember: The goal of UML is to be useful, so although you shouldn’t recklessly abuse the rules of UML, you can bend them to meet your individual needs. XML hierarchies can be shown in UML. An XML schema can be generated from an XML Class diagram, and an XML document can be generated from a UML Object diagram. XMI is an OMG specification for mapping UML to XML. QUIZ YOURSELF 1. What does MVC stand for when describing the MVC pattern (See “Model 2 Architecture.”) 2. What two diagrams can be used to show how the Web components talk to each other during execution of the application (See “Querying appointments and contacts.”) 3. How would you model the XML structure used in your Web application (See “Appointment XML in the case study.”) 4. What diagram could represent the instantiation of an XML document (See “Appointment XML in the case study.”) 5. Has anyone come up with a standard way of using the UML to model Web applications (See “Web Application Extension.”)

306<br />

Sunday Afternoon<br />

REVIEW<br />

The Model 2 Architecture is an MVC architecture for Java Web development. JavaBeans<br />

are used for the data model and business data services. JSP pages are used to display<br />

the view of the data. A single Java servlet is used for the controller, which verifies<br />

HTTP parameters, prompts the JavaBeans to do business processing, and selects a JSP<br />

page view to be returned to the user. No matter what technologies you use to develop<br />

Web applications, you can apply the goals and concepts of the Model 2 Architecture.<br />

In particular, keep your Web content separate from your business logic and controller<br />

code whenever possible.<br />

<strong>UML</strong> Deployment and Collaboration diagrams are very handy for showing the architecture<br />

of your Web application. <strong>UML</strong> Sequence, Collaboration, Class, and Object diagrams<br />

are useful for showing the details of your Web application design. Sometimes,<br />

to get the most use out of these diagrams, you’ll need to be a bit liberal with the<br />

definition of class or object when deciding what you can place on a diagram.<br />

Remember: The goal of <strong>UML</strong> is to be useful, so although you shouldn’t recklessly<br />

abuse the rules of <strong>UML</strong>, you can bend them to meet your individual needs.<br />

XML hierarchies can be shown in <strong>UML</strong>. An XML schema can be generated from an XML<br />

Class diagram, and an XML document can be generated from a <strong>UML</strong> Object diagram.<br />

XMI is an OMG specification for mapping <strong>UML</strong> to XML.<br />

QUIZ YOURSELF<br />

1. What does MVC stand for when describing the MVC pattern (See “Model 2<br />

Architecture.”)<br />

2. What two diagrams can be used to show how the Web components talk to each other<br />

during execution of the application (See “Querying appointments and contacts.”)<br />

3. How would you model the XML structure used in your Web application (See<br />

“Appointment XML in the case study.”)<br />

4. What diagram could represent the instantiation of an XML document (See<br />

“Appointment XML in the case study.”)<br />

5. Has anyone come up with a standard way of using the <strong>UML</strong> to model Web<br />

applications (See “Web Application Extension.”)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!