Ryan Sonnek wrote:
> I don't want to sound like a databinder basher, 

Oh I hope not, I was just about to link to your post and say nice things!

> In my opinion, database access should be abstracted away from the UI
> layer altogether, which leaves the goals of databinder
> questionable.  Does anyone remember the horror of the JSP tags that
> directly connected to datbases??  Spring integration is a much more
> desirable location for database access, and there  is already
> excellent spring integration with wicket.

The way that a Databinder application works has little in common with 
any JSP horror; as in all Wicket applications the page templates contain 
no executable code and refer only to user interface components.

The coupling to the database in page templates, such as it is, is in the 
wicket:id of those components. But that is a Wicket innovation, the 
CompoundPropertyModel handling the common base case of components 
referring to property names of bound objects (and so table columns). 
You'll see (and must have seen) the same coupling in Wicket applications 
that use Spring or anything else, because it saves a ton of time and 
redundant code. And as much as you want to or need to, you can manually 
bind components to any object and field in any Wicket application, 
including one that uses Databinder.

Where Databinder is unconventional is not in the templates or anything 
that might relate to the JSP dead horse; it is that the view components 
themselves encourage the direct use of Hibernate. This also saves a ton 
of code and time, but it violates the widespread belief that grown-up 
Java applications must have hand-coded database layers. For me, 
Hibernate itself is the only layer I require between most UI components 
and the database. And I'm not about to encourage users to do extra work 
(that I wouldn't do) just to fit a traditional Java architecture 
diagram. (Elsewhere, writing ActiveRecord db code in Rails's uninspired 
view controllers seems pretty "desirable" to people.)

But there's plenty of room to disagree on that point, and I realize my 
position is still very much the minority in Java circles. I just thought 
I should explain it in response. (No further debate from this corner.)

As for the validation configurator, I'm trilled to have it at my 
disposal! Yes it's something I thought about doing inside Databinder 
(the list is very long, and items are rarely crossed off), but it makes 
no differences to me if things are inside or outside, as long as they 
work well. Expect it to see some action in the Databinder examples. 
(Whenever I wrap up the next version, which Wicket 1.3's trials and 
travails have allowed me to procrastinate doing for far too long.)

And thank you for contributing to the world of Wicket programming.

Nathan


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to