-
Notifications
You must be signed in to change notification settings - Fork 4
Solution, Ideas and Strategy
[Back to arc42 overview] (https://github.com/iks-github/MOGLiCodeCreator/wiki/Architectural-Documentation)
MOGLiCC is a Java programm started by calling its main method via a start script. The application core represents a simple plugin container (see [Building Block View] (https://github.com/iks-github/MOGLiCodeCreator/wiki/Building-Block-View)). When started, the container basically searches for available plugins, initializes all plugins and finally executes the plugins in a defined order. The business logic (code generation) is separated into four different concerns:
-
reading the model data
-
reading the templates
-
creating and calling the velocity engine for the defined templates and the model
-
writting the result into the file system
Each concern is handled by one or more components. To meet the "open for extension" requirement, these components are plugins, that are plugged together by a plugin container that analyses during runtime which plugins are available and runnable.
The concerns are handled by the following plugins:
-
StandardModelProvider and ExcelStandardModelProvider for concern 1
-
The generators FileMaker, LineInserter and TreeBuilder for concern 2 and 4
-
VelocityEngineProvider for concern 3.
The plugins are separated into two types: generator plugin that produce actually the created code and provider plugins that used by the generators to do theit jobs.
Basically, MOGLiCC works like this: model (concern 1) + templates (concern 2) = code (concern 3). For concern 3, [Velocity] (http://velocity.apache.org) is used. The VelocityEngineProvider initalizes a velocity engine, feed it with data, starts it and returns the result. The MOGLiCC user, however, has nothing to do with concern 3 - it is done by MOGLiCC automatically.
There exist the following domain specific dependencies between the plugins:
However, these components do not have technical dependencies. They are plugins and do not know each other during compile time. This follows the Open-Closed-Principle. For more information see [Design Decisions] (https://github.com/iks-github/MOGLiCodeCreator/wiki/Design-Decisions).
For explanations of individual terms, see the [Glossary] (https://github.com/iks-github/MOGLiCodeCreator/wiki/Glossary).
[Back to arc42 overview] (https://github.com/iks-github/MOGLiCodeCreator/wiki/Architectural-Documentation)