What is it?
The Architecture Studio is feature in Console that provides a means to:
- design new and manage existing Architecture Checker or Quality Rule models
- test Architecture Checker models against Applications you have analyzed in Console to see potential violations of the model
- test Quality Rule models against Applications you have analyzed in Console to see potential violations of the rule in the model
- publish models as extensions so that they can be installed in an Application to repeatedly check (during an analysis) for violations of the rule defined in the model (available for Quality Rule models and Architecture Checker models (only from 2.4x).
What are models?
There are two types of models that can be managed in Architecture Studio: they are similar but fulfil different goals:
- Architecture checker models
- Quality Rule models
Architecture Checker models
Architecture Models are used to check the organization, architecture and structure of an Application's entire source code. Within a model, layers and dependencies between these layers are configured to reflect how an Application SHOULD/SHOULD NOT be structured. Each layer captures objects matching a selection criterion and each dependency specifies which link types are authorized or forbidden between these layers. Multiple models can be used to check various different aspects of an Application's architecture.
Within Architecture Studio, the model can be checked against an existing Application (if it has already been analyzed and a snapshot exists) to show potential violations of the architecture rules defined in the model - click the check action:
Violations are listed are listed but are not saved into application analysis results:
When the model has been fully defined it can then be saved and then assigned to specific Applications in Console - see Application - Config - Architecture. When a model is assigned to an Application, the next time an analysis/snapshot is run on that Application, the Architecture Checker model(s) will be checked and any violations of the model will be saved in the analysis results as violations. These violations can be seen directly in the Engineering Dashboard. All Architecture Models will contribute to the Architecture Models Automated Checks Technical Criterion, which in turn contributes to the Security Health Factor/Business Criterion:
In addition, from 2.4.x, Architecture Checker models can be published internally in Console in the form of a CAST extension (see AIP Console - Architecture Studio - Publishing models) and this extension can then be installed in any application (just like any other extension). When an analysis/snapshot is run, the "rules" defined in the model are then tested and any violations of the rules are recorded as violations and can be viewed in the Assessment Model tab:
Note that publication does NOT publish the "extension" on CAST Extend or CAST Extend local server - instead the extension is instead made available internally within Console (in the Application - Extensions panel).
Quality Rule models
Quality Rule models are designed and managed in Architecture Studio just like Architecture Models, but their goals are slightly different:
- Quality Rule models focus on specific situations - for example, you might want to check whether certain client objects are directly accessing certain database objects using a specific link type, and if so, record these accesses as violations.
- Quality Rule models cannot be assigned to a specific application in the Console UI (like Architecture Models), however, they can be published internally in Console in the form of a CAST extension (see AIP Console - Architecture Studio - Publishing models) and this extension can then be installed in any application (just like any other extension). When an analysis/snapshot is run, the rules defined in the Quality Model are then tested and any violations of the rules are recorded as violations and can be viewed in the Engineering Dashboard.
When an extension has been installed (i.e. an analysis/snapshot has been run), you will be able to see your rule in the Assessment Model under the chosen Technical Criterion:
What can be done with models in Architecture Studio?
Models can be:
- created from scratch in the Console
- applied from a set of predefined templates available in Console
- saved as custom templates for re-use
- imported as files that have been created in the end-user application CAST Architecture Checker.
- attached to Applications for inclusion in an analysis (see Application - Config - Architecture) if they are Architecture Models
- exported as extensions if they are Quality Rule Models
The library is used to store layers and sets for re-use in custom models/templates.
Accessing Architecture Studio
Login with a user account that already has the Admin or Application Owner role and switch to the Architecture Studio:
The Architecture Studio is divided into specific sections, each explained below:
Click to enlarge
This section enables you to switch between managing the different types of Model supported in the Architecture Studio:
- Architecture Models (default selection) > to manage models that check for violations of architecture
- Quality Rule Models > to manage models that can be exported as installable extensions to contain custom rules
- Library Components > a means to manage frequently used Layers and Sets than can be inserted (with their definition) into Architecture Models or Templates, so that you do not need to define the same Sets and Layers again and again
This option enables you to create a brand new Model/Library Component using the interface available in Console. Choose the configuration settings for the new model, then click OK to start the editing process - see AIP Console - Architecture Studio - Model editor for more information: Choose the type of model you would like to create: Authorized model type Forbidden model type Note that you can also create a model using a Product or user-defined template as a starting point. Use the following icon in the Templates section. See also Create an Architecture Model from a template
Authorized / Forbidden Name Enter a name for the model/Library Component.
This option enables you to create a brand new Model/Library Component using the interface available in Console. Choose the configuration settings for the new model, then click OK to start the editing process - see AIP Console - Architecture Studio - Model editor for more information:
Choose the type of model you would like to create:
Authorized model type
Forbidden model type
Note that you can also create a model using a Product or user-defined template as a starting point. Use the following icon in the Templates section. See also Create an Architecture Model from a template
Use this button to import a Model/Library Component created with the end-user application CAST Architecture Checker or one that has been saved to file using Console (i.e. a .castarchitect file or a .castrule file). The item will be displayed in the list. Imported items are stored in the following location:
≥ 2.x \\share\aip-node-data\common-data\upload\architecture\libraries \\share\aip-node-data\common-data\upload\architecture\models \\share\aip-node-data\common-data\upload\architecture\templates 1.x %PROGRAMDATA%\CAST\AipConsole\AipConsole\upload\architecture\libraries %PROGRAMDATA%\CAST\AipConsole\AipConsole\upload\architecture\models %PROGRAMDATA%\CAST\AipConsole\AipConsole\upload\architecture\templates
- If you receive the following errors when uploading a .castarchitect/.castrule file, it is likely that the selected model is invalid in some way. This needs to be corrected before the model can be imported.
- If an existing model already exists with the same file name as the model being imported, a warning will be displayed, which also provides options to choose whether to overwrite the existing file or provide a new file name:
- If Overwrite is selected, then the existing model will get overwritten with the imported model.
- If Rename is selected, a new file name must be entered and the model will be imported with this new file name
- Starting from Console 2.5, if an existing model already exists with the same model ID as the model being imported, a warning will be displayed, which also provides an option to choose a new model ID:
This option toggles the display of Section 2 - Templates. By default the section is hidden.
Click to expand
Section 3 - Templates
This section is:
- available only when working with Architecture Models/Quality Rule Models
- is hidden by default
See AIP Console - Architecture Studio - Templates.
Section 4 - Existing Models/Library Components
See AIP Console - Architecture Studio - Existing Models or AIP Console - Architecture Studio - Library Components: