-
Notifications
You must be signed in to change notification settings - Fork 6
Bundle and core design
Cantiga Project is based on the following technology stack:
- Symfony 3 Framework,
- Doctrine DBAL,
- Twig template engine,
- jQuery,
- AdminLTE theme.
The features of these technologies shall be used in the first place, if they can be used/adapted to satisfy our goal without breaking the design. What is "breaking the design"? It is using certain component against its internal logic, architecture, use cases etc. Breaking the design is not something we like, because it often leads to failure. The component itself also evolves, and its authors won't follow use cases that are fundamentally wrong. Another potential problem is the situation, when the component itself is OK, but its adaptation would break the design of Cantiga.
Situations, where you should prefer to write your own code:
- you feel that you would have to make a lot of hacks to adapt the component to our needs,
- other components do not solve the problem,
- other components are too complex or break the design rules of Cantiga,
- our understanding of the domain is too small to evaluate third-party solutions correctly.
Currently, many services, interfaces and implementations related to the model layer, can be found in \Cantiga\Metamodel namespace. Actual application logic is combined in the Core Bundle, which combines the code for user management, basic functionality, and the project/group/area workflow. There are relatively few extra modules. Certain API-s are also a part of the Core Bundle.
This architecture is not perfect:
- lack of balance between the component sizes - CoreBundle is too big, and handles too many domains,
- part of the general-purpose API-s is a part of CoreBundle,
- database and entity model is tightly coupled to several entities from CoreBundle,
-
Metamodelis not the right name for the collection of the application API-s.
- Create a lightweight set of API-s within
\Cantiga\Componentsnamespace organized around loosely coupled components, just like in case of the Symfony core, - Deprecate and remove the API-s from
\Cantiga\Metamodelor move them to the new namespace, - Split CoreBundle into smaller pieces,
- The data model of each bundle/module shall be independent from other modules, also at the database level,
- Events to keep the data models in sync.
All the new development shall bring us closer to this direction, so that it should focus on refactoring the codebase, designing new approach to the data model, and removing the tight coupling. Once the new API-s and solutions reach the satisfactory level of maturity, we'll be redesigning the existing modules.