What is ASP.NET Core?7:22 with James Churchill
ASP.NET Core is a new open-source and cross-platform web framework from Microsoft. In this video, we'll take a closer look at ASP.NET Core, how if differs from previous versions of ASP.NET, and an overview of the features and benefits it offers.
[MUSIC] 0:00 Hi there. 0:04 This is James. 0:05 I'm a developer and teacher at tree house. 0:06 In this workshop we'll be taking a look at ASP.NET core, 0:09 Microsoft's latest web framework. 0:13 We'll start with answering the question, what is ASP.NET Core? 0:15 From the official documentation, ASP.Net Core is a new, open-source and 0:20 cross-platform framework for building modern cloud based Internet connected 0:25 applications, such as web apps, IoT apps, and mobile backends. 0:30 ASP.Net Core is a significant redesign of ASP.Net. 0:35 It's the biggest release of ASP.NET since version 1.0. 0:40 While some parts of ASP.NET Core will feel familiar such as MVC Controllers and 0:44 Views, other parts will seem completely new. 0:49 ASP.NET Core is a complete rewrite of the ASP.NET web framework. 0:52 It's no longer based on the System.Web assembly. 0:58 Breaking away from ASP.NET legacy code was necessary in order for 1:01 the ASP.NET development team to meet their stated design goals 1:06 of producing a fast cross-platform cloud friendly web framework. 1:10 ASP.NET Core places the focus on MVC and 1:14 Web API which have been merged into a single API. 1:18 We'll take a closer look at the convergence of MVC and 1:22 Web API later in this workshop. 1:25 Web forms and webpages are not currently available in ASP.NET Core, 1:27 nor are they likely ever to be. 1:32 Microsoft has made it clear that web forms and web pages will 1:35 remain as part of the full .NET framework and not brought into ASP.NET Core. 1:40 The ASP.NET team does have a new feature on the roadmap named view pages 1:45 that is similar to the functionality of web pages. 1:50 See the teacher's notes for more information. 1:53 ASP.NET Core runs on either .NET Core or the full .NET framework. 1:55 This gives you the flexibility to choose the target framework 2:01 that makes the most sense for your situation. 2:04 .NET Core is a new cross-platform version of .NET that runs on Windows, 2:06 Linux or Mac OS. 2:12 .NET Core has a flexible deployment model that gives you the option to deploy it 2:14 along with your application in addition to the more traditional side-by-side user or 2:19 machine-wide deployment options. 2:24 Only a subset of the .NET frameworks API surface has been implemented in .NET Core. 2:27 For instance, 2:32 the system drawing namespace is currently only partially implemented in .NET Core. 2:33 If your application needs to manipulate bitmaps 2:39 you'll need to use a third party library that's compatible with .NET core. 2:41 Or target the full .NET Framework. 2:46 .NET Core only supports a single app model, console apps. 2:49 While that might seem limiting, 2:53 it's possible to build other app models on top of it which is what ASP.NET Core does. 2:55 We'll see it later in this workshop how that works. 3:01 The .NET command line interface or CLI shipped as part of the .NET Core SDK. 3:04 The .NET CLI is a set of commands that allows you to create, build, run, 3:10 publish, test and package .NET Core apps all from the command line. 3:16 Having the CLI available, ensures that you can develop .NET Core apps 3:21 including ASP.NET Core apps, regardless of what platform or tools you're using. 3:25 For instance, 3:30 you can develop apps on Linux using the text editor of your choice. 3:31 CLI is even used by Visual Studio. 3:36 When using Visual Studio to develop .NET Core apps Visual Studio 3:39 delegates to the .NET CLI to build, run and publish your app. 3:43 ASP.NET Core and .NET Core are fully open source projects being hosted on GitHub. 3:48 Development is being done completely out in the open. 3:54 You can monitor or 3:58 contribute to the teams ongoing development discussions via GitHub issues. 3:59 Or you can fork any of the repos, fix a bug or 4:04 implement a feature and issue a poll request against the main repo. 4:07 ASP.NET Core is another example of the new Microsoft. 4:11 A Microsoft that is embracing open source development. 4:16 Unlike previous versions of ASP.NET, 4:20 ASP.NET Core is not a single monolithic assembly. 4:22 Instead it's delivered as a set of granular and well factored NuGet packages. 4:27 This gives you a true pay-for-what-you-use-model. 4:32 You only reference and deploy the packages that your application needs. 4:35 In order to realize ASP.NET Cores cross-platform design goal, 4:40 Microsoft needed a cross-platform server for running ASP.NET Core apps. 4:44 Kestrel is that server. 4:49 Kestrel is a cross-platform, managed web server based on libuv. 4:51 libuv is a multi-platform support library with a focus on 4:56 asynchronous IO that was developed primarily for 5:00 NodeJS, but is used by other projects including now, Kestrel. 5:04 Kestrel is the only supported web server for running ASP.NET Core apps. 5:09 IIS is no longer directly supported, 5:14 meaning that IIS does not host ASP.NET Core apps within its own process. 5:17 Instead IIS is used as a reverse proxy to Kestrel using 5:23 the ASP.NET Core module, HTTP module. 5:28 This is the same overall approach used for hosting NodeJS apps in IIS. 5:32 ASP.NET.Core apps running on Castro have 5:37 been able to achieve amazing performance benchmarks. 5:41 In February 2016 ASP.NET.Core achieved 1.15 million requests per second. 5:44 In a sense exceeded that number. 5:52 To put that number into perspective, 5:54 1.15 million requests per second represents a 2300% 5:58 gain over ASP.NET 4.6 or 800% gain over NodeJS. 6:03 The second decimal place, 0.05 million or 6:08 50,000 is around the total number of requests per second that 6:12 ASP .NET 4.6 could perform of the same type on the same hardware. 6:16 Most applications will never need this kind of throughput. 6:22 But having this kind of headroom will help ensure that your applications feel fast 6:25 and responsive. 6:30 As previously mentioned, ASP.NET Core runs on Windows, Linux, and macOS. 6:32 This is the first time that this is possible 6:38 using Microsoft supported runtimes and frameworks. 6:41 Cross-platform support opens up new development and deployment scenarios, 6:44 including being able to support mixed environment development teams. 6:49 And deploying your applications on to cloud hosted Linux virtual machines or 6:53 containers. 6:58 In this workshop I'll be working with both Windows and macOS. 6:59 To get started with ASP.NET Core development visit the new dot.net website, 7:04 where you can find detailed installation instructions and 7:10 downloadable installers for the platform of your choice. 7:13 In the next video we'll use the .NET CLI to create our first project. 7:17
You need to sign up for Treehouse in order to download course files.Sign up