Hi everyone,

sorry for my irreverent newbie questions.
I'll hopefully be forgiven by the "no question is a stupid question" defense.


Doesn't the user often determine whether business objects are instantiated or not?
Cannot flowscript be my interface between the user and my business methods?


What is the difference between instantiating them in an action and in the flowscript? I don't mean programmatically - I mean in the separation of concerns. something has to act as the controller - why cant it be Flow?

I have just created my first cocoon web app and it is a Language Vocab Testing Program, I have a POJ business layer which has all my methods to get the next word - checks to see if the word has already been tested, and it calls my POJ Access Layer - which at the moment does JDBC calls.

My Flowscript starts the test by calling biz.start(), gets the number of questions, and gets the next word biz.getNextWord() looping with sendPageAndWait until the test finishes.

The controller depends on user input, when to start the test, to get the next word, when the test is over, so why should not these be in the flowscript? The biz objects have to be in some sort of user "context" - and the state management provided by flow provides that context.

Surely the controller has to be aware of the business layer's public methods/interface to actually perform anything useful?

If i jump between sitemap/actions and flowscript to call my biz methods - how does that help the "separation of concerns"?
Is not the pipeline doing all the matching and the calling of actions acting as the controller, and therefore doing exactly what flow is doing?


I assume that i have mixed something up along the way - so is there a more complicated example somewhere which shows the preferred way to integrate the different components of cocoon and provide the clear separation of layers? With explanation of "why" it is done this way?

help me obi wan, help me!

Cheers and thanks,
John.

On 02/05/2004, at 3:39 AM, Ralph Goers wrote:

Doing it in the actions is where it should be done. That is the bridge
provided by the sitemap between controller and model. An action can only
provide information to the sitemap - it is not the controller.


Ralph

-----Original Message-----
From: Ugo Cei [mailto:[EMAIL PROTECTED]
Sent: Saturday, May 01, 2004 10:08 AM
To: [EMAIL PROTECTED]
Subject: Re: JXT or XSP?

Il giorno 01/mag/04, alle 18:20, Ralph Goers ha scritto:

You have to draw a line in the sand somewhere. Instantiating the
objects
might not be so bad, but the next thing you know you'll be calling
methods
on those business objects because its easy and then you'll really
start to
pollute the controller with the model.


And what is stopping you from calling those methods from your actions too?

Ugo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to