Skip to content

Aspect Oriented Design (AOD) Overview

Simon Mourier edited this page Feb 19, 2020 · 1 revision

As seen in the Designing chapter, using SoftFluent CodeModeler implies designing a model representing your application: its business logic, architecture, technologies, etc. From this model a platform independent meta-model is inferred, and only then, producers will translate this in-memory representation into actual code.

Now, aspects (also sometimes referred as CodeModeler “patterns”) introduce a new notion allowing you to plug into this process. Using aspects, you'll be able to work on this in-memory representation of the model, before anything is produced, and dynamically add/remove/modify elements in your model: this is what we call dynamic modeling. In a nutshell, in CodeModeler, Dynamic Modelingis materialized as aspects and it allows developers to inject extra-behaviors in models.

An aspect in CodeModeler can either be an XML file or an assembly and in both cases, it relies on the CodeModeler API which allows to read and write the meta model of the current project. Aspects are external to your model, meaning that once you invested time in creating your aspect, you can then reuse it on all your desired projects.

A set of “Official” aspects are shipped out-of-the-box along with the product. Those aspects are shipped in the form of XML files and placed in the Patterns folder of your installation directory. Among them, you'll find aspects allowing developers to add data localization or Google-like text search to their application by importing them in their model. Likewise, you can create your own custom aspects in order to add specific behaviors which you'd like to industrialize.

Clone this wiki locally