ConPaaS-team / conpaas

ConPaaS: integrated runtime environment for elastic cloud applications
http://www.conpaas.eu
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Remove all the duplicated code and move it up the inheritance hierarchy. #96

Open gtato opened 8 years ago

gtato commented 8 years ago

There are 3 main areas where the code is duplicated: in the service managers, in the agents and in the web frontend. There may be a little duplicated code even in the command line tools.

In the case of service managers, we need to implement a class hierarchy with a BaseManager class, an ApplicationManager class and a ServiceManager class. All the concrete service manager classes should be derived from the ServiceManager class. All the functionality that may be useful to more than one service should be moved to this ServiceManager class. The functionality that is shared between the service managers and the Application Manager should be kept in the BaseManager class. The same needs to be done in the case of agents. All the common functionality should be moved to the BaseAgent class.

The reorganization of the code in the web frontend has at the moment a lower priority