Сергей Корж ".net core - новый старт старой платформы"

32
.NET Core новый старт старой платформы Сергей Корж Korzh.com [email protected] http://korzh.com http://facebook.com/sergiy.korzh @korzhs

Upload: fwdays

Post on 11-Jan-2017

348 views

Category:

Technology


2 download

TRANSCRIPT

.NET Coreновый старт старой платформы

Сергей КоржKorzh.com

[email protected]://korzh.comhttp://facebook.com/sergiy.korzh@korzhs

Agenda

2

1 .NET CoreCurrent state of .NET Framework, .NET Core benefits, .NET Standard library

ASP.NET CoreASP.NET today, ASP.NET Core benefits, Minimal ASP.NET Core project, Middleware pipeline, DI, Configuration, Logging

3 Tips/Tricks & TakeawaysBuilding your own middleware, Using DI to change default services, 2 Identity pipelines

4 Roadmap & conclusions

.NET Framework today

Cons:• Not cross-platform

• Tied to system

• DLL Hell

• Too long updates cycle

Pros:• Mature (since 2001)

• Large installation base

• Strong community

.NET Core

.NET Core Command Line Interface (CLI)

$ dotnet new

$ dotnet restore

$ dotnet build

$ dotnet run

$ dotnet publish

$ dotnet /path/to/assembly

.NET Standard

WINDOWS APPLICATIONS

CROSS-PLATFORMSERVICES

MOBILE APPLICATIONS

.NET FRAMEWORK .NET CORE XAMARIN

.NET Standard

.NET Standard (one library to rule them all)

.NET Standard platforms support

ASP.NET 4.6

ASP.NET Problems

Monolithic (System.Web)

Platform dependent (Windows only)

Long development cycle

Proprietary

Duplication of concepts(controllers, actions in MVC and WebAPI)

ASP.NET Core

Totally modular

Cloud ready

Open source

Faster development cycle

Choose your own editor and tool

Cross platform

Fast!

ASP.NET Core benchmarks

Request / second (millions) based on preliminary internal tests. Official tests will be available at TechEmpower website

ASP.NET Today (with Core)

ASP.NET Core: Type of projects

ASP.NET Core: Middleware pipelineEverything in your ASP.NET Core app is a middleware now!

ASP.NET Core: minimal app

ASP.NET Core: Startup class

ASP.NET Core: Startup class (2)

ASP.NET Core: Dependency Injection (1)

ASP.NET Core: Dependency Injection (2)

ASP.NET Core: Dependency Injection (3 – context accessor)

ASP.NET Core: Configuration (1)

ASP.NET Core: Configuration (2)

ASP.NET Core: Configuration (3 – user secrets)

ASP.NET Core: Writing your own middleware (1)

ASP.NET Core: Writing your own middleware (2)

ASP.NET Core: Writing your own middleware (3)

.NET Core Roadmap

Version 1.1 (Q4 2016 / Q1 2017)• C# 7 support• F# support• .NET Standard 2.0 (?)• Support for .csproj / MSBuild project system• URL rewriting middleware• Few improvement for Azure

Version 1.0.1 – released

Version 1.2 (Q1 2017 / Q2 2017)• WebSockets• SignalR• Razor Pages (view without MVC controllers)

Conclusions (is .NET Core / ASP.NET Core a right choice?)

• Desktop applications (WinForms, WPF)• Mobile applications• Platform-tied (Windows)• WebForms applications

No (or just impossible to use)

• Small/middle-size MVC web-apps (ASP.NET Core over .NET Framework 4.x)• New web-applications• Cross-platform is a requirement

Yes (or at least worth to try)

NB: Consider targeting your shared code libraries as .NET Standard