velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <d...@solaraccess.com>
Subject RE: Velocity + Database [long]
Date Thu, 07 Aug 2003 21:51:52 GMT
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



Mime
View raw message