Concepts

Architecture

Kastra is built on the n-tier architecture : the presentation layer, the business logic layer and the data layer. Each layer is represented by an assembly which depends on the Kastra.Core assembly.

The presentation layer can be extended with modules which are built with the Kastra.Core assembly.

View organization

The Kastra website allows you to create pages with the administration panel. A page is composed of two types of component : template and module.

 

Template

A template is a HTML model which contains placeholders to place the modules. The administration panel allows you to select what template you want to use for the page, after that you can place the modules by creating them and choosing a placeholder for each one.

A template is a razor view available in the view folder corresponding to the view controller. In this razor file, the placeholders for the modules are materialized by the MVC view components. To use a template, you need to select the template view and specify its model which is used in the razor view file.

 

Module

A module on a page is built from a module definition. The module definition can be installed by the administration interface but it has to be present in the modules folder.