Up ]

Modeling XML
Home News Listen Read Resources Feedback Contents Search RSS, Contacts

 

 

 

Sponsor Links

Fast, reliable data access for ODBC, JDBC, ADO.NET and XML
Need an expert for Java, XML and Web Services projects?
WSSC 2008: The only event dedicated to Web Services Security technology and business
IBM MQSeries for Compaq NSK - ( v. 5.1 ) - media
88x31 CTIX Logo - Clear Background
Microsoft SQL Server 2005 Standard Edition X64 - complete package
Corel DESIGNER Technical Suite - ( v. 12 ) - complete package
Find XML examples at XML Pitstop

 

Modeling XML Applications with UML

SQL/XML, Query, Database and Data Access Portal

Grid Computing Portal

Methodologies
ORM
UML

Specifications
DOM
Mapping
XMI

Other
Conceptual model
OSI

Semantic web services
XLink
XQuery

 

 

This excerpt from Modeling XML Applications with UML explains behavior diagrams, structure diagrams and how to model XML vocabularies with UML. 

Distributed, inter-enterprise business systems are very complex beasts. Few people can fully comprehend all aspects of the system at one time. Instead, they must approach the problem as a set of subsystems, each of which is further decomposed into a set of alternate models and views. Each model deliberately ignores aspects of the system that are not relevant to its purpose. Building these models is similar to the way we cope with the complexity of everyday life by ignoring irrelevant details.

David Carlson Modeling XML Applications with UML book cover

The Unified Modeling Language (UML) defines a standard language and graphical notation for creating models of business and technical systems. Contrary to popular opinion, UML is not only for programmers. In fact, UML defines several model types that span a range from functional requirements and activity workflow models, to class structure design and component diagrams. This book describes how models are used when specifying XML within the context of an e-business system. These models, and a development process that uses them, improve and simplify communication among an application’s many diverse stakeholders.

The UML’s standard graphical notation defines the following types of diagrams:

Standard diagrams in the UML

Structure Diagrams

Class (static structure) - Class diagrams illustrate the static design view of a system, including packages, classes, interfaces, collaborations, and their relationships.

Object - Object diagrams show static snapshots of instances of things found in the class diagrams, especially from the perspective of real or prototypical cases.

Component - Component diagrams illustrate the static implementation view of a system, showing a set of components and their relationships. A component represents a physical implementation of the logical abstractions in a model, such as classes and their interactions.

Deployment - Deployment diagrams illustrate the connectivity of physical nodes in an architectural view of the system. A node is a computational resource that provides a physical operating environment for executing one or more components.

Behavior Diagrams

Use Case - Use Case diagrams model the behavior of a system, subsystem or a class by illustrating the relationships among a set of use cases and their actors.

Activity - Activity diagrams show the flow of activity within a system, including the sequential or branching flow from activity to activity and the objects that act or are acted upon by those activities.

Statechart - Statechart diagrams illustrate a state machine, consisting of states, transitions, events, and activities. These diagrams are most often used to model the event-ordered behavior of an object.

Sequence - Sequence diagrams illustrate the interaction among objects by emphasizing the time ordering sequence of messages. The objects are typically instances of classes, but may also represent other classifiers such as actors, components, or nodes.

Collaboration - Collaboration diagrams also show the interaction among objects, but emphasize the structural organization of the objects that send and receive messages.

Note: Sequence and collaboration diagrams are alternative representations for the same model elements, so you can convert one to the other without loss of information.

But how are these diagrams used to improve our analysis and design of XML applications? I’ll illustrate the use of two diagrams in a small case study. The Rich Site Summary (RSS) is a simple XML vocabulary used for exchanging news headline information, without presentation markup. Netscape originally developed the RSS vocabulary for use on My Netscape Network, a customizable portal home page for Netcenter. But use of RSS has grown far beyond its original application at Netscape.

In portal applications, XML enables communication of information content without limiting the choice of its presentation. Web applications based on RSS newsfeeds recombine the XML information content with a presentation that is appropriate for the viewing device and the user's requirements.

A portal is not necessarily viewed from a PC desktop, nor is it necessarily rendered from HTML. A portal provides a view into the World Wide Web of distributed information content, and it presents that content and navigation in a way that is most appropriate for the user’s current context. XML content such as RSS enables the convergence of wireless Web applications with more conventional wired desktop browsers. As you read through the following UML diagrams, keep your mind's eye on this vision of global content accessed from many devices.

Use Case Analysis

There are two primary components to the Web applications discussed in this book: content management and portal design. These requirements are most easily illustrated in a UML use case diagram, as shown in Figure 1.

Figure 1: Portal design use case diagram

Figure 1: Portal design use case diagram

The use cases for content management, illustrated with gray shading, describe the requirements for business analysts and content developers. These two stakeholders are responsible for defining the business vocabularies that determine the structure of XML documents created as an application's content. In addition, many Web applications depend greatly on the metadata assigned to content that will be used to personalize the portal presentation. Personalization rules evaluate the relevance of content by matching its metadata with the profile attributes of the current user.

The use cases shown for portal design are not exhaustive, but they illustrate the principal requirements, including the dependencies on content management. It is becoming common to refer to the sub-panes of a portal application interface as portlets, obviously extending the use of terms such as applets and servlets used in Web application design. A portlet often includes a template for its presentation, along with an XSLT stylesheet used to format the underlying XML data. Most portal applications also allow users to customize the portal layout and portlet selection in their personalized view.

XML Vocabulary Design

A UML class diagram can be constructed to visually represent the elements, relationships, and constraints of an XML vocabulary. With a little initial coaching, class diagrams allow complex vocabularies to be shared with non-technical business stakeholders. A subset of the standard RSS DTD was manually reverse-engineered into the class diagram shown in Figure 2.

Figure 2: RSS vocabulary design in UML

Figure 2: RSS vocabulary design in UML

UML models can capture the semantics for an application domain model, and the definitions can be directly processed by e-business systems. The UML also standardizes the graphical notation for use by human readers. Four chapters in Part II of this book step through the concepts and standards for translating UML class and object models into XML vocabularies and documents. Chapters 6 and 7 concentrate on defining a vocabulary's structure and relationships and focus on the decomposition of UML object instance diagrams into XML documents. Chapter 8 reviews the current standards for defining schemas used to validate XML documents, and Chapter 9 reviews the process for automatic generation of XML DTDs and Schemas from UML class models.

About the author

XMLmodeling.com logo David Carlson has created models for a variety of XML schemas, including UDDI, RSS, CatML, RosettaNet, and XHTML. This article is an excerpt from Chapters 3 and 5 of David's Modeling XML Applications with UML (Addison-Wesley, ISBN 0-201-70915-5). David is also the author of eclipse Distilled (Addison Wesley, ISBN 0-321-28815-7).

 

 

 

Home ] Up ]

Copyright © 2008,  Ken North Computing, LLC
Last modified: March 31, 2008