ASP.NET - A last look back at 2013, looking ahead to 2014 Saturday, January 18, 2014

There's something about getting into a new year that makes us step back and consider the bigger picture. Where is it all headed? Am I making the most out of my life? What web tools and products has Microsoft released lately?

I got to present a few Web Camps in December, in Oslo and Vancouver. I was reminded that there are some people - we'll call them normal developers who have work to do - don't sit there refreshing the Microsoft downloads new releases page all day. I don't understand them, but I appreciate that they exist.

We announce stuff all the time, but it's hard to keep up with what's important, what you need to know, and stuff you should start paying attention to because it's going to be a big deal really soon. So here's my quick summary of the important things that happened in 2013 and what I think it suggests we watch for in 2014.

The Big Picture

One ASP.NET

This has been a thing for brewing for a bit, but really came together in 2013. With Visual Studio 2013, you really can mix and match ASP.NET MVC + Web API + Web Forms + SignalR + "your framework here" and they all get along. This has been a lot of work over several releases: breaking out functionality out into packages, setting up common components like routing and identity so they're universal, moving to common HTML and CSS for the project templates, Visual Studio tooling changes, etc. That all culminated with the Visual Studio 2013 release, where we finally have just one ASP.NET project with a la carte support for Web Forms, MVC, Web API, and more.

What's probably more important is that you can also add functionality after you've created a project, so if you decide later to add MVC libraries to your Web Forms project it's no big deal.

Visual Studio as a great editor for front-end (HTML / CSS / JavaScript) files

