Skip to content

Commit dc282fb

Browse files
committed
Update doc pages for VS Code release
1 parent 1e8c940 commit dc282fb

22 files changed

+190
-149
lines changed

Diff for: _data/docs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
docs:
33
- home
44
- getting-started
5+
- ide
56
- getting-started-create-project
67
- examples
78
- library

Diff for: _docs/architectural-refactorings/architectural-refactorings.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ image: /img/cm-og-image.png
66

77
This section provides a documentation of all [architectural refactorings (ARs)](https://www.infoq.com/articles/architectural-refactoring/) available in the Context Mapper tool.
88

9+
<div class="alert alert-custom">
10+
<strong>Note:</strong> Architectural Refactorings (AR) are not yet supported in our new Visual Studio Code extension. We continuously work on the extension and will support them soon! To apply the ARs to your CML model you have to use the Eclipse plugin for now. You can find a feature support table for Eclipse and VS Code <a href="/docs/ide/">here</a>.<br/><br/>The AR "Split Bounded Context by Owner" is already supported now (as an example to illustrate how they will be integrated to VS Code).
11+
</div>
12+
913
## Motivation: Why Refactoring?
1014
The provided refactorings ensure that the result is always a correct CML model which compiles without errors.
1115
If you perform similar changes manually, you also have to fix errors that occur manually within the [Context Map](/docs/context-map/).
@@ -49,7 +53,20 @@ The following ARs to change Context Map relationships are currently implemented:
4953
## Examples
5054
You can find [input and corresponding output examples](https://github.com/ContextMapper/context-mapper-examples/tree/master/src/main/cml/architectural-refactorings) for all ARs listed above in our [examples repository](https://github.com/ContextMapper/context-mapper-examples).
5155

52-
## How to apply Architectural Refactorings (ARs)
56+
## How to apply Architectural Refactorings
57+
58+
### Visual Studio Code
59+
In VS Code we suggest the application of Architectural Refactorings via code actions. If your cursor is on a CML object on which an AR can be applied, a light bulb shows up:
60+
61+
<a href="/img/architectural-refactoring-handling-in-vscode-1.png">![Architectural Refactoring Suggestion in VS Code](/img/architectural-refactoring-handling-in-vscode-1.png)</a>
62+
63+
In the case illustrated above, the _PolicyManagementContext_ contains Aggregates that are maintained by different teams and [Split Bounded Context by Owner (AR-3)](/docs/ar-split-bounded-context-by-owners) can be applied:
64+
65+
<a href="/img/architectural-refactoring-handling-in-vscode-2.png">![Architectural Refactoring Application in VS Code](/img/architectural-refactoring-handling-in-vscode-2.png)</a>
66+
67+
By clicking on the light bulb and the AR you want to apply the model will be refactored accordingly.
68+
69+
### Eclipse
5370
Architectural refactorings can be applied within the Context Mapper Eclipse plugin by using the context menu in the DSL editor. With a
5471
right-click on a bounded context or an aggregate the **Context Mapper: Refactor** menu entry appears and lists all refactorings which are applicable to the selected elements:
5572

Diff for: _docs/faqs.md

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Update Site: [https://dl.bintray.com/contextmapper/context-mapping-dsl/updates/]
1313
### How do I create an Eclipse project with a new CML model to start modeling my Context Map?
1414
Consult the page [Create CML Model](/docs/getting-started-create-project/). It describes how to setup your project to get started with modeling CML Context Maps.
1515

16+
### I read about a feature on the Context Mapper website but could not find it in the Visual Studio Code extension. Why?
17+
We have only recently published Context Mapper for Visual Studio Code and do not support all features yet. You can find a feature support table [here](/docs/ide/). If you need all Context Mapper features, you have to use our Eclipse plugin for now. However, we continuously enhance our VS Code extension and want to support all features soon!
18+
1619
### How do I create a new context map?
1720
Just create a file with the file extension **.cml** (Context Mapping Language). Take a look at our example to get an idea how the file content should look like: [https://github.com/ContextMapper/context-mapper-examples](https://github.com/ContextMapper/context-mapper-examples). Let the code completion and other editor features in Eclipse guide you while completing the map and modeling Bounded Contexts.
1821

Diff for: _docs/generators/context-map-generator.md

+5-16
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,15 @@ Our generator produces the following graphical result for the above Context Map:
8181

8282
<a href="/img/context-map-generator-insurance-sample.png">![Insurance Company Example Context Map](/img/context-map-generator-insurance-sample.png)</a>
8383

84-
## User Guide
85-
The Context Map generator can be used within our Eclipse plugin as described below.
84+
## Generating Context Maps
85+
The generators can be called from the context menus of the CML editors in VS Code or Eclipse. A documentation how to call the generators can also be found [here](/docs/generators/#using-the-generators).
8686

87-
### System Requirements
87+
**Note:** All generator outputs will be generated into the *src-gen* folder.
88+
89+
### System Requirements for this Generator
8890
The generator requires [Graphviz](https://www.graphviz.org/) to be installed on your system because it uses it behind the scenes:
8991

9092
* Ensure [Graphviz](https://www.graphviz.org/) is installed on your machine.
9193
* Verify that the binaries of the [Graphviz](https://www.graphviz.org/) installation are part of your PATH environment variable and can be called from the command line, for instance by executing `dot -V` from the command line.
9294
* In Windows this is not the case after the installation of [Graphviz](https://www.graphviz.org/). The default installation path is
9395
`C:\Program Files (x86)\GraphvizX.XX`, which means you have to add `C:\Program Files (x86)\GraphvizX.XX\bin` to your PATH variable.
94-
95-
### Generating Context Maps
96-
The generator can be called from the _Context Mapper_ context menu within the CML editor or on the corresponding CML file:
97-
98-
<a href="/img/context-map-generator-context-menu.png">![Context Map Generator Context Menu](/img/context-map-generator-context-menu.png)</a>
99-
100-
A dialog will allow you to adjust the following *parameters* before the Context Map is generated:
101-
102-
* Formats which shall be exported (PNG, SVG, DOT)
103-
* Size of the image (you can fix the width or height of the image)
104-
* Spacing factor (you can increase or decrease the spacing between edges, which can help to handle overlapping labels)
105-
106-
All the diagrams will be generated into the *src-gen* folder.

Diff for: _docs/generators/generators.md

+11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ based on Freemarker which allows to generate arbitrary textual files.
1616
* [Generic, template-based textual generator (Freemarker Templating)](#generic-textual-generator-freemarker-templating)
1717

1818
## Using the Generators
19+
20+
### Visual Studio Code
21+
The generators are implemented as commands in VS Code. You can find them in the context menu of the CML editor:
22+
23+
<a href="/img/generators-in-vscode-1.png">![Generators Context Menu in VS Code](/img/generators-in-vscode-1.png)</a>
24+
25+
Alternatively you find them in the command palette (Ctrl+Shift+P):
26+
27+
<a href="/img/generators-in-vscode-2.png">![Generators in the VS Code Command Palette](/img/generators-in-vscode-2.png)</a>
28+
29+
### Eclipse
1930
The generators can be accessed through the Context Menu in the project explorer (right-click to *.cml file) or directly in the CML editor as the following screenshot shows:
2031

2132
<a href="/img/generators-context-menu.png">![Generators Context Menu in Eclipse](/img/generators-context-menu.png)</a>

Diff for: _docs/generators/generic-freemarker-generator.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -457,33 +457,33 @@ This part of the DSL is based on [Sculptor](http://sculptorgenerator.org/), and
457457
```
458458

459459
## User Guide
460-
To use our generic, [Freemarker](https://freemarker.apache.org/ template-based generator, you need two files within your Eclipse workspace:
460+
To use our generic, [Freemarker](https://freemarker.apache.org/) template-based generator, you need two files within your workspace:
461461

462462
* The input CML model (*.cml)
463463
* The [Freemarker](https://freemarker.apache.org/) template (*.ftl)
464464

465-
With a right-click on the CML file or within the CML editor, you can start the generator. You find it in the _Context Mapper_ context menu:
466-
467-
<a href="/img/generic-generator-context-menu.png">![Generic Textual Generator Context Menu](/img/generic-generator-context-menu.png)</a>
468-
469-
A dialog allows you to select a [Freemarker](https://freemarker.apache.org/) template (*.ftl file), which must be located somewhere in your workspace:
470-
471-
<a href="/img/generic-generator-dialog.png">![Generic Textual Generator Dialog](/img/generic-generator-dialog.png)</a>
472-
473-
You generate the required file when finishing the dialog:
474-
475-
<a href="/img/generic-generator-result.png">![Generic Textual Generator Dialog](/img/generic-generator-result.png)</a>
465+
The generator can be called from the context menus of the CML editors in VS Code or Eclipse. A documentation how to call the generators can also be found [here](/docs/generators/#using-the-generators).
466+
467+
**Note:** All generator outputs will be generated into the *src-gen* folder.
468+
469+
Eclipse as well as VS Code will ask you to choose a *.ftl file from your filesystem and to define the output file name (which will then be generated into _src-gen_).
476470

477471
### Freemarker Version
478472
Context Mapper uses [Freemarker](https://freemarker.apache.org/), currently Version 2.3.30.
479473

480474
## Example Templates
475+
476+
### Eclipse
481477
The Context Mapper Eclipse plugin comes with sample Freemarker templates. Use the _Freemarker Generator Template Examples_ wizard via _File -> New -> Example..._ to create the sample project containing the Freemarker templates:
482478

483479
<a href="/img/screenshot-new-freemarker-example-project-1.png">![Create Sample Project with Freemarker Templates (1)](/img/screenshot-new-freemarker-example-project-1.png)</a>
484480

485481
<a href="/img/screenshot-new-freemarker-example-project-2.png">![Create Sample Project with Freemarker Templates (2)](/img/screenshot-new-freemarker-example-project-2.png)</a>
486482

483+
### Visual Studio Code
484+
In VS Code we do not deliver the example templates with the extension itself. However, you can just download the *.ftl files from [here](https://github.com/ContextMapper/context-mapper-dsl/tree/master/org.contextmapper.dsl.ui/samples/freemarker) and use it with our generator in VS Code.
485+
486+
### Provided Examples
487487
The project currently contains the following example templates:
488488

489489
* Ubiquitous language glossary written in Markdown (currently a full report)

Diff for: _docs/generators/mdsl.md

+10-28
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Our [MDSL](https://socadk.github.io/MDSL/) generator automatically produces (mic
1010
DDD context maps written in CML. The generator creates the contracts according to the following mapping, which reflects our proposal
1111
how we would derive (micro-)services from models based on strategic DDD <!-- (submitted for SummerSoC 2020) -->. The generator aims at providing assistance regarding how your system can be implemented as a (micro-)service-oriented architecture.
1212

13-
### Language Mapping
13+
## Language Mapping
1414
<!-- TODO retrofit SummerSoC paper extensions to this table -->
1515

1616
| CML Input | MDSL Output | Description |
@@ -59,7 +59,7 @@ unspecified placeholder element `P` in [MDSL](https://socadk.github.io/MDSL/), a
5959
<div class="highlight"><pre><span></span><span class="k">data type</span> JustAnUnspecifiedParameterType <span class="k">P</span>
6060
</pre></div>
6161

62-
### Example
62+
## Example
6363
An exemplary API description in [MDSL](https://socadk.github.io/MDSL/), generated by Context Mapper, is:
6464
<div class="highlight"><pre><span></span><span class="c">// Generated from DDD Context Map &#39;Insurance-Example_Context-Map.cml&#39; at 21.10.2019 17:48:52 CEST.</span>
6565
<span class="k">API description</span> CustomerManagementContextAPI
@@ -105,7 +105,7 @@ An exemplary API description in [MDSL](https://socadk.github.io/MDSL/), generate
105105

106106
*Note:* This example has been generated from our [insurance example](https://github.com/ContextMapper/context-mapper-examples/tree/master/src/main/cml/insurance-example), which you can find in our [examples repository](https://github.com/ContextMapper/context-mapper-examples).
107107

108-
### Microservice API Patterns (MAP) Decorators
108+
## Microservice API Patterns (MAP) Decorators
109109
The MDSL language allows modelers to specify the roles of endpoints and operations according to the endpoint- and operation-level
110110
[responsibility patterns in MAP](https://microservice-api-patterns.org/patterns/responsibility/). Our generators match the corresponding pattern names in comments on Aggregates and methods. The following CML code illustrates how
111111
the MAP patterns can be added in CML. In this case we use the _Information Holder Resource_ pattern on the Aggregate level and the _Retrieval Operation_ pattern
@@ -151,7 +151,7 @@ The patterns are detected by our generator and mapped to the corresponding langu
151151

152152
As illustrated above, the patterns on the endpoint/resource level are added with the _serves as_ keyword and on the operation level with the _with responsibility_ keyword. In the following we list the supported patterns:
153153

154-
#### Endpoint Role Patterns
154+
### Endpoint Role Patterns
155155
* [PROCESSING_RESOURCE](https://microservice-api-patterns.org/patterns/responsibility/endpointRoles/ProcessingResource)
156156
* [INFORMATION_HOLDER_RESOURCE](https://microservice-api-patterns.org/patterns/responsibility/endpointRoles/InformationHolderResource)
157157
* [OPERATIONAL_DATA_HOLDER](https://microservice-api-patterns.org/patterns/responsibility/informationHolderEndpoints/OperationalDataHolder)
@@ -160,38 +160,20 @@ As illustrated above, the patterns on the endpoint/resource level are added with
160160
* [TRANSFER_RESOURCE](https://microservice-api-patterns.org/patterns/responsibility/informationHolderEndpoints/TransferResource)
161161
* [LOOKUP_RESOURCE](https://microservice-api-patterns.org/patterns/responsibility/informationHolderEndpoints/LookupResource)
162162

163-
#### Operation Responsibility Patterns
163+
### Operation Responsibility Patterns
164164
* [COMPUTATION_FUNCTION](https://microservice-api-patterns.org/patterns/responsibility/processingResponsibilities/ComputationFunction)
165165
* [NOTIFICATION_OPERATION](https://microservice-api-patterns.org/patterns/responsibility/processingResponsibilities/NotificationOperation)
166166
* [RETRIEVAL_OPERATION](https://microservice-api-patterns.org/patterns/responsibility/processingResponsibilities/RetrievalOperation)
167167
* [STATE_TRANSITION_OPERATION](https://microservice-api-patterns.org/patterns/responsibility/processingResponsibilities/StateTransitionOperation)
168-
<!-- * [EVENT_PROCESSOR](https://microservice-api-patterns.org/patterns/responsibility/processingResponsibilities/EventProcessor)
169-
* [BUSINESS_ACTIVITY_PROCESSOR](https://microservice-api-patterns.org/patterns/responsibility/processingResponsibilities/BusinessActivityProcessor) -->
170168

171169
Please refer to the pattern texts on the MAP website for explanations of these decorators.
172170

173-
## User Guide
174-
You can generate [MDSL](https://socadk.github.io/MDSL/) (micro-)service contracts from your CML model as follows.
171+
## Generating the MDSL Contracts
172+
The generators can be called from the context menus of the CML editors in VS Code or Eclipse. A documentation how to call the generators can also be found [here](/docs/generators/#using-the-generators).
175173

176-
When you a right-click on a CML file in Eclipse, you a **Context Mapper** context menu will pop up. The action *MDSL:
177-
Generate Service Contracts* allows you to generate the contracts for all upstreams in your Context Map:
174+
**Note:** All generator outputs will be generated into the *src-gen* folder.
178175

179-
<a href="/img/mdsl-generator-1.png">![MDSL Generator](/img/mdsl-generator-1.png)</a>
180-
181-
<div class="alert alert-custom">
182-
<strong>Note</strong> that the <strong>Context Mapper</strong> menu entry is also available within the context menu uf the CML editor.
183-
(right-click anywhere in the editor).
184-
</div>
185-
186-
All [MDSL](https://socadk.github.io/MDSL/) files will be generated into the **src-gen** folder of the project:
187-
188-
<a href="/img/mdsl-generator-2.png">![MDSL Generator Result](/img/mdsl-generator-2.png)</a>
189-
190-
<div class="alert alert-custom">
191-
<strong>Note:</strong> The MDSL Eclipse plugin is not yet available for download on an Eclipse update site. At the moment you can open the `*.mdsl` files with a text editor only (with no syntax highlighting and editor support). You can also request access to the MDSL repository on GitHub by [contacting the MAP team](https://microservice-api-patterns.org/about).
192-
</div>
193-
194-
### Protected Regions
176+
## Protected Regions
195177
After you have generated an MDSL contract, you can add protected regions for **data types**, **endpoint types**, **API providers**, and **API clients** if you want to modify parts of the contract and protect them from being overwritten. The following example shows the corresponding comments that are required to begin and end the four different protected regions:
196178

197179
<div class="highlight"><pre><span></span><span class="c">// Generated from DDD Context Map &#39;Insurance-Example_Context-Map.cml&#39; at 21.10.2019 17:48:52 CEST.</span>
@@ -275,4 +257,4 @@ For example, you can move a set of _data types_ into the corresponding protected
275257
</pre></div>
276258

277259
## MDSL Support
278-
The current version of our MDSL generator is compatible with the MDSL version _1.2.0_. For further questions regarding [MDSL](https://socadk.github.io/MDSL/), please visit its website [https://socadk.github.io/MDSL](https://socadk.github.io/MDSL).
260+
The current version of our MDSL generator is compatible with the MDSL version _3.1.1_. For further questions regarding [MDSL](https://socadk.github.io/MDSL/), please visit its website [https://socadk.github.io/MDSL](https://socadk.github.io/MDSL).

0 commit comments

Comments
 (0)