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

PHPBuilder.com:
Exploring PHP Design Patterns
Jun 23, 2014 @ 15:41:50

For those that might be new to development, the concept of "design patterns" could be one you're just approaching. These common practices define some "patterns" of development that have been proven to provide good structure and maintainability to applications...when applied correctly. PHPBuilder.com has an introductory article showing you how to use five of the most common patterns: Factory, Singleton, Observer, Chain of Command and Strategy.

Design patterns provide a generic reusable solution to common problems. A design pattern is not a concrete solution that can be converted in to source code or a machine code rather it is a template which can be used to solve a problem in different situations. Design patterns help in faster development as the templates are proven and from the developer's point, only implementation is required. Design patterns not only make software development faster but also encapsulate big ideas in a simpler way.

For each of the patterns represented a brief description is included and some sample code is given showing it in use. There's not too much depth in this post, so if you're looking for more "meat" on these patterns, I'd suggest checking out some more advanced articles on SitePoint.com.

tagged: introduction designpattern factory singleton observer chainofcommand strategy

Link: http://www.phpbuilder.com/articles/application-architecture/design/exploring-php-design-patterns.html


Trending Topics: