As of now, all the code base is generated using templates which contain pretty elaborate logic for generating the custom code for everything.
It would be nice if the WebGME models result into an artifact (probably JSON file would be easier to generate than most others), which will be used by generic code blocks (for simulation components mainly) to give the same result. This will help in extending the simulation capabilities of the tool as follows -
E.g. if a simulation engine as well as simulation model in C++/Java is ready to be plugged, only things which are needed are 1. what are the parameters of the model, 2. what is the desired output and 3. how to run the simulation engine. The generic block needs to be written in that particular language (in which the simulation model and the engine is) which uses the data-model artifact to construct a desired simulation model and run it.
Bottom line: don't generate custom code, generate a data-model artifact which is to be used by a generic code block. The generic code block then uses the generated data-model artifact and behaves similar to a custom code block.
Pros:
Easier to debug than templates-based code generation
Easier to extend and maintain
Cons:
A lot of rework
Generic code blocks tend to be slower than the custom generated code blocks
As of now, all the code base is generated using templates which contain pretty elaborate logic for generating the custom code for everything.
It would be nice if the WebGME models result into an artifact (probably JSON file would be easier to generate than most others), which will be used by generic code blocks (for simulation components mainly) to give the same result. This will help in extending the simulation capabilities of the tool as follows -
E.g. if a simulation engine as well as simulation model in C++/Java is ready to be plugged, only things which are needed are 1. what are the parameters of the model, 2. what is the desired output and 3. how to run the simulation engine. The generic block needs to be written in that particular language (in which the simulation model and the engine is) which uses the data-model artifact to construct a desired simulation model and run it.
Bottom line: don't generate custom code, generate a data-model artifact which is to be used by a generic code block. The generic code block then uses the generated data-model artifact and behaves similar to a custom code block.
Pros: