Skip to content
Demos and sample for my "Designing a UI for Microservices" talk
C# HTML Other
Branch: master
Clone or download
mauroservienti Merge pull request #177 from mauroservienti/dependabot/nuget/ASP.Net-…
…Mvc-Core/Microsoft.EntityFrameworkCore.InMemory-2.2.6

Bump Microsoft.EntityFrameworkCore.InMemory from 2.2.4 to 2.2.6 in /ASP.Net Mvc Core
Latest commit 10f98d1 Jul 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ASP.Net Core API Gateway - 01 Bump Microsoft.EntityFrameworkCore.InMemory Jul 10, 2019
ASP.Net Core API Gateway - 02 Bump Microsoft.EntityFrameworkCore.InMemory Jul 10, 2019
ASP.Net Mvc Core UI Composition Bump Microsoft.EntityFrameworkCore.InMemory Jul 10, 2019
ASP.Net Mvc Core Bump Microsoft.EntityFrameworkCore.InMemory in /ASP.Net Mvc Core Jul 10, 2019
shared/JsonUtils "ASP.Net Core API Gateway - 01" to ServiceComposer Apr 25, 2019
targets Improve build process Jan 8, 2019
.gitattributes repo init Apr 27, 2017
.gitignore repo init Apr 27, 2017
Build.cmd Improve build process Jan 8, 2019
LICENSE Initial commit May 3, 2017
README.md
appveyor.yml Improve build time on AppVeyor Jun 24, 2019
postman-collection.json update postman collection to remove action from url May 6, 2019

README.md

Designing a UI for Microservices - Demos

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.

Requirements

ASP.Net Core API Gateway - demos

The ASP.Net Core API Gateway, 01 and 02, solution demos ViewModel Composition techniques built on top of .Net Core.

CompositionGateway

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

As client to test the funzionality a REST client such as Postman can be used.

  • ASP.Net Core API Gateway - 01 demoes how single items composition works
  • ASP.Net Core API Gateway - 02 demoes how single items and items list composition works

The postman-collection.json file can be imported into Postman, creating a collection with all the HTTP requests needed to test both demos.

ASP.Net Mvc Core - Demo

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 the concept of 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

ASP.Net Mvc Core UI Composition - Demo

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

Note

To simplify as much as possible the sample, frontend applications, such as CompositionGateway and WebApp, directly reference ViewModel Composition and UI Composition assemblies. This allows also to avoid the usage of Visual Studio post build events, that at the time of this writing are affected by a bug when used in combination with .NET Core, causing events variable to not be populated as expected.

A workaround is to use a MSBuild Exec task to simulate post build events. E.g. in order to try to run samples removing all hard-coded references:

  1. Remove references to composition assemblies from CompositionGateway and WebApp project(s)
  2. Edit the project file of composition assemblies that need to be copied to CompositionGateway and WebApp output folders by adding the following to each of them:
  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
    <Exec Command="
     copy &quot;$(TargetDir)$(TargetName).dll&quot; &quot;$(SolutionDir)CompositionGateway\$(OutDir)$(TargetName).dll&quot; /Y /B
     copy &quot;$(TargetDir)$(TargetName).pdb&quot; &quot;$(SolutionDir)CompositionGateway\$(OutDir)$(TargetName).pdb&quot; /Y /B" />
  </Target>

Replacing CompositionGateway with WebApp for the last 2 demos.

NOTE:

  • All solutions are configured to use the SwitchStartupProject Visual Studio Extension to manage startup projects. The extension is not a requirement, but it's comfortable.
You can’t perform that action at this time.