| | design:adapters_and_proxy_patterns [phpPatterns] |
 | | The adapter pattern is conceptually a bit like an international power adapter that you take on holiday, so you can plug in your electric shaver or hairdryer to the local power supply. |
 | | If we hadn’t used the Adapter pattern, we would have ended up having to re-write our ProductView class, at least in the case of the SOAP data source and had the OracleModel class has a different API to ProductModel, we would have needed a new version of ProductView for that as well. |
 | | In general, the difference between the proxy and adapter pattern is you design your proxy first, the intention from the start being all client objects will use only the proxy API. |
| www.phppatterns.com /docs/design/adapters_and_proxy_patterns (1328 words) |