News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Practical Aspects of the Adapter Pattern
March 14, 2013 @ 09:08:02

On PHPMaster.com today there's a new post about using a design pattern in your application, specifically the usefulness of the Adapter pattern. This pattern makes it simpler to work with existing tools by providing a layer that allows unified access to the libraries from one interface.

Software development is improved every day by new concepts, methodologies, and high quality libraries and frameworks. But even with all these improvements, we cannot prevent change in software development. You may think that your system is designed perfectly to cater to all of its requirements, but there will always be a change request that ruins your perfect design. We have to be prepared for all possible changes as developers. The Adapter pattern is a design pattern which is commonly used to manage changes in development. Throughout this article we'll be looking at the usage and benefits of the patterns using real world applications.

He uses an illustration of email access via a mobile device and using it as an "interface" (via a SMS message) to the web to send an email. He then looks at a more practical code-based example, a set of adapters that let you subscribe/unsubscribe from various email services. He shows a wrong way to implement it as well as a good way - using it to work with Twitter to send tweets via a similar interface.

0 comments voice your opinion now!
designpattern adapter tutorial introduction email


blog comments powered by Disqus

Similar Posts

Tobias Schlitt's Blog: PHPUGDO plans "PHP introduction workshop"

PHPMaster.com: Artisan and Laravel Migrations

Matthew Weier O'Phinney's Blog: Developing A ZF2 Blog

Developer.com: Combining an Oracle Database with PHP to Manage Data

Codeception.com: Headless Browser Testing with Selenium2 and PhantomJS


Community Events





Don't see your event here?
Let us know!


conference list bugfix symfony podcast release language interview community code framework development tips laravel deployment series zendserver introduction api threedevsandamaybe

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework