Hey all,

I'm putting in a big push to refactor a legacy site (served a la
vongole) to OO.  One thing I definitely want to implement is an
EmailService and Email object. I get that it helps to encapsulate
default setting, whether I'm in development mode, etc, but I don't see
any benefit beyond that.  What I am considering is add a
NotificationService that composes the EmailService.  Why the extra
abstraction?  In terms of service methods that send to mail a
customer, it seems strange to replace a <cfmail /> tag with:

mail = EmailService.createEmail();
// set properties
EmailService.send(mail);

How I would like to process mail in a service would be to call a
NotificationService with methods like sendUserWelcome(user), or
sendUnsubscribeRegret(user) and have the NotificationService extract
the details from the user object and delegate the actual mail sending
to the EmailService.

Is this a reasonable extra level of abstraction, or overkill?
Thoughts?

Paul
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to