On 6/8/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
On Thu, June 8, 2006 2:12 pm, Craig McClanahan wrote:
> * Enhance the user experience by catching errors as quickly
> as possible (ideally client side in a webapp), with error messages that
> are relevant to the user's context in that particular application.
Absolutely agree.
> * Minimize the number of times I need to specify the same
> validation in source code, metadata, or whatever. Ideally, every
> such requirement should be stated exactly once.
Absolutely agree.
So your argument is basically that database roundtrips will degrade
performance. This should not (ideally) bother an application
developer. A framework should care about that. Metadata retrieval, its
caching, converting metadata to validation rules, combining these
rules with custom rules, this should be performed by a framework. If
database has already defined the rules, they should be used. Whether
it is database itself, or in DAO, or on business layer, or by
validator - does not matter for me as an application developer. But I
don't want to repeat the same rules again and again.On the other hand
I want to be able to add/modify/hide rules or object relationships.
These tasks have been implemented and reimplemented so many times by
many framework/tool developers (not only for Java) that I wonder why
it took 8 years or so for JSR 299 to appear. Still, EJBs as they are
defined now, do not automatically pull and use database metadata (or
do they? I should check out EJB 3.0 spec). So I will be able to use
EJBs as backing beans. BFD. Unless I use several databases or design a
clustered system, I am not tempted to use EJBs at all. If EJB
penetrated deeper in database metadata, then I would have a better
incentive to use them (again, have to check the spec. Maybe it already
does what I want).
I'm still not sold on the whole concept of annotations myself... it seems
to encourage scattering things throughout the code base that otherwise
would be centralized.
Check out Stripes, great stuff.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]