The World of .NET 2015

The World of .NET 2015

In October I attended DEVintersection 2015 in Las Vegas. My main interest was to learn about ASP.NET 5 and so I concentrated in the conference.

What I learned about ASP.NET 5 was very illuminating and interesting. It’s a whole new multiplatform world now. If you are a MacOS or Linux person, you owe it to yourself to take a new look at ASP.NET 5.

During my stay in the Conferences. I attended several sessions and workshops with many Microsoft and industry experts like Steven Guggenheimer, Scott Guthrie, John Papa, Dan Wahlin, Scott Hanselman, Ward Bell, Troy Hunt and many others.

One of my principal reasons to join these conferences was to understand how the ASP.NET 5 works. I also wanted to learn how to create a web application using ASP.NET 5 on Windows, Linux, and MacOS.

What is .NET 2015?

.NET 2015 was about all things released to .NET. It includes the .NET Framework 4.6 and .NET Core 5 which contains CoreCLR and .NET Native. ASP.NET 5 includes ASP.NET MVC 6 with web API, Entity Framework 7, SignalR 3, etc.

New Terminology

  • DNVM. It is the .NET Version Manager, a set of command line utilities to update and configure which .NET Runtime to use. You can use DNVM list to see all the runtime you have installed. For more see how to use DNVM.
  • DNX. It is short for .NET Execution. It has everything you need to build and run .NET applications for MS Windows, MacOS, and Linux, and across different .NET flavors (.NET Framework, .NET Core and Mono). For more,see the DNX Overview.
  • DNU. Short for .NET Utilities. It is used to manage the dependencies in a .NET 5 applications by installing or restoring the packages associated with a project (i.e., project.json).
  • Kestrel. This is the new cross platform OWIN Web Server for ASP.NET 5 based on libuv.
  • OmniSharp. This is a cross platform project to have a great programming experience no matter what your editor and operating system of choice may be. For example, in MacOS you can use Visual Code. You have access to features like intellisense, add reference, format document and many others when you are programming.
  • Bower. This is the package manager for client-side development. We can manage the third-party Javascript/CSS libraries using Bower config file (i.e., bower.json).
  • Grunt and Gulp. These tools are both task runners that you use to perform tasks like minifying or uglifying CSS and Javascript, or compiling Less and Sass into CSS, or TypeScript and CoffeeScript into Javascript. In Visual Studio you can open the Task Runner window to run the tasks manually.
  • Roslyn. It’s a .NET Compiler platform. It provides Open Source C# and Visual Basic compilers with rich code analysis APIs. It enables building code analysis tools with the same APIs that are used by Visual Studio. For more, see the Roslyn Project site.
  • .NET Core 5. It’s a small and optimized runtime that can be targeted by ASP.NET 5 applications.
  • Yeoman. A scaffolding tool for modern web applications. This tool helps you to kickstart new projects, using best practices, and tools to help you stay productive.

Why Program in ASP.NET 5?

ASP.NET 5 is an Open Source web framework for building modern web applications to run on Windows, Linux and Mac. It includes the MVC 6 framework, which now combines the features of MVC and Web API into a single framework.

There are a number of architectural changes in ASP.NET 5 that makes the core web framework much leaner (e.g., it no longer requires System.Web.dll) and it is modular. For example, almost all features are now implemented as NuGet modules and this allows you to optimize your app.

Foundational Improvements

Cross Platform

side-1-the-world-of-.net-2015

ASP.NET 5 is now decoupled from IIS and System.Web. It also removes remaining impediments to running .NET websites on other platforms.
With ASP.NET 5, you can develop any project in any platform and run it in IIS for windows or Kestrel for Linux and Mac.

More than Visual Studio

You can develop using Visual Studio 2015 for Windows, or the Editor you want (e.g., Sublime, Atom, Emacs, Vim, Brackets) for MacOS/Linux.

Lightweight and Modular HTTP Pipeline

ASP.NET 5 introduces a new HTTP request pipeline that is modular so you can add only the components that you need. The pipeline is also no longer dependent on System.Web. By reducing the overhead in the pipeline, your app can experience better performance and a more tuned HTTP stacks. The new pipeline is based on lessons learned from the Katana project and also supports OWIN.

Open Source

ASP.NET 5 is a open source project on Github. You can even create pull requests. Microsoft hopes that making ASP.NET 5 Open Source, the developers community will contribute to the project and understand better the idea behind the code.

What’s Good about ASP.NET 5

Dynamic Development

Visual Studio 2015 supports a dynamic compilation. You no longer have to compile your web application every time you want to see a change. Instead, just edit the code, save your changes, and refresh the browser.

Integration with Grunt, Bower, and GulP

side-3-the-world-of-.net-2015

Another amazing feature in Visual Studio 2015 is built-in support for Bower, Grunt, and Gulp.

Bower is a client-side package manager. It includes both Javascript and CSS libraries. To add a client-side library you need to add the package name into the bower.json config file.

Grunt and Gulp are task runners that help automate your web development process. You can run tasks like Javascript minification, concatenate Javascript files, run Javascript unit testing, run JSLint, compiling Less and more.

Dependency Management

ASP.NET 5 has a new project.json file to manage all thedependencies as NUGET Packages. The project.json file is easy to work with and you can edit it with any text editor. This enables you to update dependencies even after the app has been deployed to the cloud.

Dependency Injection

ASP.NET 5 has built-in support for Dependency Injection and the Service Locator pattern. This means that you no longer need to rely on third-party Dependency Injection frameworks such as Ninject or Windsor Castle. But, if you prefer to use one of these, you can.

xUnit.NET

This is the new Unit Test tool for .NET. You can wave goodbye to mTest and hello to xUnit.net. The latter uses the [Fact] attribute instead of the [TestMethod] attribute (and no [TestClass] attribute]).

What’s Not-so-Good about ASP.NET 5

Release Candidate

It’s still in RC1 state. Microsoft is expecting to get feedback from the community to improving performance and reliability. Please check the ASP.NET 5 Roadmap for more information.

Documentation is Not Complete

The ASP.NET 5 documentation is not complete and lacks deeper information and concepts.

What Does the Future Look Like?

In my opinion ASP.NET 5 is a very ambitious project from Microsoft. We can take advantage of it to create cross platform web applications.

Having a development environment that includes Open Source libraries will make things easier.

Also, it will be an opportunity to attract new developers who think .NET is very difficult to configure for web apps. Now, they can develop a web application on their favorite platform, using the editor you want.

And Finally …

I recommend that you review the ASP.NET 5 site. In particular, take a look at the Introduction to learn about these new concepts. Then, continue with Getting Started and install all you need for your prefered OS. Also, check out Your First ASP.NET 5 Application Using Visual Studio.

Follow people like John Papa, Dan Wahlin, Scott Hanselman and Damian Edwards on social media. This can help you stay in tune with the new stuff that’s coming out.

Focus Mode

Contact Request

Close

We will call you right away. All information is kept private