I am working on a design problem. In this case, I want to implement the Facade design template.
I know that Cocoa Touch offers us complete solutions for applying design patterns in our projects (for example, NSNotificationCenter - implements an observer design pattern)
My questions are: - Do we have the opportunity to use the Facade design template, as well as in the case of the observer design template.
Now I implement the ' Facade ' as follows:
For example, I have some classes that do some calculations. The Facade class combines all the classes that I need for computing.
For example, I have classes A, B, C, and Facade (which contain classes A, B, and C).
When I want to calculate something, I just create my β Facade β and pass some argument for the calculation. In this case, I do not know about classes A, B, C, and this Facade object provides me with only one access point.
This design pattern encapsulates objects and simplifies the application.
Is this the correct implementation?
Matrosov Alexander
source share