morphir-examples

Business Application Modeling

This module is an example of how we can go from modeling individual calculations to modeling entire business applications. A modeled business application can be translated to a specific technology stack using a combination of code generators. This makes it possible to move applications between various infrastructure environments without manual effort and implementation risk. Most importantly it allows teams to build applications that run on its own proprietary infrastructure today but can be moved to a cloud solution without changes to the business logic.

Modeling business applications also gives us visibility into how applications interact with each other which combined with the fine-grained control that code generators provide helps us optimize business workflows front-to-back.

Code Structure

Pre-trade example

Front-to-back trade example

General Module Layout

Each sample application is implemented in an App.elm file in a dedicated module. App.elm files never depend on each other directly. Instead dependencies are defined in the ACL.elm module that depends on the main App.elm as well as other applications. ACL stands for anti-corruption layer and it provides decoupling from other applications by translatine external concepts into an internal representation that’s optimal from the perspective of the application. ACLs and also provide a declarative approach to defining dependencies accross applications.