Select Page

Facade

Facade

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.

Source Code

/**  * Knows which subsystem classes are responsible for a request.  * Delegates client requests to appropiate susystem objects.  * @role __Facade  */ public class Facade {         /** reference to particular subsystem */         private SubsystemA theSubsystemA;        /** reference to particular subsystem */         private SubsystemB theSubsystemB;        /** this method is called by client */         public void facadeMethod() {                 // multiple subsystems could be involved                 // to provide some functionality         } }  /**  * Implements subsystem functionality. Handles work assigned by the Facade object.  * Has no knowledge of the facade.  * @role __System  */ public class SubsystemA {         /** some functionality */         public void subsystemFunctionality() {         } }  /**  * Implements subsystem functionality. Handles work assigned by the Facade object.  * Has no knowledge of the facade.  * @role __System  */ public class SubsystemB {         /** some functionality */         public void subsystemFunctionality() {         } }

About The Author

I worked with various Insurances companies across Switzerland on online applications handling billion premium volumes. I love to continuously spark my creativity in many different and challenging open-source projects fueled by my great passion for innovation and blockchain technology.In my technical role as a senior software engineer and Blockchain consultant, I help to define and implement innovative solutions in the scope of both blockchain and traditional products, solutions, and services. I can support the full spectrum of software development activities, starting from analyzing ideas and business cases and up to the production deployment of the solutions.I'm the Founder and CEO of Disruptr GmbH.

Categories