The components Cleanscape SourceMill uses to generate code are an object model, a template, and the code synthesis engine. You can also collect your generation rules by creating a Project.
Data Structure Model (DSM)
The Data Structure Model file tells Cleanscape SourceMill about the objects you want to create. The DSM file is a high-level structure that describes an application by defining the parts of the application, like data objects, state transitions, and process interactions.
You build DSM files using the SourceMill DSM File Editor. It allows you to insert pre-formatted objects then define their attributes, functions and characteristics. You can customize the provided DSM files for your specific needs, develop your own from scratch, or contract with Cleanscape to build custom object models for you.
The Template (TEM) tells Cleanscape SourceMill how to generate code for each of your objects by providing directives that tell the code synthesis engine how to create and name files, and what to put into those files. A key element of the application’s flexibility, the TEM file allows you to define what objects are in a given language or dialect. This helps you to generate code in every language and dialect for which you have a template.
When you select a template for your target environment, the code generation engine follows directives in the template that tell it how to navigate through and select the elements of your object model.
You can use or modify one of the provided templates or you can create your own according to your local coding standards. Cleanscape also provides custom template building services.
Code synthesis engine
The code synthesis engine takes in an object model and uses the formula defined in a DSM file to expand a template into commercial-grade code.
Cleanscape SourceMill Projects allow you to collect a number of generation rules under a single project heading. You can also use a Project for very involved sets of generation rules to organize a hierarchy of generation rules into any number of subsystems.