Looking towards February - Version 4 (DI-centric design)
Posted: Thu Nov 01, 2007 8:09 am
Well, it's probably coming up for 1 year since version 3 was released and all in all it's been a solid workable API so that's not changing a great deal. Version 4 will be PHP 5 and 6 only (sorry PHP4'ers, I made a pledge and I stand by it) and will not be released before February 2008. The main focus is to minimize coupling as much as possible via the use of setter based dependency injection and factories. QP encoding needs a real good re-think too.
I'm starting the initial planning for v4, so as usual I'm looking for some feedback on what you liked or didn't like in the API developed for v3.
Things I liked:
The event-driven plugin system -- although the implementation could be improved
The way messages are composed
The use of exceptions for descriptive errors rather than failing silently (though I hated the PHP4 workaround)
Things I didn't like:
The whole concept of 'Connections' -- a NativeMail class is not a connection!
The type-hinting on class names and the use of instanceof inside Swift_Message
The complexity of the nesting logic in Swift_Message
New features in version 4:
Rather than one GOD encoder, an Encoder interface will allow dedicated Encoders to be encapsulated and used.
Connections are out, DeliveryDrivers are in. Sending behaviour will be abstracted so Swift doesn't "talk SMTP" to a connection, it just issues "send" commands to a Driver.
I've only just started putting this stuff online, but there's a home in the wiki for it now:
http://www.swiftmailer.org/wikidocs/v4/start
Thoughts on my sense of direction greatly appreciated
I'm starting the initial planning for v4, so as usual I'm looking for some feedback on what you liked or didn't like in the API developed for v3.
Things I liked:
The event-driven plugin system -- although the implementation could be improved
The way messages are composed
The use of exceptions for descriptive errors rather than failing silently (though I hated the PHP4 workaround)
Things I didn't like:
The whole concept of 'Connections' -- a NativeMail class is not a connection!
The type-hinting on class names and the use of instanceof inside Swift_Message
The complexity of the nesting logic in Swift_Message
New features in version 4:
Rather than one GOD encoder, an Encoder interface will allow dedicated Encoders to be encapsulated and used.
Connections are out, DeliveryDrivers are in. Sending behaviour will be abstracted so Swift doesn't "talk SMTP" to a connection, it just issues "send" commands to a Driver.
I've only just started putting this stuff online, but there's a home in the wiki for it now:
http://www.swiftmailer.org/wikidocs/v4/start
Thoughts on my sense of direction greatly appreciated