[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-user
Subject: RE: Velocity + Database [long]
From: Dave Newton <dave () solaraccess ! com>
Date: 2003-08-07 21:51:52
[Download RAW message or body]
On Thu, 2003-08-07 at 16:59, Aaron Freeman wrote:
> > So, more or less, you want to be able to execute SQL by defining SQL
> > statements attached to methods in an XML file?
>
> Yes, I think that sums it up succinctly.
>
> > I don't recall the classname now but there's something that will take a
> > result set and wrap it up providing named accessors to fields
> > (beanutil's RowSetDynaClass?)... Seems like tweaking some of that with
> > an XML parser for your config file and a java class generator might be
> > enough to solve the problem in a relatively easy way.
>
> In this scenario is the generator used on the fly or only at compile time?
Well, I'm not sure that it really matters. Obviously compile-time would
be easier 'cuz you could just translate straight from the XML into .java
files, but you could do it dynamically if you wanted I reckon.
Also, just to be pathological, what if you switch to a system where
something that doesn't use SQL is being used to persist data? While
creating ad-hoc queries using the object model should still work the SQL
bits wouldn't unless translated somehow.
I think allowing unfettered access to a backing store breaks MVC on a
fairly fundamental level but I could be over-reacting :)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic