Demos and sample for my "Designing a UI for Microservices" talk
MIT License
This repository contains all the demos run during the Designing a UI for Microservices
talk.
ViewModel Composition is deeply discussed on my blog in the ViewModel Composition category.
The following requirements must be met to run the demos successfully:
c:\dev
, to avoid any "path too long" errorF1
on all supported operating systems, for more information on VS Code keyboard shortcuts, refer to this page)Reopen in Container
, the command palette supports auto-completion; the command should be available by typing reop
Wait for Visual Studio Code Dev containers extension to:
Note: no changes will be made to your Visual Studio Code installation; all changes will be applied to the VS Code instance running in the remote container
The repository devcontainer
configuration will:
ms-dotnettools.csharp
)ckolkman.vscode-postgres
)Once the configuration is completed, VS Code will show a new Ports
tab in the bottom-docked terminal area. The Ports
tab will list all the ports the remote containers expose.
To execute the demo, open the root folder in VS Code, press F1
, and search for Reopen in container
. Wait for the Dev Container to complete the setup process.
Once the demo content has been reopened in the dev container:
F1
, search for Run task
, and execute the desired task to build the solution or to build the solution and deploy the required dataRun and Debug
VS Code section and select the command you want to execute.The repository root contains a request.http file listing some test requests. Using VS Code to execute requests can be used by adding the REST Client that is automatically configured when using Dev Conatainers.
The ASP.Net Core API Gateway
, 01 and 02, solution demos ViewModel Composition techniques built on top of .Net Core.
The CompositionGateway
project shows how to create and host a .Net Core API Gateway or reverse proxy, that composes HTTP requests to multiple API backends.
To run this sample, ensure that the following projects are set as startup projects:
Sales.Api
Shipping.Api
Warehouse.Api
Catalog.Api
CompositionGateway
The WebApp
project is a .Net Core Mvc app that composes HTTP requests to multiple backends directly in Mvc Views as Controllers are invoked. This demo implements ViewModel Composition concepts, introducing Branding as a contract at the UI level.
To run this sample, ensure that the following projects are set as startup projects:
Sales.Api
Shipping.Api
Warehouse.Api
Catalog.Api
WebApp
WebApp
project is a .Net Core Mvc app that composes HTTP requests to multiple backends directly in Mvc Views as Controllers are invoked. This demo implements ViewModel Composition and UI Composition concepts.
To run this sample, ensure that the following projects are set as startup projects:
Sales.Api
Shipping.Api
Warehouse.Api
Catalog.Api
WebApp
All four solutions contain integration tests demonstrating how to test composition scenarios.
To simplify the sample as much as possible, frontend applications, such as CompositionGateway
and WebApp
, directly reference ViewModel Composition and UI Composition assemblies.
This demo is built using NServiceBus Sagas; I work for Particular Software, the makers of NServiceBus.