I'm new to Jboss and Patterns. I was reading the 'Core J2EE patterns' book (great book!), and I have a question:
Where should I put my attributes validation (like InvoiceDate > today, etc..)...?
I can put it in the presentation level (on the validate() function of struts, for example). But I need to put it on the server-level. I don´t know where.. Maybe on facade, on a session bean, etc..
Anyone can help me, please?
Carlos Augusto Grahl
It's probably better to put validation in with your "business logic" rather than with whatever you're using to persist the data -- makes it easier to change the business rules for validation.