XML

Extending the Windows DNA Model

We've now looked at several possible configurations for the logical components, and we've identified several ways of building scalable systems. This is what creating a model is all about: providing a framework that you can use to find the best way to construct your system.

It's time to get to work molding and shaping the DNA model to see just how far we can go with it. To begin, let's combine the two scenarios described earlier into an order entry application that works over the Internet. The user services components can be HTML pages in a Web browser. We can place business services components on the client computer that performs the CRUD validation. We can also place business services components on the Web server that builds the Web pages.

Now let's really extend this model. Our goal is to get the fastest performance from the user services components. If you could move some of the data into the client's memory and then use this data in memory as a data source, you could eliminate several trips to the data services components and the database. This can be accomplished in several ways. When you are working with Visual Basic, the usual way of transferring data over to the client is by using a Microsoft ActiveX Data Objects (ADO) disconnected recordset. The ADO disconnected recordset maintains a virtual table in memory; it does not maintain a connection to the database, which is why the name is "disconnected recordset." The full range of CRUD operations can be performed on the ADO disconnected recordset without making any connection to the database. If any changes are to be made to the database, the disconnected recordset can be sent back to the data services component. The data services component will then perform the update with the database and correct any inconsistencies. (Correcting inconsistencies during updates is another function of the data services components.) With ADO disconnected recordsets, correcting inconsistencies can be done only within a component, not in a stored procedure.

NOTE
For an example of a Visual Basic DNA system that works with disconnected recordsets and for a detailed description of UML, see Visual Basic UML Design and Development (published by Wrox, 1999) by Jake Sturm.

There is another way of transferring data over to the client: by using XML. You can bring data over to the client in a Web application and create islands of XML data. This XML data can then be used as a local data source. If the user services components are HTML or XML applications running in Microsoft Internet Explorer 5, this will be fairly easy to do; the process is discussed in Chapter 13. If you use an XML data source on the client, you can also have business services components that communicate with the XML data source on the client. Communication with the middle-tier computers happens only when data needs to be retrieved or updated.

Summary

The Windows DNA architecture consists of a logical three-tier model and a physical three-tier model. These two models provide a framework that can be used to design and build your DNA systems. The models are extremely flexible and can be used for a wide range of systems.

In the next several chapters, we will look at how XML can be used in the three-tier model. You will learn how to create user, business, and data services components using XML. And you will learn how to use the BizTalk Server.