Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Developing multi-platform microservices using .NET core

178 views

Published on

In the past, C# developers’ could only look in envy as the world moved to container based micro services and cloud deployment – until now.
With the new ASP.NET Core a C# developer can write REST based microservices using the latest and greatest Visual Studio and deploy them in a different OS - or the cloud using Docker, quickly and effortlessly.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Developing multi-platform microservices using .NET core

  1. 1. Developing Microservices using .NET Core Dror Helper | http://helpercode.com | @dhelper Code Samples: https://github.com/dhelper/DotNetCoreMicroservices
  2. 2. Consultant & Architect Developing software since 2002 Clean Coder & Test Driven Developer Pluralsight author https://www.pluralsight.com/authors/dror-helper B: http://helpercode.com T: @dhelper About.ME
  3. 3. New project – Day 0.1 Gather top talent Cutting edge technologies and tools N-Tier /Hexagonal architecture Break functionality into assemblies CI/CD Shared responsibility
  4. 4. Same Project – after a few <fill in the blank> The whole team works on one codebase Technology became obsolete Inter-module dependencies Long and painful build process Deployment takes forever The blame game
  5. 5. Spoiler Alert!
  6. 6. A Solution - Microservices Create functionality from small building blocks Small teams organized around domains Independent technology stacks Isolation Smart endpoints/dumb pipes Manageable codebase
  7. 7. https://github.com/dotnet-architecture/eShopOnContainers
  8. 8. The .NET Family .NET Framework Xamarin .NET Core
  9. 9. Next Generation Websites and Services High Performance Modular Compostable Framework Open Source Multi Platform ASP.NET Core .NET Framework .NET Core
  10. 10. ASP.NET Core Service Architecture Controller Business Logic Data access layer
  11. 11. ASP.NET Core Middleware Middleware 3 // logic // logic Middleware 2 // logic Next(); // logic Middleware 1 // logic Next(); // logic Request Response
  12. 12. Say hello to my little friend App App App
  13. 13. Works On My Machine!
  14. 14. Docker for Developers docker run –name <img> -e <key>=<value> -p <out>:<in> <container> docker run –name myDB –e POSTGRES_USER=dror –p 5432:5432 postgres:latest • docker ps [-a] • docker stop <container id> • docker rm <container id> • docker system prune
  15. 15. Reduce the Pain of multi-container deplotment > docker run … > docker run … > docker run … . . . version: '3' services: mysimplewebapi: image: mysimplewebapi depends_on: - "postgres_image" build: context: ./MySimpleWebApi dockerfile: Dockerfile environment: DB_CONNECTION_STRING: “..." postgres_image: image: postgres:alpine ports: - "5432:5432" environment: POSTGRES_USER: “..." docker-compose
  16. 16. Multiplatform Microservices (in .NET) Docker Http ASP.NET Core
  17. 17. Thank you  Dror Helper | http://helpercode.com | @dhelper Code Samples: https://github.com/dhelper/DotNetCoreMicroservices

×