From Business Process to Online SolutionsUsing XML Schemas as the Central Component for Rapid Application
Development
ABSTRACT
We examine challenges encountered in designing, developing and deploying e-business applications and show how the use of XML schemas as a central point for encapsulating data structures, business logic and presentational semantics is a better approach.
Table of Contents
1. Introduction
In less than 10 years the Internet has gone from being an obscure means of sharing data between academics and researchers to a global phenomenon, creating a new industry, numerous new professions and millions of jobs globally. Despite the current challenges the industry is facing as the financial markets correct the previous hype-bubble - a common occurrence with any new technology - nobody doubts that the Web has brought about lasting change and will continue to do so. What many people are now realizing is that the pace of technological development seems to be outstripping our ability to integrate many of the new possibilities into the way we work, live, and play. This is a new phenomenon brought about by the rapid development of Internet technologies. For instance, everybody sees the potential that the Internet offers for distributing digital content. Music, compressed in the MP3 format, is a good example for this, as the recent controversy over Napster has shown. While it is technically quite feasible to distribute music efficiently (perhaps too efficiently) over the Web, many are struggling with developing and implementing a business model that takes the interests of all parties into account and provides adequate protection against copyright infringement. The resulting disconnect between what is technically possible and what is desirable and possible from a business viewpoint presents a serious hurdle. Another, perhaps more significant example are e-marketplaces. It should be clear to anyone that moving the value chain of an industry online and thus facilitating the tight integration of supply chain management, to the point of collaborative supply chains, promises great gains. The technology is available, in the form of e-marketplace and SCM software, a global hardware infrastructure, and powerful standards such as XML. Once again, the greatest challenge is not technology, but adapting business processes and revenue models. Clearly, these issues will sort themselves out in due time, considering the number of very bright people working hard to make this happen and the significant financial rewards that are at stake.
One of the fundamental problems we see the industry currently confronted with is that current Web application development methods are cumbersome, inefficient, and result in applications that miss the mark and are inherently difficult to extend or maintain. Currently employed processes for application development are needlessly fragmented and lead to situations where solution development involves teams of differing skill sets in a recurring sequential pattern. This approach is inefficient, and requires significant overhead for coordination, project direction, testing, etc. In an e-business project of any significance, legions of business analysts spend countless hours learning about a client's business processes by interviewing managers and workers. This is necessary because they must model said processes in a way that programmers understand and can then develop the needed applications. These programmers must then pass on requirements to special database designers who design and develop back-end data repositories or map to existing ones. Finally, graphic designers will spend countless hours developing graphical user interfaces, which other developers will then turn into specific templates, one for each type of screen used in the application. An initial prototype is then built and presented to the users who originally helped the analysts model the processes, only to discover that many requirements were captured and fulfilled either inadequately, or not at all. Hence, the cycle begins anew until, after several iterations, the application is ready to be launched. How much easier - not to mention faster and less expensive - would things be if there were a way to empower the actual users to model the needed application in a graphical environment, generate comprehensive data models from this, and drive database and front-end development from these data models? After all, most e-business application in the B2B space are generally made up of four major components: application workflow, data input or reporting forms, back-end data sources and repositories, and a GUI front-end. Visual design tools that are suitable for business users exist more or less for all of these areas. The problem is that these tools use different data formats and are thus largely incompatible with one another. Our vision is to enable an integrated visual environment that empowers business users to do much of the initial analysis, aided by their intimate knowledge of their organization's processes, model the desired application complete with workflow and input/output forms and then push-button publish the business applications.
At the heart of this vision are XML schemas, which represent a truly revolutionary innovation. Some might protest that the concept of schemas has been around for decades, in the form of Document Type Definitions (DTDs) in SGML and then XML. After all, both describe the structure of a family of documents in a similar way. The difference is subtle, but of tremendous importance: schemas are far more expressive than DTDs and are focused on describing data, not documents. This allows them to serve as the basis for an entire application infrastructure.
2. XML Schemas as the Universal Model
Of course, there is no lack of past efforts to establish a universal modelling language that solves these problems by mapping all of the different components of an application into a single unified model.
Object-oriented programming languages provide one plausible option. Their modelling capabilities are quite robust, and many tools exist to map classes into database tables automatically. There is less evidence of serious efforts to generate user interfaces based on C++ or Java classes, but the web application model provides a better framework for doing this than the more traditional desktop GUI, so tools of this type are now beginning to gain in prominence. The main flaw of this approach is that it is by definition tied to a single programming language. Real-world applications tend to combine different components in different languages, so it makes sense to choose an abstraction that is programming-language independent. In addition, OO-programming languages are a far cry from being accessible to the average business user.
Other possibilities, such as the OMG's CORBA Interface Definition Language (IDL) and Universal Modelling Language (UML) avoid this trap by offering a language designed specifically for modelling, not programming. The idea is that a generalized model can be used to generate code for the various application layers (data sources and application server) automatically, while maintaining the model itself in one centralized location. Once again, there is less precedent for generating the user interface directly from an IDL or UML model, but as with programming language-based models this likely has more to do with the fact that this is simply too difficult to do well with traditional GUIs, and that web interfaces are a relatively new innovation.
Nevertheless, XML schemas are a better choice for a universal modelling language, for several reasons:
-
XML is being adopted as the common format for online business interactions. Perhaps CORBA aspired to this role at one point, but in reality CORBA adoption has not been sufficiently widespread, and it is rarely used for intercompany communication. Companies are forced to create XML schemas anyway if they want to participate in e-business, so it makes sense to use these schemas for application modelling as well.
-
By using XML schemas, significant synergies can be gained with other important XML-related standards such as XSL, XLink and XHTML. For example, visual XSL editors can use XML schemas to drive stylesheet creation; this is easier to do than with another kind of model since XML schema and XSL map into the same XML-based constructs (element, attributes, etc.).
-
The syntax of XML schemas is itself an XML-based language. This means that standard XML tools can be used to manipulate XML schemas. The resulting reflexivity is extremely powerful; for example, a database mapping layer that knows how to store XML documents in a relational database can also be used to store the schema itself.
-
XML schemas provide robust modelling capabilities and are extensible. Java, C++ and IDL are all limited in one way or another in terms of the expressiveness of their models. Metadata associated with an attribute in a class or interface is restricted to a small set of keywords defined in the language. Schemas, on the other hand, lend themselves to open metadata frameworks that let the modeller associate arbitrary metadata with a given element or attribute; Extensibility's Schema Adjunct Framework (SAF) is an excellent example of how this can be accomplished.
3. Developing an Application with XML Schemas
All this sounds great in theory. But can we actually build a real-world application using XML schemas? More importantly, could it be possible to empower business users to model processes, application workflow, and schemas and then create the needed application from these models with minimal additional effort? With the right tools, we believe the answer to be a resounding yes! Three important sets of tools are needed to create a complete XML schema-based application, corresponding to the three main application layers.
4. Application Workflow and Business Logic Modelling
The first step is to provide the analyst with a powerful visual design environment with which to model the intended applications workflow and associated input and reporting forms. Both should be modelled in an intuitive visual environment and the results can be expressed using XML schemas. Rational Software's Rational Rose offers some glimpses of how this can be done and there is currently much interest in UML modelling tools that can output results as XML schemas.
At the application-server level, different technologies can be used to manipulate the XML data streams. In some cases, XML-specific APIs such as SAX and DOM are appropriate. In others, language-specific components like JavaBeans can be generated from the XML schemas and used as normal objects in Java or C++ code. Exolab's Castor, Commerce One's XDK and IBM's XML BeanMaker are examples of this approach.
5. Database Modelling and Mapping
Ideally, relational database schemas should be generated directly from the XML schemas. This is a relatively (although not entirely) straightforward process supported by a lot of previous work in object-relational mapping technology. Unfortunately, in many cases new web applications must interface with existing database schemas, so it must also be possible to map existing relational schemas into XML schemas. This is significantly harder, since the choice of relational schema was obviously not influenced originally by the need to work in an XML schema-based architecture. But it is definitely feasible with sufficient effort, and can be automated to a large extent. Certainly it is as good as any alternative; no one is suggesting that two-dimensional tables be used to model application architectures!
As time goes on, interfacing to databases and other data sources will become increasingly painless. Many database vendors, including Oracle and Microsoft, are schema-enabling their database engines. Eventually, it will be possible to converse with the leading relational database systems natively in XML. B2B integration software already exists to put XML interfaces on top of legacy databases and ERP systems. Other content providers are starting to offer XML interfaces: Yahoo, for example, can send stock quotes as an XML document. And if alternative approaches such as object-oriented databases or XML databases take hold, this architecture is perfectly placed to gain maximum benefit.
6. Dynamic GUI Generation
At the GUI level, visual components such as forms and reports can be generated automatically from schema information. This is hugely beneficial in terms of application development time and application maintenance. If an application needs to work with a specific type of data structure, say an invoice, the schema for that invoice can be used to generate an input form for the invoice, without the need to painstakingly code the specific structure of the form into HTML by hand. The final output is married with a generic XSLT stylesheet to provide customized GUI, allowing for efficient application syndication while still permitting effective branding to protect distinct corporate identities. The benefits are even greater as the application evolves; changes to the centralized schemas result in instant updates to the application pages, without the need to scour vast numbers of templates by hand. This approach is at the heart of the Schemantix XMLForms system.
It is primarily at the user interface level that previous approaches to automating application development have failed. Specific aspects of the web application paradigm make XML schema-driven GUI generation far more promising. Because user interfaces are driven by HTML (and other markup languages), page layout is managed to a large extent by the browser on the client machine. It is relatively easy to create attractive user interfaces through the use of XML, XML Stylesheets (XSL) and HTML. In particular, the use of stylesheets keeps the specifics of application presentation separate from application logic, facilitating reuse.
7. Advantages of Schema-Based Development
Any new approach that speeds the development of robust web applications is bound to be welcome. The quantum leap that can be achieved through the use of XML schemas is nothing short of revolutionary. Many of the benefits are directly related to specific innovations, such as HTML-based web applications, XML-driven e-commerce and XML schemas, while others arise through subtle interactions between these and other factors.
One obvious advantage is the high level of component reusability. Data structures are represented using XML schemas. Application workflow and logic are modelled using schemas, then implemented on the application server and bound to the database schema aided by schema extensions. If a new application (or another part of the existing application) needs this data and logic, it can access it directly by reusing the schema to drive interaction with the user interface and database. There is no need to write completely new user interface or database mapping code.
This approach is also extremely flexible. The same application can be provided with a new look-and-feel simply by swapping out the stylesheets used. In the same way, additional non-PC devices such as TV set-top boxes and mobile phones can become clients of exactly the same application through the use of a different stylesheet. Internationalization is also greatly facilitated, since the text in the user interface is generated from schemas and can therefore be easily translated.
As XML becomes increasingly popular, the ability to process XML data streams natively will also be of great value. Schema libraries like those of BizTalk, RosettaNet and ebXML represent a concerted effort on the part of industry consortia to create standards for e-business interactions. Because the results of this work are in the form of XML schemas, they can be used to automate the creation of complete applications if the application architecture is also based on schemas. And since the architecture expects to receive and send data as XML, it can be plugged directly into the growing XML infrastructure.
Finally, this approach offers great advantages in terms of maintainability. This is one of the principal problems with current template-based methods for web application development. Changes to any part of the architecture can impact many application screens, making it nearly impossible to ensure coherency in large applications. This implies that a lot of programmer time must be invested in ensuring that the application is running correctly, rather than in implementing new features. With a schema-based approach, XML schemas serve as a central point of maintenance, greatly reducing the effort needed to update the application as it evolves.
8. Conclusion
The ideas and concepts presented in this paper are clearly quite forward looking and many of the tools and concepts described herein have yet to be fully developed and brought to market. One of the greatest promises offered by tomorrow's business Internet, however, is that it may directly empower business managers intent on increasing the efficiency of their operations by moving their business processes online quickly and effectively. The rapid pace at which we have seen Internet technologies develop over the past five years threatens to outstrip business's ability to react in a timely manner using current development methods. By leveraging the inherent power of XML schemas not only as the central point of control for data structures, but also for modelling and encapsulating other application critical aspects and then dynamically generating the application front-end from said schemas, applications that are inherently flexible and extensible can be built quickly and effectively.


