cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: generator based including
Date Fri, 12 Jan 2001 11:46:11 GMT
At 22:59 +0100 11/01/01, Giacomo Pati wrote:
>> This is how a set of forms are defined. The form:handler checks the POST
>> data and chooses (based on the input validation) the right form to be shown.
>> So we have the a main XSP page that includes another XSP page.
>> (Of course the including is hidden inside the form:taglib)
>
>What you are doing here is mixing service (controller) and presentation
>layer (view). My advice is *DON'T DO IT*. You'll soon find yourself in
>troubles and you are trying to solve it with the wrong approach because
>yyou are already too deep into it. Instead you should strictly separate
>these layers. This is one reason why the sitemap with the different
>components exists.
>
>The approach I use is that I have XML/XSP files which represents the
>views of my application model (only read access). I write actions for
>the form data validation/processing and the write access to the model
>(actions in fact are for your business logic or at least adapt them).
>And finally let the actions communicate with the other components
>(matcher/selector/generator etc.) using the mechanisms the sitemap
>offers by returning map values from the actions and use them in src
>attributes for your generators. Or use a selector which has the
>knowledge between conditions your actions set and the resources that
>should be produced based upon these condiftion. That way you don't have
>to bind your action directly with your resources.

This is very interesting, I am trying to grasp how our CRUDLET project will
migrate to Cocoon 2 ..... do you have some examples of your techniques you
can distribute?

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
    <phone:+44.[0].20.7737.6831>        <pager:jermq@sms.genie.co.uk>

Mime
View raw message