On Thu, 25 Oct 2001 11:27, Chris wrote:
> The point I'm trying to make is if you *already* have a mailet that can
>  dump attachments to an ftp server, and you _already_ have a mailet that
> can notify a group of people of an incoming mail, how do you leverage
> those two existing pieces of code to build something more complex?

I am fairly sure you are plugging things together at the wrong level. If you 
want a reusable set of components that are more simple than the regular APIs 
I would probably still just create a set of helper beans. Much like servlets 
really only act (or should only act) as glue between servlet containers and 
the application logic - I see mailets in same light. 

So in a servlet context you may choose to redirect to another "FTP" servlet, 
by far the more common pattern is to create a FTP "action" or FTP "handler" 
(or whatever your framework uses) that handles this. So I would say use beans 
that implement interfaces for that sort of thing.

In this case it would be good to standardize the Action/Handler interfaces 
and message interfaces but I think that is independ of Mailet API. In a way I 
could see that Gemlets could sit ontop of a Mailet in much the same way as 
Struts or Turbine sit on top of Servlet API.

So I would say that Gemlets may provide a good framework/infrastructure to 
build on top of something like the Mailet API.


>  >I have to ask myself, why not just call the FTP API?
>
> * Because the FTP API and others are not that friendly.
> * Because once you've built the Mailet that calls the FTP API, you have
> no means of writing a second Mailet that leverages the abilities of the
> first Mailet.
> * Because the FTP and JavaMail APIs don't have anything in common
> and glueing them together is hard.
> * Because you can standardise configuration.

agreed but see above. Struts/Turbine/Cocoon all do the same for the Servlet 
API and this seems to work well.

-- 
Cheers,

Pete

-----------------------------------------------------------
    If your life passes before your eyes when you die, 
 does that include the part where your life passes before 
                        your eyes?
-----------------------------------------------------------

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

Reply via email to