Again, this one has been growing over time: Visual Studio 2012 introduced new JavaScript and CSS editors. The JavaScript editor added tons of new features like ECMAScript 5 support, code outlining, brace matching, go to definition, dynamic IntelliSense. The CSS editor added things like much better IntelliSense, color picker, snippets, lots of HTML5 / modern web development support. It also included Page Inspector - a built-in browser view that shows a running view of your site (e.g. live data from the database, JavaScript is evaluated, everything's running end to end) and allows you to click on an an element and find the line of code that produced the HTML. But the HTML editor in Visual Studio 2012 was old, and that prevented adding modern web development features.

In Visual Studio 2013, the HTML editor was completely rewritten to allow for the cool (MEF based) extensibility that the CSS editor in Visual Studio 2012 leveraged so heavily. That allowed for new support for all kinds of new modern features like IntelliSense for AngularJS, built-in CoffeeScript and LESS editor support and more. The HTML editor features in Visual Studio 2013 get even better with the Web Essentials extension, which I'll talk about in a minute.

And we haven't even mentioned Browser Link yet! Browser Link takes the smarts that went into Page Inspector, hooks it up with a real-time Web Socket connection (powered by SignalR) that's hosted inside of Visual Studio, and gives me real-time, two-way interactivity between my server-side code and any running browser. That means I can run my site in Visual Studio, pop open Chrome or Opera or Firefox or IE or some mobile emulator, hover over an element in the browser and see the source of that HTML highlighted in Visual Studio. That is a huge, huge timesaver I've been wanting for a very long time.

The point is that Visual Studio 2013 ships with newly rewritten, advanced editors for your front-end web files. Like me, you may have seen Visual Studio as an editor for back-end code but went to a lightweight notepad style text editor for HTML / CSS / JavaScript / modern web language of the week. But I think it's time to change that way of thinking - Visual Studio gives me the benefits of a lightweight editor (starts up in 2-3 seconds on a modern computer, has a light UI that gets out of my way), but helps me spot misspellings, get the right vendor prefixes, use JavaScript libraries without having to dig through source code and docs more than I want to, etc.

Web Essentials as "Visual Studio web dev labs"

Web Essentials is a side project run by Mads Kristensen, the project manager for the web developer features that ship with Visual Studio. While Visual Studio's new ship schedule means you get a new version yearly and updates several times throughout the year, Web Essentials ships as often as Mads wants to. Which turns out to be pretty often - often every two or three weeks.

Some features in Web Essentials are prototypes which might land in the next version of Visual Studio - an example is the Paste JSON as Classes feature. This allows you to get your hands on them right away, give feedback on how they work, and then see them graduate to full Visual Studio support.

Web Essentials also includes some interesting features which are useful to web developers who are engaged enough to spend a minute to install and extension, but might not be for everyone. Zen Coding might be an example of that - I don't know if it'll ever ship in Visual Studio, but it's a useful feature if you're an HTML focused web developer and into the new, new stuff. Since web development techniques and metalanguages come out so frequently and change so rapidly, it's great to have a lightweight extension that can keep up with them until they're mature enough to maybe ship with Visual Studio.

Release and update speed

When Visual Studio 2012 was launched in September 2012, Soma announced that they were shifting to a faster release cadence which would include both more frequent full releases and regular smaller updates to deliver features throughout the year. An important point there is that these aren't just service packs with bug fixes, they include useful features. We really saw that come together in 2013. The best example of that was the ASP.NET and Web Tools 2012.2 release in February 2013. I list some of the features below, but it was a pretty big batch: new templates for both ASP.NET Web Forms and MVC, Page Inspector and more. As of now, there have been a total of 5 updates for Visual Studio 2012; the latest added some support for ASP.NET MVC 5 (albeit only with an empty MVC 5 template) to Visual Studio 2012.

I think that's a great thing. The technologies, browsers and languages we need to work with as web developers move really quickly, and we need tools that keep up. Two or three years between releases doesn't work for me, and even yearly is pushing it. I expect to see this update cycle continue in 2014 and beyond. For instance, we've already got the release candidates for ASP.NET MVC 5.1, Web API 2.1 and Web Pages 3.1 - expect the final release very soon. [Update: the final version was released on January 20, read my post series on the new features here.]

Note: In case you didn't know - if you've got Visual Studio 2012 Professional, you can upgrade to Visual Studio 2013 Professional for $99 now.

Again, thinking beyond Visual Studio, the rest of the ASP.NET dev landscape is moving very quickly. Windows Azure has releases roughly every three weeks. Web Essentials and SideWaffle have release updates measured in weeks. NuGet packages update constantly.

Do you have to keep up to date with all of the new things? No, of course not. But since web development technologies and requirements move rapidly, it's good to know that you're generally not going to be waiting on Visual Studio or ASP.NET when you do need the features. And of course, there are lots of benefits (in addition to the big flashy new features) to being on the newest version, e.g. scaffolding in ASP.NET MVC now whitelists your parameters to prevent overposting.

Externalization of ASP.NET

ASP.NET used to be pretty monolithic. You'd get one big ASP.NET release and it did everything. You could plug into it - using things like control events, membership provider hooks, modules and handlers, but you were just plugging into the big ASP.NET thing.

That's really changed over the years.

When you look at what's installed in a new ASP.NET project, it's almost all NuGet packages. That's a big part of what made it possible for the One ASP.NET thing to happen: ASP.NET MVC, Web Forms, Web API, and Web Pages all share common NuGet packages. That definitely includes new features, like the new ASP.NET Identity system.

Side note: You can use these packages individually, or even create your own versions (since they're a permissive under open source license). You can grab nightly builds and which include changes as they're committed.

The tooling (Microsoftese, generally meaning "Visual Studio support") for ASP.NET has also been externalized over the past few years. If you poke around in the Visual Studio program directory (e.g. \Common7\IDE\Extensions\Microsoft\Web Tools), you'll see features are being built using the standard VSIX / MEF extensibility points. That's good because it means things can ship and update more quickly, and the hooks they're using are available to you. Heck, the source is even available to you if you pop them open in a tool like ILSpy or Reflector.

Things are also being built using OWIN (Open Web Interfaces for .NET) now. I've written before about why I think OWIN and Katana are important. The result is that core functionality like authentication is now being plugged into ASP.NET as portable middleware rather than shipped in a big monolithic framework that hides somewhere in your GAC.

Oh, and SideWaffle. What on earth is a SideWaffle?!? Well, just like NuGet externalized ASP.NET dependencies and VSIX externalized tooling, SideWaffle externalizes templates. The idea is that, unlike waiting for new ASP.NET project templates in Visual Studio releases or updates, you install the SideWaffle extension and get (or contribute) Visual Studio templates that are updated more rapidly.

Releases

I've already talked about what these release mean in a big picture sense, so I'll just list them out in linked bullet point form.

Visual Studio 2013 (Oct 2013)

ASP.NET and Web Tools 2013.1 for Visual Studio 2012

Windows Azure updates

Tons of releases throughout the year, but here are some of what I think are the top features for ASP.NET developers: Remote debugging (was in Web Roles, now it's available in Windows Azure Web Sites) Create and publish to Windows Azure Web Sites from Visual Studio Right-click on VM, RDP MDSN benefits / price cuts / run VS in cloud (also VS Online) Web Socket support Windows Server 2012 R2 General Availability (Web Sites, Mobile Services, IAAS)



Web Essentials

Side Waffle

NuGet

There were lots throughout the year, but I think the main feature for web developers was that Package Restore is enabled by default in NuGet 2.7

Portable class libraries

This is a big step forward for portable libraries - both community open source libraries and Microsoft provided libraries - to work cross platform

New Stuff That You Really Need To Understand

We had an old ASP.NET Membership system that worked for a while, but was definitely showing its age. It didn't support claims and social authentication, it didn't work well with custom membership data, it was hard to extend. Then we got Simple Membership in ASP.NET MVC 4, which was simple but hard to extend. A lot of work went into the new Identity system to make sure it both did simple things well and was wasn't hard to extend later.

There's a lot of documentation out there on the new Identity system, and more on the way at http://www.asp.net/identity

Also, I recommend K. Scott Allen's recent posts exploring ASP.NET Identity, such as Customization Options With ASP.NET Identity.

All of the new web project templates are built using Bootstrap. I overviewed that a little in a previous post, but there's a lot more to it. The top benefits I see are:

It's popular across the web development community, so we're able to take advantage of community support for things like themes, documentation, tutorials, etc.

It's responsive and mobile-first, so it's very easy to build sites that work well at narrow (mobile) screen resolutions, intermediate screen resolutions like tablets, and on widescreen displays

It's got a lot of components and jQuery based plugins that handle common web developer concerns

Other Neat Stuff That You Should Start Paying Attention To

Scaffolding

We've had scaffolding in ASP.NET before, but it was framework specific - there was MVC scaffolding, Web API scaffolding, and nothing else if you were working on another project type. The scaffolding system in Visual Studio 2013 (and now available in 2012, as mentioned above) has been updated so it works in any ASP.NET project, and it's been built to be easily extensible (the extensibility bit will be shipped and documented in a Visual Studio update early this year).

Some good references:

The release candidates have already shipped and the final release will be out very extremely soon. Some of the new features:

ASP.NET MVC 5.1 Attribute Routing support for constraints Bootstrap support for HTML helpers (allowing HTML attributes in Html.EditorFor) Support for Enums

ASP.NET Web API 2.1 Global Error Handling Attribute Routing support for constraints BSON media type formatter Async filters Help Page improvements



OWIN and Katana

I mentioned these earlier. If you've been putting this on your "I'll ignore this until it starts getting important" list, it's time. The new Identity system is wired into the ASP.NET project templates using OWIN, and new things will be moving that direction.

Visual Studio Online

I think Visual Studio Online - including the Monaco editor - is getting pretty interesting. It's definitely useful for web developers. See my post here: A look at the new Visual Studio Online "Monaco" code editor

Node Tools for Visual Studio

Node (and NPM) are getting to be pretty big in the web development world, and I think it's important to keep up with where it's going. It hasn't been that hard: Node's pretty lightweight, runs well on Windows for a while now, and is incredibly easy to run in Windows Azure Web Sites. But, it's gotten incredibly easy now that they've built pretty impressive support for Node.js into Visual Studio. I think it's worth taking some time and getting a little familiarity with Node.js if you haven't yet. Don't get me wrong, I'm in no way pushing Node.js over ASP.NET development, I'm just saying that I personally think it's a good idea to keep up with as a professional web developer.

See Scott Hanselman's post (Introducing node.js Tools for Visual Studio) and give it a look.

Keeping Up With The New Stuff

That's a condensed list of what I think's important circa January 2014, and it's a lot. How on earth can we keep up with all of this?

Here are some resources I recommend:

All right! Go to it! Let's do this!