Antonio Gallardo wrote:
> Hi Christopher:
>
> I think that the point they tried to show us is that the database
> functions can be an optional part of all the Flow block. I agree because
> some applications will not need to use databases at all.
>
Yes, clearly, that is the case. However, there isn't yet a mechanism for
creating "JavaScript" blocks - and you can't solve everything at once.
The problem I was trying to address is this: why do people choose to use
ESQL or JSTL for database processing, rather than writing JDBC code in
their server pages? Well, because it's _easier_. So, in my opinion, we
will need an equally easy-to-use API to convince those people to use the
flow layer. I've had first-hand experience in my regular job of a wide
range of people finding JDBC very unfriendly. And for such people
Hibernate or OJB as a solution isn't going to seem much friendlier.
That's it.
Anyway, I've moved getConnection() off of the "cocoon" object and placed
it in a new "Database" object, so now you should do this to create a
connection:
var conn = Database.getConnection(dataSourceName);
Regards,
Chris
|