I spent lunch with Patrick Korte, Steven Phillips, Toby Schau, and Nick Parker discussing business rules, validation, controllers and my general dislike for web projects over some great cafeteria pizza (I'm jealous).
This discussion started after our last Iowa .NET user group meeting and a deep discussion about validation and Rocky's CSLA.NET business object framework and how each of use were handling this problem.
My main issue is how to manage validation based on the context of the object. My behavior is different in a bar on a Friday night from my behavior at work. My context determines if my behavior is “valid”. Should each of these contexts have it's own derived class? I'm afraid of a potential class explosion.
Another issue is how to manage cross object validation. This is when one object needs data from another object to determine if the object is valid.
We discussed the possiblity of managing the context/cross object validation problem via controllers/collaborators that act on the domain objects. Some expressed concerns about the class explosion happening to the controllers.
Guys, what else did forget?
I'm looking forward to our next discussion
No comments:
Post a Comment