Sean Legassick a �crit :
> Looks good - though it would be preferable if you could provide diffs
> for patches to existing files. 

I will do so in the future. 

> a) keep things as is and insist that if the class user wants to use the
> chaining idiom they have to use subclass methods first, so the above
> example would be:
> 
> mail.setHtmlMsg(...).setFrom(...)
> 
> It's not a very nice requirement of the API.

It may be the cleaner method from the oo point of view.

> b) the other choice is to break the OO a bit and have a setHtmlMsg
> method in the baseclass which does nothing/throws an exception.

I really don't like this method since it complicates further extensions
to the API.
 
> c) similar to (b) break the OO and subsume all the functionality into
> the baseclass, perhaps having HtmlEmail be a helper class rather than a
> subclass.

Maybe HtmlEmail should be a wrapper. I suggest :
 * the methods setFrom(), addTo(), ... return an Email Object
 * add the setMsg method to the Email base class.
 * the attach() methods still return void.
 * HtmlEmail and the sames are wrappers instead of sublclasses

Regis


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to