XML Vocabulary Model From xCBL Schema
This very small subset of xCBL shows a reusable Identifier model and its use in the TradingPartnerOrganizationHeader element definition.
As part of this reverse engineering, I gave careful attention to producing a UML model that emphasizes a platform-independent information model of this domain. This approach is aligned with the Model Driven Architecture initiative of the OMG (http://www.omg.org/mda), in which UML profiles or other model transformations are used to produce several alternative platform-specific models for implementation. For example, this one model might be used to generate both Java EJB and Microsoft.NET application classes, in addition to the XML schemas used for B2B exchange or application integration.
Designing Applications With XML
Many developers, myself included, are skeptical of the claim that you can fully generate complete business applications from UML models. Although this is an intriguing long-term goal, I'm not aware of any modeling tools that make it practical today (see "Executable Models are Inevitable," Sept. 2001). Modeling and generating the business logic and algorithms of execution are frequently the most difficult tasks, and it's often easier and faster to just write the code in Java or other implementation languages. UML is, however, very useful when modeling and generating the class structures and EJB or .NET framework implementation.
When it comes to XML schemas, I find that automatically generating them from UML is quite practical, as the schema describes static data structure and constraints, not fine-grained application logic. This object-oriented approach to schema design is new for some XML developers, who are accustomed to thinking about hierarchical grammars. Object-oriented models may not be a good fit for some text-oriented XML grammars, but, in most cases, I've found the mapping to be straightforward.
An additional benefit of automated schema generation is that it's relatively easy to apply a consistent set of best practices and schema design guidelines. The recently standardized W3C XML Schema language (www.w3.org/XML/Schema) includes many alternative representations, some of which are easy to misapply. Tricky areas include the use of global or local element declarations, single-inheritance extension and restriction, and XML attributes or child elements. There are also stylistic choices concerning when, or if, anonymous complex type declarations should be used. Many organizations and standards groups are creating specific guidelines on designing and writing their XML schemas. See, for example, design guidelines created by the OASIS Universal Business Language (UBL) committee at http://oasis-open.org/committees/ubl/ndrsc/.
One relevant standard that should contribute to these design guidelines is the OMG's XML Meta-data Interchange (XMI) specification. Many developers are familiar with XMI as the interchange format for UML models, but the specification is much more general. Although its name suggests that XMI is applicable only to meta-data, this specification includes production rules that can map almost any UML class model to a DTD or W3C XML Schema, which can be used to validate XML documents containing serialized object instances.
更多軟考資料請?jiān)L問:考試吧軟件水平考試欄目
希望與更多網(wǎng)友交流,請進(jìn)入考試吧軟件水平考試論壇
北京 | 天津 | 上海 | 江蘇 | 山東 |
安徽 | 浙江 | 江西 | 福建 | 深圳 |
廣東 | 河北 | 湖南 | 廣西 | 河南 |
海南 | 湖北 | 四川 | 重慶 | 云南 |
貴州 | 西藏 | 新疆 | 陜西 | 山西 |
寧夏 | 甘肅 | 青海 | 遼寧 | 吉林 |
黑龍江 | 內(nèi)蒙古 |