cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: [Flow]: Modularizing flow scripts
Date Wed, 08 Jan 2003 17:08:09 GMT
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.

	Ugo

-- 
http://www.beblogging.com/blog/




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message