Hey all,

   I'm interested in setting up WebMail on my cocoon based site. I 
haven't found anything so far so I'm planning on doing it myself. Is 
this something that would be better done through the community and 
included as a part of Cocoon perhaps? I'm guessing so, because it seeems 
like something that lots of people might need and could really show off 
Cocoon's capabilities. I've never contributed much to any open source 
project though so I'd like to get feedback.

Here's my ideas... I've only used Cocoon up to 2.02, so I'm not really 
familiar with FlowScript. I've followed the conversations, and think 
that maybe it could apply here, but my ideas don't include it yet. 
There's also so many ways to do things in Cocoon that I'm not sure which 
would be the best.

The first way is to create a MailGenerator base class that performs user 
authentication, gets mail, accepts request parameters for managing mail 
and sending it, and outputs XML. An XSL stylesheet creates the views, 
and the sitemap is kept real simple:

<map:match pattern="mail">
   <map:generate type="mail">
   <map:transform src="mailTheme1.xsl"/>
</map:match>

This is the quick and dirty way that I'd probably start with, but it 
makes the generator and stylesheet more complicated. Another way is to 
split up the generator and stylesheet by their views and use and 
action/selector to choose which one. The sitemap map might look 
something like this (excuse any errors here I'm just brainstorming)

<map:match pattern="mail">
   <map:act type="mail">
     <map:select type="parameter">
       <map:parameter name="parameter-selector-test" value="{view}"/>
       <map:when test="mailbox">
         <map:generate type="mailbox"/>
         <map:transform src="mailbox-theme1.xsl"/>
       </map:when>
       <map:when test="message">
         <map:generate type="message"/>
         <map:transform src="message-theme1.xsl"/>
       </map:when>
       <map:when test="login">
         <map:generate type="login"/>
         <map:transform src="login-theme1.xsl"/>
       </map:when>
       <map:otherwise>
         <map:generate src="error.xsp"/>
         <map:transform src="error.xsl"/>
       </map:otherwise>
     </map:select>
   </map:act>
</map:match>

And yet another way is to use XSP, with a different xsp for each view 
(login.xsp, mailbos.xsp, message.xsp, etc). And then there's FlowScript.

I don't really know too many of the advantages af each. Any comments?

Thanks,
   Justin


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

Reply via email to