© Kelt Dockins 2017

Kelt Dockins, Design Patterns in PHP and Laravel, 10.1007/978-1-4842-2451-9_13

13. Facade

Kelt Dockins

(1)Dolph, Arkansas, USA

$> git checkout facade

Intent

Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.1

Applications

Life is hard. Sometimes stuff is just complex. Perhaps the code you are writing is for a really tough problem. Sure, you usually try to break things down to its simplest forms (models) but your modeling doesn’t always turn out correct. Sometimes code is complex when it doesn’t need to be. When you first write something, you don’t always get it right on the first try. How many times have you looked at your older code ...

Get Design Patterns in PHP and Laravel now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.