Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Design Patterns <ul><li>PHP </li></ul>
Design Patterns Un  design pattern  o patrón de diseño es una solución reutilizable frente a problemas frecuentes en el di...
¿Por qué utilizarlos? <ul><li>Acelera el desarrollo </li></ul><ul><li>Soluciones probadas frente a paradigmas de desarroll...
Factory method El factory pattern es una clase que tiene una sierie de methods que permiten crear objetos.
 
 
 
 
 
Command Un objeto es utilizado para representar y encapsular todo la información necesaria para llamar luego a un method. ...
 
 
Cadena de responsabilidades Avoid coupling the sender of a request to its receiver by giving more than one object a chance...
 
<ul><li>This pattern shares some structural similarities with Java exceptions: either they are handled or passed on. </li>...
Decorator Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subcla...
 
Composite The composite pattern describes that a group of objects are to be treated in the same way as a single instance o...
 
State Allow an object to alter its behavior when its internal state changes.  The object will appear to change its class.
 
Upcoming SlideShare
Loading in …5
×

Design patterns

825 views

Published on

  • Be the first to comment

  • Be the first to like this

Design patterns

  1. 1. Design Patterns <ul><li>PHP </li></ul>
  2. 2. Design Patterns Un design pattern o patrón de diseño es una solución reutilizable frente a problemas frecuentes en el diseño de software.
  3. 3. ¿Por qué utilizarlos? <ul><li>Acelera el desarrollo </li></ul><ul><li>Soluciones probadas frente a paradigmas de desarrollo </li></ul><ul><li>Mejora la legibilidad del código </li></ul>
  4. 4. Factory method El factory pattern es una clase que tiene una sierie de methods que permiten crear objetos.
  5. 10. Command Un objeto es utilizado para representar y encapsular todo la información necesaria para llamar luego a un method. Esta información incluye el method name, el objeto dueño del method y los valores los parámetros del method.
  6. 13. Cadena de responsabilidades Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle a request. Chain the receiving objects and pass the request along the chain until an object handles it. A mechanism also exists for adding new processing objects to the end of this chain. Variación: árbol de responsabilidad..
  7. 15. <ul><li>This pattern shares some structural similarities with Java exceptions: either they are handled or passed on. </li></ul><ul><li>This pattern is useful for hierarchical structures where a request can be handled at multiple layers. </li></ul><ul><li>Like our GUI event handling is done hierarchically. If an object doesn't want to handle an event it can delegate it to its parent, up the chain. </li></ul>
  8. 16. Decorator Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality The original code is open to extension but closed to modification “ Open/closed principle”
  9. 18. Composite The composite pattern describes that a group of objects are to be treated in the same way as a single instance of an object. Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
  10. 20. State Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.

×