App Backend Application Arcitecture
Description of the application architecture for App Backend
This App Backend exposes REST-Api’s consumed by a optinal App Frontend and/or external systems / mobile apps. The structure of the API’s is documentet here
The REST-APIS are implemented in different API-controllers and uses attribute based routing to identify the correct operation.
The API-controllers uses defined interfaces to communicate with the app logic defined by the developer.
The below diagram show how the App Backend is build around 3 main packages.
- AltinnCore Runtime - MVC Application with predefined API’s and functionality for Apps created in Altinn Studio
- ServiceLogic - Class library that contains business logic defined by the org/app developer
- ServiceLibrary - Common utils and interfaces making it possible for the Runtime to use ServiceLogic
The app logic is C# code generated/created as part of the app development process in Altinn Studio.
The service implementation class implement a defined interface that backend uses to be able to interact with the service implementation.
This is done through reflection. The App container contains a dll of the app logic.
The service implementation contains all backend code for logic and rules.
The different controllers calls the app logic
The data model in an app is defined as an XSD. From the XSD it is generated a C# representation of that model.
In runtime all data is deserialized/serialized from/to this model when communication with frontend/external systems.
All logic in the app will typical be related to the datamodel.