You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Rick Chevalier <ri...@flash.net> on 2001/06/05 07:45:15 UTC

New User

All,

I'm one of the newbies.  So forgive the ignorance in advance.

I'm trying to find the right tools for my application development effort.
I'm developing a web interface application for database table
browse/insert/update/delete maintenance.  I need to provide dynamic html
selections of the tables based on user login.  The security tools in Turbine
and Velocity seem to be the right way to go.  Maybe it's a bit overkill.
The application is not that difficult and the prototype was built with
servlets and JSP using JDBC.  Should I go ahead and redo the development?

I'm a bit confused on how to generate the "forms" that display the database
rows for editing using Velocity.  I've just installed the TDK and am going
through the NEWAPP example.  There are so many offerings from Jakarta
(ECS,TAGLIBS,COCOON....) that I'm finding it hard to pick a direction.

Any experiences or suggestions would be appreciated.

Thanks
Rick




Re: New User

Posted by Leon Messerschmidt <le...@opticode.co.za>.
> All,
>
> I'm one of the newbies.  So forgive the ignorance in advance.
>
> I'm trying to find the right tools for my application development effort.
> I'm developing a web interface application for database table
> browse/insert/update/delete maintenance.  I need to provide dynamic html
> selections of the tables based on user login.  The security tools in
Turbine
> and Velocity seem to be the right way to go.  Maybe it's a bit overkill.

There aren't any security in Velocity, only in Turbine.  Velocity is a text
templating engine and Turbine is a web framework that uses Velocity for html
templates.

Turbine often seems like overkill to newbies, but web applications tend to
grow quicker than you think, and it is nice to have Turbine's repository of
useful code ready as soon as you need it.

> The application is not that difficult and the prototype was built with
> servlets and JSP using JDBC.  Should I go ahead and redo the development?

It depends on what you want to achieve.  If you're looking for a long term
extensible solution Turbine will do that for you.  To me JSP feels a bit
like C++.  You _can_ write good code, but if you're not incredibly
self-disciplined the code will come back to bite you.  Many people disagree,
but on this list I'm save :-)

> I'm a bit confused on how to generate the "forms" that display the
database
> rows for editing using Velocity.  I've just installed the TDK and am going
> through the NEWAPP example.

Once again Velocity is only a templating engine.  It can only create output
for you when you combine a template with stuff that you've added to the
context.  Turbine (the web framework) helps a bit with stuff like this.

In your Turbine screen (see the TDK) you need to add enough information to
the context so that you can generate the necessary html with Velocity.  If
the Velocity template aren't fairly simple you probably need to rethink the
objects which you are adding to the context.  Velocity works well with
objects that implements List and objects that expose bean-like properties.
Raw JDBC ResultSets will probably not work all that well, but it could be
done.

Turbine uses a database abstraction layer called Peers.  I can't remember if
there was an example in the TDK, but I think there is.  You need to use
Torque (a Turbine db tool) to create your database schema and
object-relational classes.  These java classes allows for excellent use in
the Velocity context.  Unfortunately it cannot be updated dynamically (you
need to recompile after a change in database schema).  I suppose that this
is not perfect for your scenario.

> There are so many offerings from Jakarta
> (ECS,TAGLIBS,COCOON....) that I'm finding it hard to pick a direction.

With ECS you generate HTML tags with java source-code.  It is a different
approach than that of Velocity, and for web applications I feel that
Velocity is better.

I know to little about Taglibs and Cocoon to say anything useful.

> Any experiences or suggestions would be appreciated.

Turbine is a very flexible framework.  There are many services from which
you can choose, but it also easy to add your own.

> Thanks
> Rick

~ Leon