So, I've just noticed via the MSDN's downloads RSS feed that VS2010 Beta 1 was made available for download. This is significant, because the earlier VS2010 CTP was only released as a cumbersome virtual machine for Virtual PC, and did not have the new WPF based UI, but this one is an ISO, and does have all of the new goodies...
So there I went, making a new Windows 7 VM in VMware Server and started installing.
All I can say is Wow. Major improvement all over, of a scale not seen since .NET was released, and the major performance boost due to the WPF based editor, especially the ASP.NET one.
Just to get started, the New Project window got revamped. Now everything is well organized and easy to find. Note that VS2010 supports all framework from 2.0 and on.
The first thing I looked at is the new Windows Workflow Foundation in .NET 4.0. This was rewritten from scratch, because the .NET 3.0/3.5 version had as a “default” development pattern to be self contained. That's no good: Windows Workflow rely heavily on serialization/serialization, so the slightest change in code, and persistence doesn’t work anymore. And if you think of a Workflow as the business logic equivalent to a “view” in MVC, then the workflow should be mostly empty, and only call outside logic. This is what .NET 4.0’s workflow bring to us: an enhanced interface for development, communication via WCF for the business logic, and even integration with powershell!
State Machine workflow (the one everyone should have been using back then, but no one used) was replaced by the Flowchart workflow, which seems to be an hybrid between state machine and sequential. It really feels like making a diagram in Visio. Oh, and right click –> copy image is available, of course! (see result below, as well as the actual Visual studio UI). Another notable improvement is the available activities. We finally get a Foreach.
Now, for the web editor. Like everything else, it was revamped in WPF. I like the new look, reminds me a bit of Code Rush (which I love, but prefer the features of Resharper, especially as of 4.5). Aside for the look, it is definitely faster, and has a few novelties.
But what about the code?! Well, again, code editor in WPF. Prettier, smoother, more responsive, easier on the eyes. There’s a couple of new features I can spot, but I’ve been using Resharper for a while now, so i cannot easily tell if they were there in 2008. The editor does locate identifiers (if you have a method call selected, it will automatically highlight the definition) and other such sugars. If nothing else, the stuff that was present in VS2008 potentially more visible because of the more organized GUI. Oh, and intellisense now automatically filter selects as you type in C# like it does in VB or with Resharper. Much better!
Refactoring is still lacking, so we’re not getting rid of Refactor! and Resharper anytime soon.
One thing of interest is Consume First mode. In this mode (toggled by ctrl + alt + space within Intellisense), Visual Studio will stop trying to auto-complete identifiers that are not there. This is mostly useful with test driven development: when coding against classes that do not exist yet. That said, the new menus, enhanced syntax highlighting and performance improvements make it quite enjoyable indeed. One thing of interest is how the F# interactive window is accessible at all time. That may be able to replace Powershell for me when it comes to test a new API or the Sharepoint object model. More on this later!
Interesting: there are new items templates for the T4 code generation, a feature that has been available in Visual Studio for a long time, but never truly integrated. Not much around it, but this is still a beta:
Next is the XSD schema editor. I feel a bit cheated on that one: it was supposed to be part of VS2008 (thus why the original editor was removed), and silently replaced by a Viewer, with no word of the editor. Well, now we get the real thing, if quite late (I feel for those who have to pay to upgrade Visual Studio…)
So, what do we get for 2-3 years of wait? First, a nice statistic view (followed by Visual Studio 2010 crashing on me):
And….that's it (that isn’t available in VS2008 anyway). There’s a bunch of buttons that should allow you to see the XSD in graph view (I saw some screenshots online of it), but it didn’t work for me. They did absolutely nothing. Now maybe its the XSD I’ve used, or maybe the feature plain isn’t there.
I also wanted to try the supposed improvements to VS2010 and C++, but the intellisense doesn’t work yet (it says it is unavailable in the status bar when you try to invoke it), so the IDE has a long way to go before it is ready for release, as it is far from feature complete. The Sharepoint stuff is only barely present in the form of .NET 3.0 workflows, a far cry from what we’ve seen online with the full blown integration. I figure we’ll see it in the next beta.
Finally, the DEBUGGING EXPERIENCE!
That is the best part yet. I’ve only had time to test it a little, but here are the two things I’d like to point out (I unfortunately didn’t look at the parallel programming debugging yet):
First, the F5 experience is much better. Taking a 1 line console application and hitting F5 doesn’t take several seconds on a Core 2 Duo 3ghz with 4 gigs of RAM anymore. It is almost instant.
Second, as I’ve told to many of you already: we can debug managed memory in a dump directly within visual studio! No need for WinDbg anymore (while I still think WinDBG is one of the best, most powerful tools there is, it is a fact that it has a learning curve and is not as accessible. Plus, nothing beats being able to see visually where your code is going).
Just File –> Open –> File, point to the memory dump while your project is open, and you’re good to go! I’ve also noticed you can add comments to the debug visualization. I’ll have to look more into what can be done with it:
(the dump interface. Lets you F5 the dump, which will bring me to the following)
(this is a dump taken while the process was running. Notice how all the values are there, how it knows which line I’m at, everything that the symbols can get me!)
All around a MAJOR boost to debugging in production, and put within reach of even junior developers (and much easier to use even for veterans). Again, WinDBG will stay the first line of defence when you need to debug something FAST and in depth, but for the common scenarios, this is vastly superior.
And that’s it for now, as I’m running out of time. I’ll keep playing with it in the following days and compare notes with other bloggers, and see what I can find.