Awesome Open Source
Awesome Open Source

api client server

Starship Traveler Blazor Demo

Screenshot

I created this demo app for the DevOne 2019 conference. It has been updated for my Blazor sessions at Techorama Belgium 2019, .NET Day Switzerland, and the International JavaScript Conferences in London and Munich, Webinar for M&F Engineering, Switzerland. It showcases the capabilities of the ASP.NET Core Blazor framework.

Note that this sample will not be continuously maintained. I will update it every now and then whenever I use it in workshops and/or conference talks. If you update and/or extend it, feel free to send me a pull request.

Demo Content

  • Fundamentals of programming with Blazor in a non-trivial app
  • Same app in Blazor Webassembly and Server-side Blazor
  • Encapsulation of components in a class library that can be used on client and server
  • Code sharing between client and server
  • Use of "legacy" .NET components (.NET Framework library) in Blazor WASM and Server-side Blazor
  • Debugging
  • Release deployments using container technology
  • CI/CD with GitHub Actions (deployment to Azure App Service)

Run the Full Demo

  • Install Blazor by installing Visual Studio Preview.

  • Clone the repository.

  • Open the solution StarshipTraveler.sln and run it.

Replay Demo?

Do you want to try the demo yourself? Here is what you do:

  • Install Blazor by installing Visual Studio Preview.

  • Clone the repository.

  • Start the API project because the Blazor frontend consumes this Web API. Note that you should run the Web API as a console app or in a Docker container. Don't start the API in IIS as this can lead to CORS issues.

  • Open the solution in the Start folder.

  • Follow the steps mentioned in storyboard.md. You will find the files referenced there in the Assets folder.

Docker

This repository contains Dockerfiles for all three projects:

  • Api.Dockerfile
  • Client.Dockerfile (WASM Client)
  • Server.Dockerfile (Serverside Blazor)

GitHub Actions build the Dockerfiles and publish the resulting images to Docker hub:

Note that the Dockerfiles build release versions of the apps. Therefore, you can use the resulting images to demonstrate WASM differences between debug and release builds.

Azure

Currently, the Docker images are deployed in Azure. Note that I do not always keep those deployments active. I sometimes turn them off to save costs when not doing presentations.

Recording

Rainer on Stage


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Sharp (275,773
C Sharp (275,773
Asp Net Core (3,642
Blazor (898
Blazor Webassembly (219
Razor (182
Blazor Server (169
Related Projects