Hi all.

I have pushed in the 'model' branch a proposal for the velocity-tools-model submodule, which is a complete rewrite of my good old Velosurf library.

The rationale is to be able to define and expose a model to the view layer:

 - the model definition gathers entities and their attributes (which are sql queries)  - you can start with an empty model and let it reverse enginer all/specific tables, columns and joins in a schema
 - attributes type is either scalar (string/number...), row or rowset
 - the main idea is to be able to write thinks like: $book.publisher.address.zip or #foreach($author.books)  - the Java API lets you write thinks like: Instance book = model.getEntity("book").fetch(1); book.set("title", "foo"); book.update();  - you can provide your own POJOs for the instances of each entity, whose getters and setters will automatically be called  - the VTL objects are wrappers around the Model, Entity and Instance objects
 - the way SQL objects and values are mapped is highly configurable

For those of you who would like to take a look at it, while waiting for a more elaborate documentation, here are some links:

 - example configuration : https://s.apache.org/AWmN

 - example model definition : https://s.apache.org/Y14w

 - source code in svn viewvc : https://s.apache.org/oFJY

 - javadoc (still quite empty) : https://velocity.apache.org/tools/model/apidocs/

There is still a lot of documentation and tests to write, but it is already functional.

Of couse, every feedback is welcome.


  Claude



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to