Rapid Application Development Hits Web with Windows DNA

Editor’s Note: ENT’s access to Windows DNA came from a Microsoft Corp. training session for the press and analysts.

NEW YORK -- If the popular belief is true that Microsoft Corp. initially missed the boat on the Internet, then Windows DNA is the battleship Microsoft hopes will propel the company past the competition. Using a three-tiered architecture, Windows DNA encompasses the tools, developer services, and database products that Microsoft offers for building Web-based applications that use distributed components and scalable databases.

At a hands-on Windows DNA lab sponsored by Microsoft, we were given a simple project: make a Web-based flight reservation page that also stores a passenger’s food preference. On the front end, one server ran Internet Information Services 5.0 and Active Server Pages (ASPs); on the back end there were two servers, each with Windows 2000 Server with SQL Server 7.0. One SQL Server database held flight reservations, another housed food preferences.

We used Visual InterDev to edit the ASPs; Visual Basic (VB) to edit the component source code; Component Services -- which is Microsoft Transaction Server Explorer in NT 4.0 -- to view the properties of the components, see the components run, and get transaction statistics; Computer Management or MSMQ Explorer to see messages sent to the queue; and SQL Server 7.0 Enterprise Manager to change attributes to the database.

We placed a reservation with the Web application that was displayed on the ASP. When we booked the flight, the ASP used HTTP to call two VB components that resided in COM+ that used ActiveX Data Objects 2.5 (ADO) to add new data to two databases. Although two components were being called, it was set up as one "atomic" unit so the entire operation would either succeed or fail.

Once the order was sent, a confirmation page came up with our order number. When we updated the tables in Visual InterDev, we could see the tables -- one for reservations and the other for food preference -- now included information from the new reservation.

To test the system, we unplugged the food preference database and booked a new flight. The browser brought back an error message. When we updated the tables in Visual InterDev, the reservation table had data for a new passenger, but the food preferences table did not – creating an unbalanced system.

This is where transactions enter the picture. A transaction is an action or series of actions that transform the system from one consistent state to another. The first type of transaction we attempted was for "atomicity," an all-or-nothing transaction that rolls back all actions if any one part isn't successful. To do this, we used Visual InterDev and VB to change the properties on the ASP and its components to require a transaction.

When we went tried to book another flight, the page failed again. This time, when we went into Visual InterDev and checked the database tables, neither one accepted any data, meaning the entire transaction was rolled back because one action failed. All told, only four lines of code and COM+ made this possible.

Keeping the food preferences database offline, we wanted the Windows DNA application to handle a situation where one or more resources are unavailable, but still have the transaction completed. This required using Microsoft Message Queue. We used the same ASP, except it supported MSMQ. We booked the flight and received a confirmation this time.

When we refreshed the tables in Visual InterDev, there was a new flight reservation but no corresponding food reservation. This is not an unbalanced system, however. The application sent a message representing the required field of the food database into a message queue. We then went into the Computer Management console and into the message folder. A check of our message showed the data had been stored in XML.

We restarted our food preference database and ran Microsoft’s RcvMSMQ application, which checks the queue for new entries and updates the database. The next time we checked the food preference table it was updated with the information from the queue.

While this lab was done using all Microsoft technology, the company insists there is a lot of mix-and-match capabilities in Windows DNA, allowing for other ODBC-compliant databases and other programming languages.

We were not able to test Microsoft’s assurances, but it seems doubtful that using non-Microsoft products would be easy. Windows DNA is all about Windows and COM.

One problem acknowledged by Michael Risse, a member of the Microsoft Windows DNA team, is that COM won't go through a firewall until Microsoft finishes its single object access protocol (SOAP). So making Windows technology synonymous with Internet technology may not be the best idea.

Must Read Articles