Is there such a thing as a manager design pattern?

Viewed 61674

Is there such a thing as a manager design pattern that controls how different entities interact?

This is for a project for which the Environment, EnvironmentListener, and Entity classes have been predefined by our professor.

The static class, Environment, has a single EnvironmentListener interface that has a nextAction() method it just continuously calls kind of like a main loop in a game and because it is for a design patterns class, i can't simply change the code.

I need to allow entities to be dragged, dropped, animated, etc. and thought i would do that using different controllers.

I've been wondering if it was a good idea to make a controller manager which would implement EnvironmentListener and if a pattern like that existed.

The controller manager would simply iterate through a list of controllers and use their call function.

3 Answers

Data Manager is the implementation of Facade design pastern. It encapsulate the Connection to the database and the transaction scope. It holds all the DAOs or Records (lazy or not lazy) of all the tables it responsible and when he creates one it connects it to the connection and transaction. It can be use as a singleton so you work with one data manager. Data Manager can use cache manager to cache the data that it retrieve from the database and if the same request is issue then it can return the result from the cache.

Related