Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ASP.NET Core und ASP.NET Core MVC (BASTA! Spring 2017)

ASP.NET Core und ASP.NET Core MVC (BASTA! Spring 2017)

Introduction to ASP.NET Core and ASP.NET Core MVC

Christian Nagel

February 22, 2017
Tweet

More Decks by Christian Nagel

Other Decks in Programming

Transcript

  1. ASP.NET Core und ASP.NET MVC Core Christian Nagel csharp.christiannagel.com @christiannagel

  2. Goals • Warum ASP.NET Core? • Foundations ASP.NET Core •

    Intro ASP.NET MVC Core • Neue Tools (csproj)
  3. Non-Goals • Alle Features von ASP.NET Core / MVC •

    No Crashes (Visual Studio 2017 RC)
  4. Agenda – 3 Schritte Why? What? ASP.NET Core ASP.NET MVC

  5. Christian Nagel • csharp.christiannagel.com • www.cninnovation.com • @christiannagel

  6. WHY? WHAT?

  7. Why? • Reduce Overhead • Modern Architecture • Multi-Platform

  8. What? • .NET Core • .NET Standard • ASP.NET Core

  9. .NET Core • New Implementation of .NET • Multi-Platform •

    Lightweight, Modern Patterns • Long Term Support (LTS, 1.0.3) • Current Releases (1.1), new Features
  10. .NET Standard • Create Libraries that can be used between

    different .NET Implementations • Replaces Portable Library
  11. ASP.NET Core • New Web Framework • Fast, Modern Patterns

    • Basis: .NET Core oder .NET Framework
  12. ASP.NET CORE

  13. Topics • Startup • Simple Routing • Dependency Injection •

    Configuration • Logging
  14. Startup

  15. Startup • Build a WebHost (WebHostBuilder) • Configure Services (Startup)

    • Configure Request Pipeline (IApplicationBuilder) • HTTP Request & Response (HttpContext)
  16. Simple Routing

  17. Simple Routing • Define simple routes • Map with a

    predicate
  18. Dependency Injection

  19. Dependency Injection • Microsoft.Extensions.DependencyInjection • Container Registration – Transient/Scoped/Singleton •

    Injection in Controller/Service/View
  20. Configuration • Überfrachtetes web.config • Production/Staging?

  21. Configuration

  22. Diagnostics / Logging • Trace? TraceSource? Nlog? • Switch Logging

    Technology?
  23. Diagnostics / Logging • ILoggerFactory • ILogger

  24. What you’ve seen… • Easy to use • Moderne Patterns

    • Flexible Architektur
  25. ASP.NET MVC CORE

  26. Topics • Template Generated Code • Tag Helpers • View

    Components
  27. dotnet new • DependencyInjection • Configuration • Logging • Razor

    • Logging
  28. Tag Helpers • HTML Helpers werden auch unterstützt • Tag

    Helpers mit HTML Syntax • Vergleich mit Angular • Mixed C#/HTML wird reduziert
  29. View Components • Functionality independent of Controller • .NET Core

    1.1: – Tag Helpers
  30. What you’ve seen… • Ähnlich zu ASP.NET MVC 5.x •

    Zusätzliche Features • Basis ASP.NET Core
  31. Summary • Multi Platform • Modern Patterns

  32. Questions?

  33. More Information • https://csharp.christiannagel.com • https://dot.net • https://github.com/ProfessionalCSharp • https://github.com/aspnet

  34. Thank you!

  35. Images Copyright • Problems © 123elis • Construction Worker ©

    Bogdanhoda • Sky Train © Szefei • Injection © Mabe123 • Control Panel © Antonmatveev • Telescope © Rudchenko • Modern Building © Renkshot • Plastic Blocks © Rayisa Nalivayko • Eye scanning © Saniphoto • Problem Solving Series © Pablo631 • Frankfurt © Rudi1976 http://www.dreamstime.com