Acme Travel Agency Case Study

for RuBoard

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 serve as an intelligent cache.

for RuBoard


Application Development Using C# and .NET
Application Development Using C# and .NET
ISBN: 013093383X
EAN: 2147483647
Year: 2001
Pages: 158

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