Facade Pattern and single object instantiation

To me, I feel when we done OOD in right way, so we will have a bunch of small objects. So when you want to do or get something, it might involve from instantiating those small objects, and if you leave that knowledge in controller, it will make controller harder to test, and also we might need that kind of info again, so we don’t want to duplicate knowledge of instantiating those small objects in somewhere else. So we put in a class that represent the concept of those data/behaviors and give it a name with simplify interface to let client code easy to access.

1 Like