Successfully reported this slideshow.
Your SlideShare is downloading. ×

Microsoft love Open Source: ASP.NET Core

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 18 Ad
Advertisement

More Related Content

Slideshows for you (20)

Viewers also liked (20)

Advertisement

Similar to Microsoft love Open Source: ASP.NET Core (20)

Recently uploaded (20)

Advertisement

Microsoft love Open Source: ASP.NET Core

  1. 1. ASP.NET Core Microsoft <3 Open-source: 1
  2. 2. History of ASP.NET 2 1996 - Active Server Pages (ASP) 2002 – ASP.NET 2008 – ASP.NET MVC 2010 – ASP.NET Web Pages 2012 – ASP.NET Web API, SignalR 2014/2016 – ASP.NET Core Microsoft <3 Open source: ASP.NET Core
  3. 3. The current version 3 • Limited hosting(IIS onlyzz) • Microsoft oriented • Machine oriented framework • Legacy code Microsoft <3 Open source: ASP.NET Core
  4. 4. What about ASP.NET Core? 4 • The last version of ASP.NET • Completely rewritten • Runs over .NET standard or .NET Core • Implements Web API and MVC Microsoft <3 Open source: ASP.NET Core
  5. 5. Why use ASP.NET Core? 5 • Development cycle improvement • Open source <3 • Cross-platform Microsoft <3 Open source: ASP.NET Core
  6. 6. Development cycle improvement 6Microsoft <3 Open source: ASP.NET Core • Light-weight and modular • Features are splitted into single Nuget modules • Cloud oriented: framework is part of web app • Ability to host on IIS, Kestrel - self-host in your own process • Visual studio is NOT required • Performance boost: ASP.NET 4.6 <50k req/sec ASP.NET Core (.NET Core, Linux): 900k req/sec ASP.NET Core (.NET Core, Windows): >1.1m req/sec https://github.com/aspnet/benchmarks
  7. 7. Open source 7Microsoft <3 Open source: ASP.NET Core • ASP.NET Core is available on GitHub • .NET Foundation supports open-source .NET projects • Community Standup every day • The 60% of push came from community (http://mattwarren.org/2016/11/23/open-source-net-2-years-later/)
  8. 8. Cross platform 8Microsoft <3 Open source: ASP.NET Core • ASP.NET Core runs on Windows, Mac and Linux • No more Visual Studio: Project Rider, Visual Studio Code, Omni sharp, Visual Studio for Mac • Use kestrel as default Web server
  9. 9. ASP.NET Core Project Structure • wwwroot: contains all static files; • project.json: describes the application and its .NET dependencies; • Program.cs: is the main entry point; • Startup.cs: is now responsible for all app startup tasks contains all routing configurations and DI configurations; • appsettings.json: contains project connection strings and settings is the primary replacement for the Web.Config; Microsoft <3 Open source: ASP.NET Core 9
  10. 10. DEMO Developing ASP.NET on Mac using Yeoman generator https://github.com/OmniSharp/generator-aspnet Microsoft <3 Open source: ASP.NET Core 10
  11. 11. ASP.NET Core MVC: New features • Tag helpers • View components • Dependency Injection framework • xUnit.Net Microsoft <3 Open source: ASP.NET Core 11
  12. 12. Tag Helpers 12Microsoft <3 Open source: ASP.NET Core An HTML-friendly development experience For the most part, Razor markup using Tag Helpers looks like standard HTML. Front-end designers conversant with HTML/CSS/JavaScript can edit Razor without learning C# Razor syntax.
  13. 13. View components 13Microsoft <3 Open source: ASP.NET Core Conceptually, view components are a lot like partial views but they are a lighter weight and no longer involve the lifecycle and pipeline related to a controller. • Extend ViewComponent class; • Can be used inside a class library, easy to reuse; • More performant than a partial view; • Async task using InvokeAsync; @Component.InvokeAsync("TagList")
  14. 14. Dependency Injection framework 14Microsoft <3 Open source: ASP.NET Core ASP.NET Core ships with a built-in Dependency Injection Framework. DI frameworks give you a way to set up all your dependencies in one place. • Out of the box; • Different lifestyle types ( Instance, Transient, Singleton, Scoped); • DI into views; • (Easy to migrate);
  15. 15. DEMO Developing view components on ASP.NET Core Microsoft <3 Open source: ASP.NET Core 15 https://github.com/samueleresca/Blog.DotNetPlayground
  16. 16. Final Thought Microsoft <3 Open source: ASP.NET Core 16 Microsoft is now the top organization with the most open source contributors on GitHub - Octoverse “Microsoft joins the Linux Foundation” - Techcrunch
  17. 17. Evergreen content Hi, I’m Scott Hanselman David Fowler Blog Damisan Edwards blog [PDF] ASP.NET Core MVC change every developer should know Microsoft <3 Open source: ASP.NET Core 17
  18. 18. Thank you  Microsoft <3 Open source: ASP.NET Core 18 https://samueleresca.net @samueleresca

Editor's Notes

  • Come potete dedurre dalla slide oggi farò una presentazione su ASP.NET Core ovvero l’evoluzione di ASP.NET, con un particolare focus sulla parte MVC.

    Per chi non lo sapesse asp net è alla base del nostro framework f31.

    Le slides saranno in inglese.
  • Sarò breve, questa è la timeline relativa l’evoluzione di ASP
    Nel 1996 avevo 2 anni è nato ASP
    Nel 2008 siamo arrivati alla prima versione di ASP.NET MVC.
  • La versione corrente, pur avendo tanti lati positivi, pecca in alcuni ambiti:

    -L’hosting è limitato ad IIS, indi per cui a a windows server;
    -Questo implica un forte orientamento ai prodotti microsoft, vedi visual studio;
    -Il framework è cablato sul server, se tu deploy su una versione diversa è un problema;
    -Per fare fronte alle retrocompatibilità c’è tanto LEGACY CODE
  • Arriviamo a ASP.NET Core, cos’è ASP.NET Core?
  • Perchè usare ASP.NET Core? Ho individuato diversi ambiti di miglioramento
  • In other words, developers can create middleware that interacts directly with the request pipeline.
    In ASP.NET Core MVC itself consists of a collection of middleware or modules that can be added to the pipeline to compose an application.


    ASP.NET Core runs just as a normal console application

  • Anche la struttura del progetto è stata cambiata,
    In modo da non esser più vincolato al csproj e quindi all’IDE visual studio
  • Microsoft.DotNet.Watcher.Tools
    Dotnet run watch
    docker build -t wetalk:testapp .
    docker run -d -p 8080:5000 -t wetalk:testapp

  • Permette di associare un data attribute HTML ad un Tag rendering di RAZOR
  • Quello che prima

×