Stefano Mazzocchi <[EMAIL PROTECTED]> wrote:

<big snip/>

> 
> Why? well, everybody knows that writing SQL into your code is 
> bad since 
> it ties you to your database. Adding SQL and javascript is a 
> potentially 
> incredible RAD tool, but it's potentially horrible down the road, 
> requiring huge maintenance costs to operate.
> 

This may seem strange coming from me given that I've previously argued that
I don't want to use JavaScript for flow, but I'd have to disagree a
little...  (Background: once upon a time I was stuck on a MS ASP server with
no other app server support, instead of writing VB I used JavaScript for
everything.)

As has already been said, the issue isn't combining SQL and JavaScript, the
issue is mixing database access in the flow layer.  What you really want is
some clean architectural way to ensure that presentation is separate from
presentation flow; presentation flow is separate from work flow; work flow
is separate from business logic; business logic is separate from database
logic; etc. etc...  (There is of course no real clear separation between
each of these: one persons business logic is another persons presentation
logic, but you want a model that tries to encourage people to keep things as
separate as possible.) However, given that; it should be possible for people
to write the logic for each layer in whatever language they want, be that
Java, JavaScript,  XSLT or whatever...

So what's the answer?  I'm not sure; but it suggests that there is some
meta-controller layer for Cocoon that can dispatch each "layer" controller
and that a BSF like wrapper/interface mediates the whole interaction back to
an abstract object space. If so, we need to consider whether other layers
(in addition to flow) need to exist or made more explicit: Eg. Cocoon could
dispatch a DB layer to populate the object space, then dispatch the flow
layer which in turn would pick the presentation.

Note, layers would have no relationship to blocks: the concepts are
orthogonal to each other (application level blocks would have to span all
layers to do anything useful)...

<more snip.../>

Reply via email to