Hi there!
I'm an old school classic asp developer making the switch to .NET and I'm investigating this framework. I'm reading the book now and I'm starting to grasp the concept of making my object behavior driven rather than data driven. If I could outline a short scenario and how I'm thinking it would work in this construct, I'd appreciate some feedback.
Consider an auction application. There are ITEMS, CUSTOMERS and BIDS. Customers place bids on items, there's some business logic to determine if the bid is the high bid etc... Cool...easy enough. ITEMS would be parent to BIDS, and all the behaviors of placing bids would be contained in the CUSTOMER object. The business logic concerning if the bid is valid (ie, meets the rules) would be countained in the BID object.
Am I close or on another planet?
Ryan
Hi Ryan,
Your BOs should be about the activity, rather than the data as your first comment states. However the implementation is reverting back to data driven. (I still do that sometimes). So a sample BO would be PlaceBid. BOs like customer or Item would enable the editing of the Customer or Item only. Bid as a BO may not even be necessary depending on the situation. The business logic (rules etc) are related to the activity of placing a bid not the bid itself. In the data storage side your would have the item, customer and bids etc.
Hope that helps
Ellie
Copyright (c) Marimer LLC