German Buela
Member since Dec 11, 2008
- Profile: /members/1125-german-buela.htm
- Comments: 4
Recent Blog Comments By German Buela
-
Exercise List: Multi-Tier Validation Requirements
Posted on Nov 16, 2007 at 8:53 AM
You may be starting to build your own validation framework as a sort of cross-cutting ("vertical") layer. Sounds like a big deal but it shouldn't be much more than a bag of messages where any layer can add something. The controller would take care of initializing it and handling it (if it finds it d... read more »
-
Exercise List: More Thoughts On Domain Data Validation
Posted on Nov 16, 2007 at 7:24 AM
Ben, To your first question: yes, that's how I'd do it. That's where I'd draw the line. This decision takes into account the facts that the situation is extremely unlikely, and that it can be very tricky trying to sort out what exactly happened at the SQL level. You can still make an effort to handl... read more »
-
Exercise List: More Thoughts On Domain Data Validation
Posted on Nov 15, 2007 at 6:16 PM
I'm actually a Java guy, so this code looks a bit weird to me :) Anyway, I believe it's common practice to catch DB exceptions, react, and rethrow them as DAOException, PersistanceException or something like that, so that the app needs not know about specific exceptions thrown by the data access lib... read more »
-
Exercise List: More Thoughts On Domain Data Validation
Posted on Nov 15, 2007 at 9:34 AM
Hi, Besides whether Save() is the right place to make your validations, I'm not comfortable with the point you make about issues detected at the DB level. Your DB constraints are part of your business logic. Take the case of the primary key. Your model "knows" about the object's id, so it (or the se... read more »