NO MORE ALL CAPS and other pleasures of Visual Studio 14

Unpicking a packed preview that breaks down ASP.NET

.NET Framework broken up, repackaged

There are big changes elsewhere, though. The most notable is in ASP.NET vNext – the actual codename for this release.

Microsoft has come up with a “cloud-optimized” subset of the .NET Framework, which means you can deploy an ASP.NET application with just 11MB of framework instead of 200MB. There is also an increased focus on Nuget, a package manager and repository for .NET libraries. This is already the preferred method for adding support for a particular library to an application. Instead of downloading a library and importing the assemblies, you use either the Nuget command line or GUI manager to search and add the packages you need.

In ASP.NET vNext, you add Nuget packages rather than references. In fact, the .NET Framework itself has been broken down into packages, so Microsoft can update each part independently. You can deploy the framework with your application, which means they are no longer dependent on whichever version is installed on the server. One of the stated advantages is that developers can use an updated framework without badgering system administrators to update IIS (Microsoft’s web server). You can also have applications running side by side and using different versions.

Another key change is that you can deploy an ASP.NET vNext application without a web server, a technique called self-hosting.

ASP.NET vNext merges Web Pages, MVC (the newer model-view-controller framework) and the Web API (for creating an API service) into one framework. You add packages to support the features you need.

Visual Studio 2014 CTP2 mixed case

Mixed case is back in Visual Studio menus

Roslyn has a role in ASP.NET vNext too, supporting dynamic compilation. In the right circumstances, you can amend a line of code, press Ctrl-F5 to refresh the browser, and have the changed code compiled and served to the browser automatically. “In the right circumstances” does not include debugging, thanks to debugger limitations. The thinking here is that this will be a great way to support online editing in a tool like Visual Studio Online.

ASP.NET vNext is also designed to support Mono, the open source implementation that runs on Linux. According to Microsoft’s Scott Hanselman:

“ASP.NET vNext (and Rosyln) runs on Mono, on both Mac and Linux today. While Mono isn't a project from Microsoft, we'll collaborate with the Mono team, plus Mono will be added to our test matrix. It's our aspiration that it just works.”

The principles behind ASP.NET MVC are a far cry from the old Web Forms, which sought to make web development more like desktop development by automatically managing state. The technique was smart but brought with it overheads like hidden ViewState variables, a complex page lifecycle, and an imperfect abstraction that could cause more problems than it solved. ASP.NET MVC is leaner, does a better job of separating business logic from presentation code, and easier to secure.

There are breaking changes in ASP.NET vNext. For example, the HTTPContext object has been slimmed down, apparently to be 2KB typically rather than 30KB.

Microsoft is also embracing a .NET standard called OWIN (Open Web Interface for .NET), which defines the way web servers communication with web applications. While this may be a good thing overall, it also means that many libraries are being rewritten, causing confusion as one set of APIs gets replaced with another slightly incompatible set. This will be familiar to Microsoft platform developers, and brings with it problems like conflicting documentation and samples marked as “do not use” because they do not show off the latest libraries.

Considerations like this suggest caution before adopting the latest and greatest from Redmond; yet there is plenty of promise in the way Visual Studio, the .NET Framework and ASP.NET are evolving

Oh, and lest I forget to mention it, the menus in Visual Studio 14 are now back to mixed case, following the unpopular upper case menus in the current version. No more complaints and looking for hacks to kill the caps. Microsoft says it'll decide whether to keep this change or just make it an option, based on feedback to this CTP.

A humbler Microsoft, listening to developers?

Perhaps a little.

Visual Studio 14 CTP is available here. ®

Sponsored: Minds Mastering Machines - Call for papers now open


Biting the hand that feeds IT © 1998–2018