cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: [Flow]: Modularizing flow scripts
Date Wed, 08 Jan 2003 23:01:53 GMT
Ugo Cei wrote:
> Giacomo Pati wrote:
>> On Wed, 8 Jan 2003, Ugo Cei wrote:
>>> My flowscript is getting big, and I've coded just a fraction of the
>>> functionality of my app.
>> What is big for you in terms of lines?
> The one I'm currently working on is about 300 lines and I'm starting to 
> feel unconfortable about it. The problem is that this script contains 
> just some minimal user management functions and now I'd like to start 
> adding some application-specific functions. I'd rather not keep them 
> together, considering also the fact that I might wnat to reuse the 
> user-management functions in another app.
>  > I thought a flowscript would be small and logic is modularized into Java
>  > classes.
> Mostly it is, but each function has (typically) to:
> - check some preconditions (is the user logged in, is she authorized?)
> - initialize or retrieve some domain objects
> - invoke a view (typically a form)
> - retrieve data from the posted form
> - validate them
> - store the domain object
> - maybe do the same for one or more other forms in a sequence
> - handle exceptions
> - etc.
> So, even putting most of the code in Java classes, we're still talking 
> of a screenful of lines per function. And in some applications, you 
> might have tens, if not hundreds of them.

Just FYI, JavaScript has the ability to pass a function as a parameter 
of another function. That makes a pretty light and cheapo 
aspect-orientation way.

Stefano Mazzocchi                               <>

To unsubscribe, e-mail:
For additional commands, email:

View raw message