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

PHPMaster.com: PHP Dependency Management with Composer

NetTuts.com: Whoops! PHP Errors for Cool Kids

7PHP.com: Auto Generate Properties Dynamically For Your Classes Using Magic Methods & Reflection

Mikko Koppanen's Blog: Pretty Thumbnails

Builder.com.au: Simplify e-mail validation routines with PHP


Community Events





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


podcast symfony framework composer tool version update voicesoftheelephpant laravel release community introduction mvc series language opinion library package security interview

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