Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
Engineering Complex World Wide Web Services with JESSICA and UML Markus W. Schranz Ernst&Young Unternehmensberatungsges.b.m.H. A-1020 Vienna, Aspernbr¨uckeng. 2, Austria
[email protected] Karl M. G¨oschka Vienna University of Technology Institute of Computer Technology A-1040 Vienna, Gusshausstr. 27-29, Austria
[email protected]
Abstract Complex Web services are comparable to large software systems, thus their management and engineering process requires feasible and sophisticated methodologies and processes. Standard Web page editors and Web site management tools are not built for architecting complex services and cannot handle all tasks in the Web service engineering process. We introduced the JESSICA system to utilize object-oriented concepts for the Web service management. To support all stages of a service’s life cycle, from the architectural design via the object-based JESSICA model definition to the implementation and maintenance of Web documents and dynamic server scripts, we propose an engineering environment for Web services. The approach consists of three components: the graphical editor JAZZ provides visual features to model the architecture with objects that abstractly describe the entire Web service in the Uniform Modeling Language UML. The object-oriented language JESSICA defines Web service components of any granularity and their internal and external relations based on the Extended Markup Language XML. A java-based compiler transfers the abstract service model into a consistent Web site. UML is used to support the decomposition of complex services into manageable units. The JESSICA system utilizes object-oriented concepts such as abstraction, encapsulation, inheritance, and reuse of commonalities. The strength of the engineering system lies in the combination of these three components in order to provide support for all stages in a Web service’s life cycle. We demonstrate the feasibility of our process on the engineering of the Vienna International Festival Web site. Based on this reasonably sized case study we propose that the combination of UML
Johannes Weidl webforus software und services gmbh A-1060 Vienna, Koppstr. 116, Austria http://www.webforus.com
[email protected] Stefan Zechmeister Vienna University of Technology Distributed Systems Department A-1040 Vienna, Argentinierstr. 8, Austria
[email protected]
and JESSICA improves Web service engineering and makes design, implementation and maintenance of complex services easier, faster, and less error-prone.
1. Introduction Web service engineering denotes the process of managing all stages of a Web service’s life cycle [10, 16]. The process covers the design, implementation, and maintenance of a service. Managing and maintaining Web services and applications is similar to software engineering. Due to this close relationship software engineering techniques can also be applied to the creation of Web services [16]. As with software management, the handling of a Web service becomes non-trivial when its size increases. First-generation Web development tools concentrated on the creation of individual pages. Later Web engineering tools integrated the management of entire Web sites and the navigation model [8, 11, 20]. Yet even today, few tools attempt to cover all aspects of the life cycle. Especially the maintenance task, which is essential on a dynamic medium like the Web, lacks support. Experiences from the objectoriented area were carried onto the Web engineering field to tackle the problems of complexity and use features like abstraction, encapsulation, inheritance and reuse of commonalities [1, 10, 12, 19]. We have introduced the JESSICA engineering system [1] to increase the manageability and flexibility of large Web services. JESSICA introduced an abstract model to describe hypermedia information and the use of object-oriented techniques to manipulate objects of the model for engineering
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
1
Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
complex Web services. An object-based language describes components of the Web service that are easy to manage, reusable, and highly dynamic. All elements of an entire Web site are covered. The objects are accessible throughout the life cycle for management and maintenance activities. Inheritance, reuse, and encapsulation are employed to facilitate Web service engineering. A compiler maps the abstract service description to the file-based repository of a standard Web server. The contribution of this paper is the combination of the use of UML [3] for modeling complex Web services and supporting the object-oriented approach, and a modeling tool capable of managing JESSICA objects for Web service engineering. The JAZZ editor uses UML notation and combines graphical design and development of JESSICA objects. The object-oriented decomposition and the JESSICA object model provide a powerful environment for the engineering and building the architecture of complex Web services. JAZZ provides an architectural decomposition of the Web service. The JESSICA compiler converts the objectoriented model to Web documents. The documents/scripts of the Web service can be used to deduce architectural decisions and structural changes, which can be modeled iteratively in JAZZ. Thus, all stages of the Web service’s life cycle are supported in this iterative incremental engineering process. To show the feasibility of our approach we demonstrate the use of UML in JAZZ by showing one of our current case studies: the Vienna International Festival Web site (Wiener Festwochen, WF) [18]. WF is the Web presentation of Vienna’s top cultural spring event hosting theaters, music operas, concerts, and exhibitions. The service includes information ( e.g. festival program) and electronic commerce (e.g. online ticket reservation) on currently 400+ Web pages. We have been engineering the WF for over 4 years, dealing with architectural and content variations and high data dynamics. Based on the case studies we conclude that a compiler and an object-oriented approach such as JESSICA improves Web service engineering and makes design, implementation and maintenance of complex services easier, faster, and less error-prone. The paper is structured as follows: In Section 2 we motivate the use of UML for the engineering and architecting of complex Web services and the benefits, the object-oriented paradigm can offer for the Web. Section 3 describes concepts and features of the UML language and compares it to the object-oriented model used in JESSICA. A detailed mapping of the abstract concepts to the JESSICA model that presents a Web service is explained. Section 4 concentrates on the engineering process of complex Web services and demonstrates the feasibility of JAZZ on an implemented case study, the Vienna International Festival web site. Section 5 presents a summary and conclusions.
2. Motivation JESSICA exceeds simple page-based Web design tools in providing means to structure and manage entire and complex Web services. When engineering a complex Web service, one of the main questions is how to break down the overall site content into content of individual pages and how these pages are related to each other, i.e. the definition of an appropriate site architecture [14]. A solution to this problem is usually the following topdown process: In an analysis step, the problem is decomposed into sub-problems in the so-called problem space. The analysis result is then transformed to the solution space, where in a design process an adequate, context-related solution to the problem at hand is elaborated. The decomposition of a complex problem usually leads to a non-trivial, iterative, and incremental process. Since JESSICA utilizes object-oriented concepts such as abstraction, encapsulation, and inheritance, it seems feasible to adopt an object-oriented analysis and design approach from the software engineering domain to create complex Web services. Our Web service engineering process is oriented towards common object-oriented software engineering processes such as [4, 5, 15] (each of these processes can be adopted) but focused on modeling complex Web services. We decided to use the UML (Unified Modeling Language) [6] notation as the modeling language which is based on OMT (Object Modeling Technique) [15], the Booch method [2], and use-cases as introduced by Jacobson [13] and was standardized by the Object Management Group (OMG). UML provides a number of different views for the modeling of object-oriented software [6], which can also be utilized in modeling Web services:
UML class diagrams are used to visualize class packages, which are sets of logically related classes, classes, and relation between these classes. JESSICA uses class diagrams to model JESSICA packages, JESSICA objects, and relations between objects. In JESSICA, Web pages consist of objects. JESSICAs objects can be grouped into packages and packaged again into ‘super’-packages. For this, class diagrams in UML enable an high-level, architectural view on Web sites not necessarily related to the page structure of the site. As architecture we understand Web pages and Web page abstractions (e.g. content-abstractions such as ‘information pages’) as the basic building blocks of Web sites together with their interrelations. The use case concept of UML defines actors and the course of actions (i.e. scenarios) that can be triggered by these actors. In JESSICA, for example, an actor could be a user clicking a specific control element on a
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
2
Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
page and the course of actions are actions triggered by that event (e.g. database queries).
Although HTTP is a stateless protocol, state diagrams can be used to specify the life-cycle of JESSICA objects, and to model service specific state transfers implemented with server side scripts. The use of a modeling notation, specifically UML, for architecting Web services provides the following benefits:
The UML notation is a standardized, non-proprietary notation and thus guarantees focused development and stability. Because of being a graphical notation, standardized, and wide-spread, UML diagrams can be communicated to people of different background in reasonable time. The UML notation as a notation for decomposing complex real-world software applications has shown the feasibility of covering complex (architectural) scenarios. Analysis patterns [7] and design patterns [9] can be used to ease and standardize analysis and design. Analysis and design reuse can be realized via frameworks for the reuse-based development of Web services. Since the JESSICA semantics of the UML notation elements differs from the semantics in standard object-oriented software engineering, we provide the definition of the JESSICA semantics as well as the mapping to the corresponding JESSICA concepts.
3. Mapping UML to JESSICA 3.1. Introduction Although JESSICA adopts concepts of the objectoriented paradigm (see Section 1), it does not represent an object-oriented programming language for software engineering. It is an abstraction of HTML code that uses objectoriented concepts for means of abstracting, encapsulating, and associating language inherent building blocks. Therefore, the semantics of UML has to be customized to the JESSICA language. The next sections describe the JESSICAspecific semantics of the UML notation elements utilized and defines their mapping to JESSICA concepts. This mapping from the UML notation to JESSICA code is automated in a code generation step. Not all of the UML artifacts have a counterpart (i.e. a meaning) in JESSICA, i.e. the UML
currently is more powerful than JESSICA. On the other hand, in one case (see Section 3.5) we had to extend the UML by a particular concept to reflect a JESSICA feature. We are aware that such extensions should—if possible—be avoided because new concepts confuse the user and make our UML an idiom incompatible to the standard.
3.2. Elements of the JESSICA language JESSICA provides the modeling of complex hypermedia services based on user-defined objects [1]. A processor transfers the abstract model into hypermedia documents. The JESSICA language is based on XML, defining information components. Information components are identified parts of the whole information collection that are modeled in JESSICA entities. JESSICA entities, often generally named JESSICA objects, are any tagged constructs that describe information components. The most relevant entities are objects, templates, variables, packages, and references. The following list briefly describes these entities of the JESSICA language. For a detailed description see [1, 17]. Object An Object in JESSICA defines an information unit that may contain static text and variable components. An object is accessible from within the JESSICA system via its given name and holds several attributes – e.g. the destination where it should be composed to or its MIME type – that are interpreted by the JESSICA compiler. JESSICA objects have different properties. These properties are either constants or variables. No methods are defined, since JESSICA objects are not executable. JESSICA objects are fully specified, if they contain only constant properties. Objects with variables are partially specified, thus defining JESSICA templates. Template Templates are objects that must contain variable components in order to be instantiated by objects somewhere else in the JESSICA code. Templates are used to define commonly used macros or describe abstract document models that are blueprints for multiple concrete documents. The abstract objects define generic templates for concrete objects. With respect to Web documents this means, that abstract objects may specify presentation details and layout constructs. Concrete objects are instances of the abstract templates in the sense that they inherit their structure and initialize the variable attributes. Variable A Variable is a JESSICA entity that represents a variable component within a template. Objects set the contents of variables in their body. Package A Package is a collection of logically related JESSICA entities. Packages are used to define subservices
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
3
Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
of complex services and support the decomposition of large information collections into manageable units. Reference A Reference is used to define a logical or physical link between two objects. A reference to another JESSICA object for example is resolved by the compiler as a hypertext link, using the objects identifier to calculate the effective URL to be substituted for the reference entity. These elements are used to model complex Web services. The Unified Modeling Language [3] provides a sufficient concept space to cover all elements required to model JESSICA’s objects. Included in the unified modeling language are objects, aggregation, association, and generalization/inheritance for class diagrams. There is also a notation for packages. These notations will be used to visualize JESSICA code.
3.3. Object / Class A class is the descriptor for a set of objects with similar structure, behavior, and relationships. UML provides notation for declaring classes and specifying their properties. An object represents a particular instance of a class. It has identity and attribute values. Since JESSICA does not model executable objects, no methods are explicitly presented in the graphical notation. Variables and attributes are properties in the UML sense.
Figure 2. An association modeled in JAZZ
3.4. Association An Association in UML represents a relation between two objects. It is drawn as a solid line. An arrow attached to an end of an association indicates that navigation of the relation towards the class attached to the arrow is supported. This association is mapped to JESSICA’s reference. The navigability is used to determine which object is referenced and which object embeds the reference. In Figure 2 the Homepage object references the Author object.
3.5. Aggregation
Figure 1. A JESSICA object in JAZZ and in JESSICA code
Aggregation in UML is a special form of an association. The difference in the notation is, that a hollow diamond is attached to the end of a path. The diamond is attached to the class that is the aggregate. Because a specific JESSICA feature aggregations were extended with the possibility to aggregate packages. This is necessary for packages contained within objects (“local packages”) [17]. The aggregation counterpart in JESSICA is called “Object embedding”. Figure 3 shows a picture object which gets embedded into the homepage object.
3.6. Generalization Objects are represented by a rectangle with 3 compartments separated by horizontal lines. The top compartment holds the name of the objects, the middle holds a list of attributes and the bottom a list of variables. In Figure 1 the name of the object is “Author”, “SRC”, “DST”, and “MIME” are the attributes with already assigned values and “Name” is a variable. The code on the right of the graphical notation shows the corresponding JESSICA code created in the generation step (see Section 4.3).
Generalization is the taxonomic relationship between a more general element and a more specific element that is fully consistent with the first element and that adds additional information. Generalization is mapped to “Template Inheritance” in JESSICA. An object can inherit all variables (including the code) from the more general template. Generalization is shown in Figure 4 as a solid-line path from the more specific element to the more general element, with a
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
4
Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
3.8. Notes A note is a graphical symbol containing textual information. This concept is used to provide a documentation of objects and packages. Notes are generated as remarks for the containing object which usually is a package. It is possible to link a note to an object (see Figure 6), which means the note belongs to the object.
Figure 3. An aggregation modeled in JAZZ
hollow triangle at the end of the path attached to the more general element.
Figure 6. A note modeled in JAZZ
4. JAZZ: Modeling Web Services in the Editor for JESSICA
Figure 4. Generalization modeled in JAZZ
3.7. Package A package is a group of model elements. Packages themselves may be nested within other packages. A package may contain both subordinate packages and ordinary model elements. These packages have their counterpart in JESSICA’s packages. JESSICA packages can contain objects, notes, all types of references and other packages. A package is shown in Figure 5 as a large rectangle with a small tab attached to the upper left side of the rectangle.
Figure 5. A JAZZ package
Since JESSICA does not model executable objects, some concepts, – e.g. method overriding, polymorphism—of the object-oriented programming are not applicable. Other powerful features of the object-oriented area, such as system decomposition, object abstraction, reuse of commonalities and inheritance are employed in the language. JAZZ provides a useful graphical interface to generate JESSICA documents. Thus, JAZZ can be used to design Web services at both the architectural and the document level, which we will explain on the Vienna International Festival case study.
4.1. The architecture of the entire service To define the architecture and relations of services and their abstract and concrete components JAZZ uses the UML notation. Figure 7 shows the basic architecture of the Vienna Festival Web Service. JAZZ models the architecture components as UML packages which are mapped directly to JESSICA packages. Each package is a collection of JESSICA objects and relates to other top level packages. The topmost package, named “WF Service Homepage” in Figure 7 is a collection of general service description objects, such as the service’s homepage, descriptions, contact information, etc. A special subpackage, the “WF Program Schedule”, can be reached from within objects of the topmost package. The Program Schedule consists of a static
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
5
Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
event program and individual schedules, dynamically created for and tailored to the needs of individual service user. The largest package in terms of content is the “WF Events” package that holds all event descriptions of the festival.
Figure 8. Cos`i fan tutte: An event at the WF 1998 Figure 7. The WF Web Service Architecture The screenshot in Figure 7 shows an elegant way of decomposing complex Web services into more comprehensible and maintainable units. JAZZ uses the power of the system decomposition features provided by UML to visualize abstract relations between packages of objects to describe overall service architecture.
the abstract model and define their contents. Models may even inherit from other models to either specialize or extend the models behavior by defining variables or introducing additional ones. Figure 9 shows the object description of the Cosi` fan tutte page and some related objects in JAZZ. The objects contain attributes, constant content, and variables.
4.2. Single document structure and the JESSICA object decomposition Lower level structures are expressed in JESSICA by specifying the contents of packages. The central entity of the abstract service description model is a JESSICA object. Objects are abstract repositories for concrete information within a Web service. An object in JESSICA may describe parts of a Web document, it may specify exactly one page or abstractly describe models of Web pages or even define a set or collection of documents. A typical example of what JESSICA objects can model is described in Figure 8. The Title Object describes a single addressable unit as one part of a Web document. The Cosi` fan tutte Object defines exactly one Web page, in the above case consisting of several JESSICA objects. Some objects identify common elements and may be reused to define several documents. A collection of such objects can describe an abstract model of Web pages that defines a common layout —e.g. heading banners and trailing navigation bars— which are reused to create multiple concrete documents. Those documents inherit variables from
Figure 9. Cos`i fan tutte in JAZZ The example contains concrete objects and templates describing document models. Concrete objects in JESSICA provide actual values for the template attributes, like constant text for the object’s body. The constant components can be inserted in a form that pops up on selecting a spe-
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
6
Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
cific object in JAZZ. The variables of such objects are set in the resolving phase of the JESSICA compiler. Document models JESSICA templates are used to define abstract models of Web documents. The models contain variables and constant specifications like page structure and layout definitions. Such document models are defined in JESSICA to describe, for example, the general appearance of a Web page. An abstract model can define the necessary portions of HTML for the header, a n-column table and a navigation bar at the bottom of the page (see Figure 8). The remaining part is defined by variables. The abstract model may be used to instantiate multiple objects, all using the same presentation interface. Instantiation and Inheritance The instantiation of JESSICA templates is one way that variables can be set and common attributes can be reused. But templates can also inherit from other templates. A typical use of inheritance are generic presentation templates for multilingual documents —as we manage German and English pages in WF— that inherit from a super-template holding more general layout information (see Figure 9). Templates can even be instantiated by programs (modules) that provide the dynamic generation of documents [1].
4.3. The modeling process JAZZ is the latest component of the JESSICA Web service engineering environment. Combining the graphical description model used in JAZZ, the abstract object-based modeling of Web sites in JESSICA and the JESSICA compiler to generate complex Web services spans the whole life cycle of Web services. JAZZ allows the modeling at both the architectural and the document level. The JAZZ editor generates JESSICA documents from the graphical model, thus producing abstract and concrete objects that describe a complex Web service. The JESSICA compiler transfers the objects to real Web documents and interactive server side scripts. These steps of the Web service engineering process are shown in Figure 10. This process is an iterative, incremental approach to Web service engineering, since the output of a stage is used as input for the consecutive action. Continued iterations improve the quality of the Web service. Architectural and structural deficiencies or content weaknesses in the presented Web service can be used as input to improve the model of the service in JAZZ. Although there is currently no direct relation from the Web documents back to their object-oriented presentation, iterative re-architecting and re-designing is triggered by critique
Figure 10. Web Service Engineering using UML, JAZZ, and JESSICA
on the result. The JAZZ/JESSICA approach guarantees a fast loop to generate successive service versions. The step from the service modeling to the generation of JESSICA objects is currently implemented to work in the reverse direction. Thus, JESSICA documents can be parsed for visualization in JAZZ (see the parsing arrow in Figure 10). After interpreting the source, a graphic model is constructed from JESSICA objects to better support complex Web service engineering. The parsing step will allow round trip engineering throughout the different levels of abstraction. To guarantee a consistent round trip, we will have to guarantee that the function mapping UML to JESSICA concepts is bijective.
4.4. Summary and conclusions We have introduced an engineering approach for the creation, refinement, and maintenance of complex Web services based on the modeling notation UML and an appropriate iterative and incremental process. This process is based on state-of-the-art object-oriented modeling and engineering processes to share benefits and successes. JESSICA introduces object-oriented concepts into the former simply page-based HTML design process to cover the complexity of nowadays and forthcoming huge and complex Web services throughout the entire life-cycle. Using an adequate modeling notation and appropriate tool support in this process shall make it feasible and economic. We earned major gains through the abstraction and reuse of common components in complex Web services. Compared to the size of the resulting Web documents the model reduces the information
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
7
Proceedings of the 33rd Hawaii International Conference on System Sciences - 2000
to manage to about 50% [18]. Covering complexity can be seen as a matter of 1) a process that is flexible to allow iterations and increments; 2) modeling support that in the ideal case is standardized to be communicable, robust, and widely understood; 3) tool support to create consistent and complex artifacts, ensure the management of these artifacts, and guide the engineer through the process. The application of this framework to our considerably sized case study using UML and the JAZZ editor has shown its feasibility and success. We will work on other case studies to refine the process and extend the tool support. More about JESSICA and JAZZ can be found at http://www.infosys.tuwien.ac.at/Staff/ms/jessica
References [1] Robert Barta and Markus W. Schranz. JESSICA – An Object-Oriented Hypermedia Publishing Processor. Computer Networks and ISDN Systems, 30(1– 7):281, April 1998. [2] G. Booch. Object-oriented analysis and design with applications, 2nd edition. Benjamin/Cummings, Redwood City, CA, 1994. [3] Grady Booch, James Rumbaugh, and Ivar Jacobson. The Unified Modeling Language User Guide. Addison-Wesley, Reading, Mass. and London, October 1998. [4] P. Coad and E. Yourdon. Object Oriented Analysis, Yourdon Press Computing Series. Prentice-Hall, Englewood Cliffs, NJ, 1991. [5] P. Coad and E. Yourdon. Object Oriented Design, Yourdon Press Computing Series. Prentice-Hall, Englewood Cliffs, NJ, 1991. [6] M. Fowler and K. Scott. UML distilled – applying the standard object modeling language, Object technology series. Addison-Wesley, Reading, Mass. and London, 1997. [7] Martin Fowler. Analysis patterns: reusable object models. Addison-Wesley, Reading, Mass. and London, 1997. [8] Piero Fraternali. Web development tools: a survey. Computer Networks and ISDN Systems, 30(1–7):631– 3, April 1998.
[10] Hans-Werner Gellersen, Robert Wicke, and Martin Gaedke. WebComposition: An Object-Oriented Support System for the Web Engineering Lifecycle. Computer Networks and ISDN Systems, 29(8–13):1429, April 1997. [11] Tadesse W. Giorgis. 8 Tools for Weaving Your Web Site. Byte, McGraw-Hill, New York, pages 116–20, January 1997. [12] David B. Ingham, Mark Little, and Steve Caughey. Supporting Highly Manageable Web Services. Computer Networks and ISDN Systems, 29(8–13):1405– 16, April 1997. ¨ [13] I. Jacobson, M. Christerson, P. Jonsson, and G. Overgaard. Object-Oriented Software Engineering: A Use Case Driven Approach. Addison-Wesley, ACM Press, 1992. [14] Louis Rosenfeld and Peter Morville. Information Architecture for the World Wide Web. O’Reilly & Associates, February 1998. [15] J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, and W. Lorensen. Object-oriented modeling and design. Prentice-Hall, Englewood Cliffs, NJ, 1991. [16] M. W. Schranz. Management process of WWW services: an experience report. 9 th International Conference on Software Engineering and Knowledge Engineering (SEKE ’97) (Madrid, Spain), pages 16–23. Knowledge Systems Institute, June 1997. [17] Markus W. Schranz. World Wide Web Service Engineering – Object Oriented Hypermedia Publishing. PhD thesis. Technical University of Vienna, Austria, September 1998. [18] Wiener Festwochen / Vienna International Festival Web Site, December 1998. URL http://www.festwochen.or.at/. [19] Daniel Schwabe and Gustavo Rossi. An Object Oriented Approach to Web-Based Application Design. Theory and Practice of Object Systems, 4(4):207–25. John Wiley, New York, October 1998. [20] Ronald J. Vetter. Web Publishing: No HTML Experience Needed. IEEE Transactions on Computers, pages 129–31, March 1997.
[9] E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design patterns: elements of reusable object-oriented software, Addison-Wesley professional computing series. Addison-Wesley, Reading, Mass. and London, 1995.
0-7695-0493-0/00 $10.00 (c) 2000 IEEE
8