Design Patterns — A quick guide to Facade pattern.

Order_Facade facade; facade.orderFood();return 0;}// Output// A series of interdependent calls on various subsystems:// Waiter writes client's order// Send order to kitchen// Cook food// Call Waiter// Yeeei customer is served!!!// Wash the dishesThere are a few benefits for the use of Facade pattern and a few points to be noted when Facade is to be approached.Facade defines a higher-level interface that makes the subsystem easier to use by wrapping a complicated subsystem.This reduces the learning curve necessary to successfully leverage the subsystem.It also promotes decoupling the subsystem from its potentially many clients.On the other hand, if the Facade is the only access point for the subsystem, it will limit the features and flexibility that “power users” may need.The next blog will be a quick guide to the Observer design pattern.It is a behavioral pattern which is a must have to your knowledge repository.Don’t forget to like/clap my blog-post and follow my account.This is to give me the satisfaction that I helped some fellow developers and push me to keep on writing.If there is a specific design pattern that you would like to learn about then let me know so I can provide it for you in the future.Other quick-guides on design patterns:Design Patterns — A quick guide to Abstract Factory.Design Patterns — A quick guide to Singleton Pattern.. More details

Leave a Reply