Mapping UML to XMl

download Mapping UML to XMl

of 8

Transcript of Mapping UML to XMl

  • 8/7/2019 Mapping UML to XMl

    1/8

    MAPPING UML TO XML: A METHOD FORTEACHING AN OBJECT-ORIENTED

    APPROACH TO E-BUSINESS DEVELOPMENT

    Jack T. MarchewkaNorthern Illinois UniversityChangLiuNorthern Illinois University

    ABSTRACT

    XML (extensible MarkupLanguage) has been gaining notoriety and interest in electronic business applications. As aresult, XML has become an increasingly popular topic in academia in order to better prepare students for their chosencareers. Recently, the authors worked closely with a team of four students developing an XML-based application forJohn Deere inMoline, Illinois. Although the students were able to learn XML code with relative ease, the real challengeoccurredwhen they tried to apply this technologyto an electronic business application. By usingseveraltools associatedwith the Unified Modeling Language (UML), the students were able to develop a conceptual model that aided thestudents' understanding and provided a seamless application of this technology. Using a conceptual model fordevelopment and design provided a better real world abstraction, improved communication and understanding, andresulted in less rework, errors, and inefficiencies. This paperdescribes how the UML use casemodel and class diagramscan seamlessly aid an XML-based electronic business application. The experiences of this team provide a basis foraction research that should beof particular interest to academics teaching system analysis and design-based courses andto organizations interested in developing XML-based applications.

    INTRODUCTIONThe growing popularity of electronic commerce hasprovided new and exciting opportunities for businesses.Technology has enabled organizations to extend theirreach globally and to create new business models thatextend their strategic visions and improve theircompetitive positions that were impractical only a fewshort years ago.From a business perspective, e-commerce applicationscan be classified into three categories: business-toconsumer (B2C), intra-organizational, and business-tobusiness (B2B) (Applegate, Holsapple, Kalakota,Radermacher, andWhinston, 1996). Among these threecategories, the impact of B2B marketplace is the largestfinancially compared to the other two sectors. AccordingtoForresterResearch (2001), the B2B economywill soar

    Volume 4, Number 1

    past$2.7 trillionmark in 2004. Compared with estimatesfor the B2C market over the same period, the ratio ofrevenues can be expected to grow more than 10 to 1.Interestingly, the growth of B2B e-commerce is largerthan the gross national product ofmany small countries(Cuuningham, 2001). As a result, many colleges anduniversities have literally jumped on the electroniccommerce band wagon byoffering programs and coursesin electronic commerce and its related applicationdevelopment technologies.With the current prevalence of using the Web as theplatform for application development, XML (extensibleMarkup Language) has been gaining notoriety andinterest for many electronic business applications. XMLis a relatively new technology that provides a crossplatform method that can identify, or markup, data. AnXML document allows for complete control over the

    27

  • 8/7/2019 Mapping UML to XMl

    2/8

    structure of the data. Subsequently, one only needs todefine the tags or elements within the document.The increasing popularity ofXML stems from the abilityto separate content from presentat ion, whereby thedeveloper has the freedom to build anapplicationwithitsown data structure using XML and HTML to create theuser interface. By providing a common language fordescribing data, XML enables more precise searching,lets businesses share data more efficiently, and makesnavigating data much easier (Gottesman, 1998). Thisallows organizations to not only use the same data,definitions across different platforms, but also use thesame data differently across different organizations.Moreover, XML is based on UNICODE. This allows forXML to support not only the Western characters, whichhave been traditionally supported by ASCII, but Asiancharacters as well. As a result, XML has been ofparticular interest to organizations conductingelectronicbusiness globally. Since XML is designed as a tool fordocument-oriented applications, its flexibility is rapidlymaking it the tool of choice for B2B applications.

    BACKGROUND FOR THIS RESEARCHWith support from the Business InformationTechnologyTransfer Center (BITTC) at Northern IllinoisUniversity's Collegeof Business, four students under thedirection of two faculty members engaged in a projectwith John Deere inMoline, Illinois to develop anXMLbased application during the fall semester of 2001. JohnDeere was interested in learning more about thisrelatively new technology and how it could support therelationships among their various business units andsuppliers.The Business Information Technology Transfer Centerwas founded in 1998 with the intentof creating a uniqueeducational experience for College of Business studentsat the University. The ntission of the Center is to:

    EnhancetheeducationalexperienceoftheUniversity'sstudents by exposing them to actual organizationalproblems and the application of the latest informationtechnologies and methodologies; Cultivate, nurture, and sustainrelationships betweenUniversity's College of Business and organizationsthrough the creation of mutual value;

    Enable Col lege of Business faculty to improve therelevancy of their teaching and research by working28

    closely with.various organizations and small studentteams;and

    Createand shareknowledge fromresearch initiativeswith business partners and the academic community.Although faculty members play the role of coaches, thestudent team is responsible for defining the goals,objectives, and deliverables associatedwiththe projectasoutlined in the Center' s project methodology. Thecoach's role is to serve primarily as a resource to thestudents and offer support and guidance when needed.Generally, projects are initiated and completed withinone semester; .therefore, the students are able toexperience the entire life cycle of a project. Students arerecruited the semester before a project is scheduled andgo through a selection process sintilar to being hired fora position within a finn. In that past, an average of thirtystudents have applied for each project; however, teamsize has generally been lint ited between four and sixstudentsthat includea mix of graduateand undergraduatestudents. Students receive three credit hours as electivecreditand a $500 scholarship. Students invited to be ona project are chosen based upon: Competency of business and technology skills; Communication skills; Ability to contribute as a team member; and

    Ability to workin anunstructured environment.Required team meeting times are scheduled as a threehour class. Team members are expected to attend andparticipate actively. Although there is no syllabus, eachteam follows a project methodology to guide themthroughout their project. Outsidereadings and meeting ofkey projectdeliverables generallyrequire eightto twelvehours of outsidework. Although the students do not haveany quizzes or exams, their final grade is deterntineddirectly by the completion of key project deliverables. Afinal presentation to the sponsoring organization, projectcoaches, and any other interested stakeholders bringsclosure to the project.The focus of the John Deere project was to exploreelectronic. business models and, in particular, theelectronic procurement of direct materials. Moreover.John Deere was especially interested in evaluating XMLas a base technology. Subsequently, the student teamwas asked to develop a business model and XML-based

    Journal of Informatics Education and Research

  • 8/7/2019 Mapping UML to XMl

    3/8

    prototypeapplication that would serve as a model and animpetus of ideas that would allow John Deere to developa much larger application in the future.After extensive research, the students recommended areverse-auctionmodel to support JohnDeere's businessunits and suppliers. Using Web technology, a reverseauction would allow John Deere's business units to postrequests for quotations for various items. In turn, thecompany'svendors couldthenviewtheseitemsandplacebids over a specific period of time. This model is idealforprocurement becauseitmakesthepurchasing processmore competitive and can reduce the overall costs ofpurchasing transactions.In addition, the coaches taught the student the basics ofXML, and several books and an online course providedadditional support. However, it became apparentthat thechallenge was not in learning XML, but understandinghow XML could be used to develop an applicat ion tosupport the reverse auction model. Therefore, thestudents had an understanding of what they wanted toaccomplish and the tools to build it, but not the processfor achieving it.Action research provided an important and interestingapproach to solving this particular challenge. Actionresearch is becoming moreaccepted asanalternative totraditional, social sciences or empirical-based researchthat focuses on studyinga particularphenomenonwithout. changingit. Conversely,action research focuses on thepractical concerns of individualsor an organizationbysolving an immediate and problematic situation whileexpanding scientific knowledge (Rapoport , 1970;Avison, Lau, Neilsen, and Myers, 1999). In a collaborative effort between the researchers and practitioners,action research allows for the simultaneous study oforganizational change and the process leading to thecreation of the new knowledge that is gained from theexperience (Baburoglu and Ravn, 1992).Under the direction of the faculty coaches, several basicUML models were developed to bridgethis gap. This notonly aided the students in developing a reverse auctionapplication that would allow multiple vendors to bid onspecific items, but allowed for a surprisingly seamlessprocess for mapping UML design models to XML. Toillustrate this approach, the remainder of this paperprovides an overview of the UML models and how anXML-based application can be developed. The authorsbelieve that this technique can be applied inMIS classes

    Volume 4, Number1

    using XML and to organizations interested indevelopingXML-based applications for electronic business.

    UNIFIEDMODELING LANGUAGE (UML)According to Booch, Rumbaugh, and Jacobson (1999),the Unified Model ing Language (UML) is a generalpurpose visual modeling language that is used to specify,visualize, construct, and document the artifacts of asoftware system. UML is a product of object-orientedanalysis and design (OOA & D) that first appeared in thelate 1980s and early 1990s and unifies the methodsproposed by Booch, Rumbaugh, and Jacobson (Fowlerand Scott, 1997). OOA & D is a direc t resul t of objectoriented programming languages such as SmaliTalk andC++. UML has currently emerged as the sof twareindnstry's dominant object-oriented modeling language(Siau and Cao, 2001).As a modeling language, UML provides the graphicalnotation andsyntaxused toexpress adesign, butdoes notinclude a method or process for s teps in complet ing adesign. However, UML provides a key technique forimprovingcommunication between developers andusersand has a commonvocabulary of object-based terms anddiagramming techniques rich enough to model anapplications system from analysis throughdesign (Dennisand Haley, 2000).An object-oriented approach to systems analysis anddesignhas several benefits over the traditional process ordata focused approaches. Moreover, information systemsdeveloped using these traditional approaches have beenregarded as being more error-prone, expensive to build,and inflexible to maintain (Satzinger and Orvik, 2001).Sinceeach object is small and self-contained, the objectoriented approach is more manageable since thecomplexity of systems development is reduced. Inaddition, object-orientedsystems providea higherdegreeof reusability and therefore a less expensive to build andmaintain, while leading to a higher quality system(Satzinger and Orvik, 2001).UML defines a set of nine object-oriented diagrammingtechniques that can be used to model a system (Dennisand Haley, 2000); however, only two of these modelingtechniques were used to develop the reverse-auctionapplication. These two techniques included the use caseand class diagrams. The remainder of this sectionexplains the two diagramming techniques and illustrateshow they were used by the student team.

    29

  • 8/7/2019 Mapping UML to XMl

    4/8

    Use Case DiagramsOne of the first steps in designing the reverse-auctionapplicationinvolved thecreation of a usecase diagram.Ause case diagramprovides a simple, yet effective, highlevel abstraction of the system to be developed. A basicuse case diagram includes stick figures as actors...;.. i.e.,people,organizations, orother external entities whouseor interact with the system. A box represents the systemboundary and various use cases within the systemboundary define the fnoctionality or high-level featuresof the system. Linesconnecttheactors withthe varioususe cases to define the relationships or interactions.Figure I provides a use case diagram developed by thestudentteam. Actors include thevarious businessunitsand snppliers, as well as a John Deere administrator whowould support the application. The various use caseswithin the system boundary were subsequently expandedas use case scenarios that basically "story-boarded" howeachactorwoulduse or interact withthesystem. Theusecase diagram andassociatedscenarioswerereviewedbya manager at John Deere who acted as the projectsponsor. After receiving his approval , the team thencreated a class diagram.The Class DiagramObjects are the heart of the object-oriented approach,since just about everythingcanbe viewed as an object.One of the key diagramming techniques is the classdiagram. The class diagram is a technique that candescribe the types of objects (i.e., classes) in a systemand the static relationships that exist among them.Relationships Can beassociations(e.g., a customer ordersa product) or subclasses (a customer is a kind of person).In addit ion, class diagrams define the operations ormethods (i.e., things an object or class can do), as well asthe properties or attributes of a particular class.Inadditionto associations,class diagrams can be usefulfor defining aggregation and composition. Morespecifically, aggregation allows the developer to modelthe"is-a-part-of'relationships (e.g., awingis apartofanairplane or packagecontains items). By modeling objectclasses and theirvariousrelationships, the developer isable to create a better abstraction of the real worldsystem. As a result, an application system can bedeveloped that better reflects the needs of the user ororganization.Figure 2 provides the class diagram developed for thereverse-auction model. Eachclass includestheattributes30

    and methods associated with the class. The methods inthe class diagram were derived from the use casesspecified in the use case diagram.

    MAPPING UMLTO XML DOCUMENTSAlthough XML has been gaining interest and popularity,the design of a valid and well-formed XML documentand XML-based e-business application remains achallenge. Therefore, an XML development processshould be carried out in a rational, disciplined, effective,controlled, and uniform way to design e-businessapplications. Even though XML is not an object-orientedlanguage, the opportunity to apply OOA& D techniquesexists.At the core of XML is a Document Type Definition(DTD) or a schema used todefine the data contents of theXML document. A DTD specifics which tags orelementsa documentmayhave,whatthey arecomposedof, and how they are related to one another within thestructure of the document in terms o f contents,sequences, nesting, etc. (Gibb, O'Donnell and Leon,2000). It proposes many mechanisms to definestructuring rules for documents. In short, the purpose ofa DTD is to provide a grammar for an electronicdocument.For processing an XML-based electronic document, itmustbe "well-formed" and "valid." Awell-formedXMLdocument conforms to the syntax rules set up for XMLby the WorldWideWeb Consortium(W3C) in theXML1.0 specification. However, this really means that theXMLdocumentcontainsone ormoreelements, andoneelement, called the root, contains all the other elements.In addition, a "well-formed document" means each element also nests inside any enclosing elements properly.An XML document is "valid" if it references a DTD orschema, and theDTD or schema complies with the W3Cstandard. Although most XML browsers will check toensure that the XML document is well formed, only a fewhave the capability to check to verify that it is valid.To bridge the gap between objected-oriented systemanalysis and designand the development for XML-basedB2B applications, we can use UML's class diagram tomodel XML's DTD structure.Mapping to the DTDThe class diagram in Figure 2 shows the classes,attributes, and various associations. It provides aseamless guide for preparing the XML DTD. Figure 3

    Journal of Informatics Education and Research

  • 8/7/2019 Mapping UML to XMl

    5/8

    JD Busll'llilSS UI'l1t

    FIGURElUSE CASE DIAGRAMJD Power AuctionClearing House

    SubmitMaterialRequ&s(

    VIew AuetiOfl Status j - - - - - - - - - + - - - - ' : O ; , . . ' f cJDSuppner

    FIGURE 2CLASS DIAGRAM,. USIHESS Nrr SUPPLIER

    A tlrlb u tn BJDREQUEST AttftbulUName -. CompanyNameDepartment Attrlbuln --- COntectName""'" 8ldNumber Acldt&sto> "'" ""'"""'. AuthOl'lzaliol'l '''"emeHMtthoda MethodaAdIl NewBuslrlllSSUna SubmitNew 81

  • 8/7/2019 Mapping UML to XMl

    6/8

    FIGURE 3AN ELEMENT-BASED DTD MAPPED FROM THE CLASS DIAGRAM

    shows an element-based DTD with a rootelement called"XML_DOCUMENT." Each class ismappedas a groupelement within the XML DTD. Subsequently, theattributes of each class in the class diagram are mappedas PCDATA with their associaled group element.As illustrated in Figure 3, each element and sub elementof the XML DTD maps directly to the super classes andsubclasses of the class diagram. However, one could usethe XML attributes rather than elemenls and sub elemenlsfor the DTD mapping. Figure 4 shows this alternativeway 10 define and map exlernal DTD structure by using. attributes, It appears that elements and sub elements arebetter suited to an object-oriented approach while usingattributes is betler suited to a relational databaseperspective. Regardless, using either elements orattributes will produce a well-formed and valid XMLdocument when performing the UMUXML mappings.Generating the XML DocumentOoce the DTD iscreated, it may be inserted directly intothe XML document or referenced from within thedocument. Figure 5 shows part ia l codes for the XML

    32

    document that references an external DTD calledBidDTD.dtd.Mapping the MethodsAlthough Ihe example XML documents provide astructure for the reverse-auction data, they do not includeany methods for interacting with the data. Using the usecase and class diagrams, a combination of scriptinglanguages, such as Java Script and Active Server Pages,was used 10 implement the various methods that wouldallow the user to create, search, and update the auctionbids.

    DISCUSSIONUsing an actionresearch approach, this paper provides ameans for developing XML-based electronic businessapplications. From our experience, we found thatbuilding an XML-application requires more than just agood-working knowledge of Ihe lechnology. A processand technique for developing an accurate, real-worldabstraction is required to improve understanding andcommunication among the development leam. Although

    Journal of Informatics Education and Research

  • 8/7/2019 Mapping UML to XMl

    7/8

    FIGURE 4AN ATTRIBUTE-BASED DTD FROM THE MAPPED FROM THE CLASS DESIGNAccounting 2 3 3 - 7 3 7 ~ 2 3 2 3 < ; / J D]hune>233-737-760Ojsmitb@john_deer.comlOOI512312001 -Rubber$5,000 -

    Volume 4, Number 1 33

  • 8/7/2019 Mapping UML to XMl

    8/8

    this notion is commonly-held, the interesting lessonlearned was how wellUMLmodeling techniques map toXML.At the end of the project, the faculty coaches metseparately with the team and the John Deere sponsor.From the student's perspective, the use ofthe techniquesdescrihed in this paper provided much needed directionat a critical point in the project. In addition, the projectsponsor was extremely pleased with the quality of theapplication andwas anxious todemonstrate thesystemtoseveral key businessunitmanagers.The lessons learned from this project are based on a. collaborative effort hy the BlTTC coaches and studentteam memhers to solve an immediate problem at hand.Although noempirical evidence cansupport theseclaims,

    this paper documents the tools, processes, and mentalthought processes that were used. These same techniquesmay he replicated and generalized to the teaching ofsystems analysis and design-based classes and forpractitioners interested in developing XML-basedapplications. Therefore, the action research methodutilized in this paper shonld provide the heginning andfoundation for future empirical research that may lookatthe effectiveness of this approach in the classroomor byorganizations.Finally, the approach used by the project team utilizedonly two UML diagramming techniques. Other techniques, such as state-transition diagrams, interactiondiagrams, and so forth should also be considered andevaluated empirically.

    REFERENCESApplegate, L. M., Holsapple, C. W., Kalakota R.,Radermacher, F. J., and Whinston, A. B. (1996).

    "Electronc Commerce: Building Blocks of NewBusiness Opportunity." Journal ofOrganizationalComputing and Electronic Commerce 6(1): I-IO.

    Avison, D., Lau F., Neilsen, P. A., and Myers, M.(1999). "Action Research." Communications oftheACM 42(1): 94-97.

    Baburoglu, O.N. and Ravn I. (1992). "NormativeActionResearch." Organization Studies 13(1): 19-34.

    Booch, G., Rumbaugh, J., and Jacobson, I. (1999). TheUnified Modeling Language User GUide,Reading,Massachusetts: Addison-Wesley.

    Cunningham, M. J. (2001). How to Builda Profitable Ecommerce Strategy. Cambridge, MA: PersusPublishing.

    Dennis, A. and Haley, W. B (2000). Systems AnalysisandDesign: An AppliedApproach. NewYork: JohnWiley & Sons, Inc.

    34

    Fowler, M. and Scott K. (1997). UML Distilled:Applying the Standard Object Modeling Language.Reading, MA: Addison-Wesley.

    Gibb, F., O'Donnell R., and Leon, R. (2000). ' 'TheIntegration of Information Retrieval TechniquesWithin a Software Reuse Environment.' Journal ofInformation Sciences 26(4): 211-226.

    Gottesman, B. Z. (1998). "Why XML Matters." PCMagazine: 217-238.

    Rapoport, R. N. (1970). ' 'Three Dilemmas in ActionResearch."Human Relations 23(4): 499-513.Satzinger, J. W. and Orvik, T. V. (2001). The Object

    orientedApproach: Concepts, System Developmentand Modeling with UML Boston, MA: CourseTechnology.

    Siau, K. and Cao, Q. (2001). "Unified ModelingLanguage (UML)-A Complexity Analysis."Journal ofDatabase Management 12(1): 26-34.

    Journal ofInformatics Education and Research