In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you "how to use UML to design XML pattern", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use UML to design XML pattern" this article.
Designing XML patterns using UML
Unified Modeling language (UnifiedModelingLanguage,UML) is an industry standard that is used to model business concepts when building software systems in an object-oriented way. Recently, XML has increasingly become a key factor in the implementation of these systems in terms of information and command transmission. The XML pattern is used to define and limit the nature of the exchanged XML, so it has become the focus of attention. This article discusses the use of UML in designing XML patterns and provides a practical way to create a XML vocabulary using the UML framework.
There are three issues that must be considered when using the UML framework to construct XML schemas:
Complementarity between ◆ UML and XML modes
How ◆ extends the UML design to capture all the functionality provided in mode
◆ 's ability to design XML patterns based on UML diagrams
To help discuss these two frameworks in this article, I'll use a virtual company, BALTICShipping, as an example.
BALTICShipping is an international transportation company specializing in freight transportation from the United States to Eastern Europe. The company wants to create a mechanism to track shipments from its headquarters in New York to its branches, such as a branch in Tallinn, Estonia (see figure 1). When the product is shipped, the headquarters sends the information about the shipment in the form of XML electronically. Once the goods arrive at the destination, the branch will send the confirmation message back to the headquarters by electronic means.
All order and confirmation data are exchanged in the form of XML documents, and patterns must be designed to summarize the structure of the document. The business constructs used to model shipping orders are also used to exchange information with the inventory tracking system (InventoryTrackingSystem), which knows which boxes the company has to ship at all times. This article discussed the utility of using UML when constructing XML schemas, which define these business constructs for data transfer in XML format.
Figure 1.BALTICShipping Workflow
Supplementary framework
UML design and its object-oriented modeling can complement the construction of XML patterns. You can easily represent business concepts in graphical symbols in UML and start designing your XML schema.
The value of modeling
The discussion of the advantages of UML in creating XML schemas assumes that the value of object-oriented modeling is known. In my last article, "CreateflexibleandextensibleXMLschemas," I discussed the importance and value of building XML schemas using object-oriented methods. In addition to the technical advantages of designing object-oriented systems using UML, UML also provides a common medium through which business and technical teams can easily exchange views. Business analysts are key collaborators in software systems, especially those that contain domain-specific information. Because business analysts are involved in the process of designing XML documents, tacit cooperation between software architects and business analysts becomes very important for the success of the project. UML's graphical symbols make it easy for technicians and non-technicians to agree on business concepts such as the definition of ShippingOrder, thus accelerating and facilitating project completion.
Complement each other
Imagine that the business manager of BALTICShipping comes to you and asks you to model an XML pattern that formalizes the information transferred between different systems within the company. He sat down with you to discuss business concepts in this area. You can draw some sketches on paper, but UML designs use diagrams and symbols to provide a better formal way to model these concepts.
The business definition of ShippingOrder is outlined in the UML diagram in figure 2. BALTICShipping defines ShippingOrder as containing ShippingId, Origin, Destination, and Order. Whenever any data about ShippingOrder is exchanged, it takes into account the necessary information. In addition, UML diagrams are also used to represent the contents that make up Origin or Order. The type of Origin and Destination displayed is the same as the type Address, and BALTICShipping stores Address:Name, Street, City, and Country with the following characteristics in its database. These are business concepts that are used in database models, software programs, and documents for managers and business partners to read. These concepts also include cardinality (Order can contain many Item), inheritance (Origin inherits all the characteristics of Address), and dependencies (Order depends on the details of its Item); all of these relationships are captured by UML diagrams. Because you want your XML document to carry ShippingOrder information, the next step is to design an XML schema that conforms to the draft UML diagram. The following pattern represents the mapping of the UML diagram (see figure 2) to the XML schema.
In the UML diagram (see figure 2), Address is an abstract type, and the word "Address" is written in italics to indicate that it is abstract. Types Origin and Destination inherit the features Name, Street, City, and Country from Address. Creating blueprints for reusable types is considered a good object-oriented design. In the XML schema (see listing 2), I have specified the type Address as an abstract type by using the keyword abstract= "true". The types Origin and Destination mimic the design I originally sketched in the UML design diagram, and here I use extensionbase= "Address" to show that they inherit the characteristics of Address. In addition, I have captured a business model: by using the code type= "Item" maxOccurs= "unbounded", Order can contain many Item.
If you design the XML schema from scratch, it will be difficult to write down object types using only XML. In addition, it is almost impossible to explain them to business managers who are not familiar with the terminology of XML schemas. According to the UML diagram, you can effectively transform the company's business concepts and then use the visual representation in front of you to create XML schemas. The following is an example document generated using the schema you created for a batch of strawberry jam shipped from New York to Tallinn.
The above is all the content of the article "how to use UML to design XML patterns". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.