Skip to content

Commit

Permalink
Added some docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrowndotje committed Feb 17, 2021
1 parent 5179f65 commit 5f51554
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

# Structurizr for .NET

This GitHub repository is an official client library for the [Structurizr](https://structurizr.com) cloud service and on-premises installation, both of which are web-based publishing platforms for software architecture models based upon the [C4 model](https://c4model.com). __This repository is supported by Structurizr Limited__, as a part of the Structurizr service.

The component finder, adr-tools importer, and alternative diagram export formats (e.g. PlantUML) can be found at [Structurizr for .NET extensions](https://github.com/structurizr/dotnet-extensions).
This GitHub repository is an official client library for the [Structurizr](https://structurizr.com) cloud service and on-premises installation, both of which are web-based publishing platforms for software architecture models based upon the [C4 model](https://c4model.com). The component finder, adr-tools importer, and alternative diagram export formats (e.g. PlantUML) can be found at [Structurizr for .NET extensions](https://github.com/structurizr/dotnet-extensions).

## A quick example

Expand Down Expand Up @@ -39,12 +37,17 @@ The view can then be exported to be visualised using the [Structurizr service](h
* Introduction
* [Getting started](docs/getting-started.md)
* [About Structurizr and how it compares to other tooling](https://structurizr.com/help/about)
* [Why use code?](https://structurizr.com/help/code)
* [Basic concepts](https://structurizr.com/help/concepts) (workspaces, models, views and documentation)
* [C4 model](https://structurizr.com/help/c4)
* [Binaries](docs/binaries.md)
* [API Client](docs/api-client.md)
* [Usage patterns](docs/usage-patterns.md)
* Diagrams
* [FAQ](docs/faq.md)
* Model
* [Creating your model](docs/model.md)
* [Implied relationships](docs/implied-relationships.md)
* Views
* [System Context diagram](docs/system-context-diagram.md)
* [Container diagram](docs/container-diagram.md)
* [Component diagram](docs/component-diagram.md)
Expand Down
24 changes: 24 additions & 0 deletions docs/model.md
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.
24 changes: 24 additions & 0 deletions docs/views.md
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.

0 comments on commit 5f51554

Please sign in to comment.