Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

A Developer's First Look at Visual Studio 2010

3.49/5 (18 votes)
19 Sep 2009CPOL7 min read 56.8K  
New features of Visual Studio 2010 discussed

Introduction

Most of my friends call me a Microsoft Evangelist. Being an expert in .NET technology, I hope that it makes me proud. My first program was in GW BASIC. I then moved to ASP and then to .NET. When I first looked at Visual Studio 6; I was thrilled (because I was writing ASP code in Notepad then).

Well, it's a long way from VS6 to VS2010. Let's discuss what I feel.

UI (Look and Feel)

My system runs happily on Windows 7 with a 3 GB RAM. A month ago, I installed VS 2010 beta and I started working with it. Believe me or not, I thought PC users will think that developers don't deserve a great UI like this.

  1. A new aero look with all the stone age XP styles removed. The UI was neat and looked spacey.
  2. True Type Fonts on the editor makes it more readable.
  3. Keep in mind that the editor itself is developed in WPF.
  4. Zoom is available which will be helpful while you design applications so that you are not missing minute details.

New Editor Features

  1. The best part of VS2010 is call hierarchy. Select a method call and click "Call Hierarchy". Woo! That gave me the whole program flow in a tree view. It's the best part of VS2010.

    Image 1

  2. The other feature which interested me is highlighting. Selecting a variable or any symbol will highlight all its references. This was something I was missing since VS6. Though I can't tell you any specific advantages, it makes a programmer's life easy while coding.
  3. Search was innovative, it searches for all the symbols like an object browser and allows multiple search.
  4. "Generate From Usage" is a very well thought feature. If you need to understand this, I will have to explain it better. If I am coding on class "X" and I am creating an instance of class "Y" and want to call a method "Save" which is not yet defined in class "Y"; Visual Studio will give me a compiler error (on the editor) saying it is undefined. Now clicking over the code will give me an option to define / write the method "Save" of class "Y" without even moving to the class Y. I am not done yet; the best part is that it gives a stub to work and so a developer will be merely filling the symbol name and code. This is applicable for methods, variables and even classes and interfaces.

    Image 2

  5. Intellisense for JavaScript is way better than ever. But bringing the whole support to the JS file is still a dream. Microsoft should find some way where you can set some properties for the JS file at design time to look at the pages it will be referred when we type the code. Let me explain this; if you type document.getElementById('label1') inside page1.aspx, it recognizes and shows the methods and attributes related to the element in intellisense. However if you are writing the whole script inside a file say, Scripts.js, it won't be able to identify since VS does not know which page you are referring to.

Applications

  1. WPF has got the most attention in the whole VS2010. Now you can drag and drop datasources for the WPF controls which include custom data models, objects and any WCF / XML services. I'm not sure how many developers will be really using this as I normally prefer writing the code instead of using a drag and drop. The WPF editor also looks pretty fast now.
  2. Entity Designer is something that is very handy for hardcore programmers like me and for application designers / architects. This allows us to create the entity relation model first and then create a database from this. I was stunned by this tool. I remember how much time I used to spend on reverse engineering at times.
  3. Database projects have got a face lift on the new features where it allows me to create projects which is very similar to creating any other applications in VS. Some may argue that it was there since VS2005 but you have to explore to find how Microsoft has eased the programmer's life. However, I must admit that database projects still have plenty of room for improvement before it gets robust as other applications in VS.
  4. Parallel programming is a ground breaking feature that got implemented with VS2010. Instead of using the conventional types, there are thread safe types which can be used for parallel programming. I would say that is a good thought since every time I try thread based programming, I get stuck with some invalid thread access exceptions. To be honest, I haven't explored much in this area and will update this on my next posting.
  5. Silverlight class library is a new project type which is a boon for any Silverlight developers. This will help the developers to write effective coding specifically for silverlight applications. This is a reasonable advancement from the conventional pattern where someone writes a library and then configures a WCF or any service to contact with silverlight applications.

Languages

VB.NET

  1. Hurray! I have got automatic properties for VB.NET which were available only for C#.NET. I had a small self written application which generates the code for the properties and the variables for it. Since automatic properties is out, I can safely ditch my property generator application. And yes, I code in VB and not C#.
  2. Collection initializers are now in action which was missing in the previous version. Overall initializers is a breakthrough in .NET.
  3. Lambda expression is another great feature introduced. I used to do similar coding in JavaScript before and now I am thrilled to have the same in VB.NET. It's nothing but just passing / assigning a whole expression / method to a symbol. I loved this and it really appeared to me as a cool way to program.
    VB.NET
    Dim sum = Function(x, y)
    Return x + y
    End Function
    
    Console.WriteLine(sum(1,2))

    This looked to me as a little hint of F# in VB.NET.

  4. It is also said that VB.NET now supports Ruby and Python but I am not sure about the implementation and it's still on my "Try list".
  5. Embedded Types seems to resolve the headache which I had for long time. Every time I make a change in a strongly typed class library, I have to recompile all the libraries which are dependent on it and release it to GAC. Now with embedded types, one can write code which will be version independent. You can find more information on the same here. If you don't use strongly typed libraries in your application, then this is not for you.

C#.NET

  1. As for every release, C# has got a new feature called "dynamic". This keyword will inform the compiler that the type is dynamic and will be binded during runtime. This feature is not yet available for VB.NET. Perhaps, this will commence in the next version as it happens every time.
  2. Lambda Expressions and Collection initializers are already supported in C#.
  3. Embedded Types are also available for C#.

F#

This is a hot new chick out there in VS2010. Now what is F#? Microsoft says, functions can be treated as values. Damn! isn't that cool. Honestly I haven't tried much coding on this but, to the extent I have, I realize that you can do miracles with this.

  1. Of all the features that are introduced in F#, Delayed Computation is really cool. The result will not be calculated until it is needed. I can now write an effective Object Relation model framework with lazy load on child entities without writing any extra code.
  2. With most of the features (parallel programming, asynchronous, Generics, Collections) the conventional .NET languages have, F# stands as a very effective language for complex applications.

However, one should wait to see how it takes over in the market.

Conclusion

That's all I could find out in the few days I dated with VS2010. I am sure there is a lot better out there. For those who are in a dilemma on whether to upgrade to .NET 4.0, don't think again; just do it.

History

  • 20th September, 2009: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)