July 23, 2004

Object Oriented Design Decisions

Which way is better?

// Static method
Hotel hotel = Hotel.Find("NYC0010");

// Helper object
IHotelManager manager = HotelManagerFactory.Create();
Hotel resort = manager.Find("NYC0010");

Assume the data on all hotels lives in a database.
How do you initialize the connection string?
Where does the data access code live?
Regardless of which method you choose how do you save the hotel back to the database once you've modified it?

Posted by Christian at July 23, 2004 05:34 PM |
Comments
Post a comment