Saturday, March 21, 2015

ASP.NET 5; dotnetConf 2015

ASP.NET 5 (used to be vNext codename) is getting closer to prime time,
with significant changes in the way it works and web projects are organized.
XML is out, JSON is in. JavaScript is everywhere, and .NET tools are recreated.

K. Scott Allen has prepared another excellent introduction:
ASP.NET 5: First Look – Pluralsight Training

To stay relevant and competitive in "cloud" environment, ASP.NET is transforming
to become open source, and embracing many other open source tools.
This creates another "steep learning curve" for server side web development,
in addition to client-side single-page web apps with tools like Angular.

dotnetConf 2015 | Channel 9

ASP.NET 5 - A Deep Dive into the ASP.NET 5 Runtime @ MSDN magazine
The main objective of ASP.NET transformation it to improve performance and reduce dependencies to make it portable and more memory-efficient.

Imran Baloch's Blog - K (dnx), KVM (dnvm), KPM (nuget), KLR, KRE (DNX) in ASP.NET 5 (vNext)
"Project K" was most likely named based on Microsoft's Katana web server, that started this transition to open source; here are a few key new tools:
  • DNX (used to be KRE: K Runtime EngineKLR: K Language RuntimeK command)
    bootstraping ASP.NET 5 application, using various versions of .NET
    self-hosting command line, running build tasks
  • KPM: K Package Manager, being merged to NuGet
    download, restore and install dependencies defined in project.json
  • KVMPowershell script used to get the runtime and manage multiple versions of it being on the machine at the same time.
In addition to .NET based tools, Visual Studio 2015 includes many popular web development tools. 

Introducing Gulp, Grunt, Bower, and npm support for Visual Studio - Scott Hanselman
  • NuGet is now used only for distribution of .NET based packages.
  • npm: node.js package manager
    node.js is integrated in Visual Studio 2015, and is used to run other JavaScript based tools
    there is very large number of tools packaged to be used with node.js, available with npm
  • Bower
    package manager for client-side JavaScript tools
  • Grunt
    JavaScript task-runner, for automating build tasks
  • Gulp
    alternative tool for automating tasks
At the same time .NET core runtime is changed, C# and VB compilers are re-written, open sourced and run as a service, MVC and WebAPI are merged to use common controller, Entity Framework for database access is being re-written and also open sourced... 
There are also "classic" pre-packaged web dev libraries, such as
The actual web scripting code could be written in JavaScript (ES5), but also in TypeScript and ES6, and then cross-compiled and compressed for deployment. 

Besides ASP.NET there are many choices of tools for web development now...
  • node.js Express is using same JavaScript on server and client side. It is all single-threaded, event driven. Simple for simple tasks, could get complicated for bigger projects
  • Ruby on Rails, dynamic and elegant, flexible but could be slow
  • Java, Scala, Clojure and others JVM based frameworks
  • Nancy and other .NET based web frameworks
  • GO: super-simple language, functional, with object but no inheritance


Web started and become hugely popular and useful because it was created simple.
For a good reason: it was created by a single person. That was a major advantage, to keep it simple.

Times have changed, with large teams of smart people trying to out-compete in making
ever more complex systems, to do essentially a simple thing: HTML with some scripting.
Tools are powerful, there are just too many of them now, producing ever more complex systems...
Another round of web simplification may be needed (web components?)
In the meantime, here are some great tools to explore and use...

No comments: