NS Development Process
NS ApplicationNS Application (NSApplication). A pre-built software stack that provides common enterprise application functionality such as CRUD, search, authentication, and business process modeling out of the box. development relies on a 4-step development process.
- Model your applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution.
- Expand the model to generate code
- Customize the code to better accommodate your use-cases
- Harvest to extract the customizations to insert during the next expansion
This process is repeated iteratively to rapidly build up the applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution., adjust it to new requirements and improve it with new insights.
Model
Create an ApplicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. model that describes the structure of your applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution.. You will be defining DataElements, TaskElements, FlowElements etc.
The models are stored in XML files and can be edited with an advanced modeling tool.
Expand
Based on this model, the expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. will generate a source code project in a pre-defined expansion directory. This project can be built to create a basic applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. with a simple user interface to create, modify and delete data according to the model.
ExpandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. are extendable, so newly discovered patterns can be converted to new expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. to reduce subsequent work.
Customize
The developer then modifies the code with customizations to implement use-cases which are not supported by the code generated by the expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact..
The customizations come in 2 forms:
- Code can be added to the generated files in specific places called custom anchorsAnchorA marker within generated source code reserved for adding custom logic during re-expansion.. These are 2 comments that define
the start and end of the custom code, like this:
// anchor:custom-pre-create:start
doSomeValidation(details);
// anchor:custom-pre-create:end - Custom classes can also be added in an ext directory. There are multiple ext directories in the project where new classes or other source files can be added.
Harvest and Repeat
When you are satisfied with the customizations, you can run the harvest step. This will take all of your customizations and stores them next to the model files. The next time the applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. is expanded, these customizations will be reinserted into the generated files.
Working like this allows us to regenerate the code after it was modified, which has several benefits:
- The model can be updated throughout the development process, giving much needed flexibility.
- The expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. can be updated to provide bug-fixes, security fixes and new features, while keeping the customizations intact.
Benefits
Evolvability
The code generated by the expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. are built based on the NS theory. This theory gives us methods to pinpoint where possible issues might arrive due to new requirements and changes in the future.
These new requirements and changes are not always predictable and in typical projects they often lead to changes all over the project.
By studying these changes combining it with classic stability theory, the NS theory gives a framework to limit these _ combinatorial_ effects.
Decreased Development Cost
An applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. can be described as a combination of concepts and features.
For example, you might have some concepts: Products, Orders and Customers. You then also need some features for each concept: persistence, user interfaces and validations.
To implement this functionality you will need to invest time in the order of:
N (number of concepts) x F (number of features) + C (some additional specific additions)
As your applicationsApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. grows, this can become problematic:
- New features require work to the order of N
- New concepts require work to the order of F
The expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. remedy this situation by generating features based on a model. Concepts are modelled as elements. Features are implemented in expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact.. The amount of work then becomes:
N (number of elements) + F (number of expanders) + C (custom code)
- New features require you to write a new expanderExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact.
- New concepts require you to model a new element
In addition, you can reuse the work done on expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. provided by the framework, as well as work done in other applicationsApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution.!
Flexibility
By iteratively modelling, expanding and customizing your applicationApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution., it becomes simple to adapt to changes:
- The generated code can be regenerated, unlike code-generators that you run once and then adapt.
- Generated code is cheap, so adding a new fieldFieldA property of a DataElement expanded to a database column and user interface input element. or element takes little effort for a lot of gain.
- Likewise, redesigning the model only has effect on the custom code that was added on top of the elements that have now changed.
- ExpandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. can be swapped out for other expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. through settings and options, making it considerably less painful to switch to different underlying technologies and implementations.
Structure
Since all applicationsApplicationThe overarching model container grouping all components, domain logic, and configurations for an enterprise solution. are generated with the same expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. and every element is generated in a similar way, it the source code gets a very predictable structure. This has several added benefits:
- The code becomes easier to navigate
- It easier to get into as a new developer
- It becomes easier to communicate about aspects of the source code