[Mpango-core] mpango - code organisation
Status: Pre-Alpha
Brought to you by:
edvera
From: <ugl...@gm...> - 2011-05-25 16:04:17
|
I have reviewed mpango code, and I have some remarks: 1) Entities, events, listeners, exceptions, beans should be placed in own packages, and if necessary create subpackages. Now it is a little mixed. 2) Web layer should be separated from back-end. The flow of the application could be like this: user-action -> spring bean -> facade bean -> service bean -> dao bean 3) Next step of separating should be creating of DTOs which will be used in web layer. Each entity should have corresponding DTO class. translation between entities and DTOs will be perform by builders(entity->dto) and factories(dto->entity). All actions which will require translations, should be placed in facades, facade beans will be used as thin border between core system and user interface. Service beans will be used to perform calculations. As far as mpango grows maybe we should consider creating 2 projects instead of one, for example mpango-core, and mpango-web. If Eduardo will give me permission I could rearrange code a little in this style. What do you think about it? Any suggestions are welcome. Andrzej |