Intro to Interfaces - PHP Plugins
The how and why of using PHP interfaces can be very confusing and often seem like it is just not worth the trouble. After attending this talk you will have a foundation into what PHP interfaces are, why they are worth using, when you should use them, and most importantly how to use them to write cleaner, easier to maintain and easier to reuse modules of code. Essentially interfaces are going to make your development process better and more productive. Through the course of the talk we will walk through a real world example of sending an email from an application. We will start with a tightly coupled (hard to maintain and test) legacy email script, add the use of an interface and then move on step-by-step to a modern, loosely coupled and easily swappable PHP plugin. Time permitting there will also be discussion of using abstract classes in PHP, how they are similar and different to interfaces, and how to choose which to use for your situation.
Alex Fraundorf (@alexfraundorf)
Alex is a freelance web developer from Appleton, Wisconsin with over ten years of experience. His specialty is in object orientated PHP development and communication with third party APIs. Alex is a published author on SitePoint.com, creator of a popular shipping library, an advocate of loose coupling, and has a passion for making complicated topics understandable, an ability honed by making plenty of mistakes and learning things the hard way. Alex can be contacted via AlexFraundorf.com and @AlexFraundorf