forked from structurizr/dotnet
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5179f65
commit 5f51554
Showing
3 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Model | ||
|
||
This is the definition of the software architecture model, consisting of people, software systems, containers, components, code elements and deployment nodes, plus the relationships between them. | ||
|
||
All of the .NET classes representing people, software systems, containers, components, etc, and the functionality related to creating a software architecture model can be found in the [Structurizr](https://github.com/structurizr/dotnet/tree/master/Structurizr.Core/Model) namespace. | ||
|
||
An empty model is created for you when you create a workspace. | ||
|
||
```c# | ||
Workspace workspace = new Workspace("Getting Started", "This is a model of my software system."); | ||
Model model = workspace.Model; | ||
``` | ||
|
||
Once you have a reference to a ```Model``` instance, you can add elements to it manually or automatically, using static analysis and reflection techniques. | ||
|
||
## 1. Manual model creation | ||
|
||
Manually adding elements to the model is the simplest way to use the Structurizr for Java client library. This can be done using the various public ```Add*``` methods that you'll find on ```Model```, ```SoftwareSystem```, ```Container```, ```Component```, etc. | ||
|
||
## 2. Automatic extraction | ||
|
||
You can also extract components (and add them to a ```Container``` instance) automatically from a given codebase, using a number of different component finder strategies. See [Component finder](https://github.com/structurizr/dotnet-extensions/blob/master/Structurizr.Analysis/Analysis/ComponentFinder.cs) for more details. | ||
|
||
Although there is nothing included in the Structurizr for .NET library to support this, you could also choose to parse an external definition of your software architecture (e.g. an AWS infrastructure topology, another Architecture Description Language, etc) and create model elements accordingly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Views | ||
|
||
Once you've [added elements to a model](model.md), you can create one or more views to visualise parts of the model, which can subsequently be rendered as diagrams by a number of different tools. | ||
|
||
Structurizr for .NET supports all of the view types described in the [C4 model](https://c4model.com), and the .NET classes implementing these views can be found in the [Structurizr](https://github.com/structurizr/dotnet/tree/master/Structurizr.Core/View) namespace as follows: | ||
|
||
* [SystemContextView](https://github.com/structurizr/dotnet/blob/master/Structurizr.Core/View/SystemContextView.cs) | ||
* [ContainerView](https://github.com/structurizr/dotnet/blob/master/Structurizr.Core/View/ContainerView.cs) | ||
* [ComponentView](https://github.com/structurizr/dotnet/blob/master/Structurizr.Core/View/ComponentView.cs) | ||
* [SystemLandscapeView](https://github.com/structurizr/dotnet/blob/master/Structurizr.Core/View/SystemLandscapeView.cs) | ||
* [DynamicView](https://github.com/structurizr/dotnet/blob/master/Structurizr.Core/View/DynamicView.cs) | ||
* [DeploymentView](https://github.com/structurizr/dotnet/blob/master/Structurizr.Core/View/DeploymentView.cs) | ||
|
||
## Creating views | ||
|
||
All views are associated with a [ViewSet](https://github.com/structurizr/dotnet/blob/master/Structurizr.Core/View/ViewSet.cs), which is created for you when you create a workspace. | ||
|
||
```java | ||
Workspace workspace = new Workspace("Getting Started", "This is a model of my software system."); | ||
ViewSet views = workspace.Views; | ||
``` | ||
|
||
Use the various ```Create*View``` methods on the ```ViewSet``` class to create views. | ||
|