Acme Travel Agency Case Study

Team-Fly    

 
Application Development Using Visual Basic and .NET
By Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
Table of Contents
Chapter 13.  Programming with ADO.NET


At this point we have covered more than enough material for you to understand the database version of the Customer and HotelBroker objects in the case study. As usual, the code is in the CaseStudy directory for this chapter.

Since there will never be any reason for the Customer object to hold any state, the Customer object methods use SqlDataReader to access the database and return the results. Any state that a program might need (i.e., a list of customers) could easily be maintained in the client program and not in a middle- tier object.

The HotelBroker and HotelBookings objects are a little more complicated. As mentioned earlier, for pedagogical reasons alone, these objects would have been implemented using a DataSet to show you how that technology would work in an application.

Nonetheless, we will see that with Web applications there might be a reason to keep some state in the middle tier. In that scenario the DataSet can server as an intelligent cache.


Team-Fly    
Top
 


Application Development Using Visual BasicR and .NET
Application Development Using Visual BasicR and .NET
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 190

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net