VS 2010 Beta 2 : Quick Glance

I got my copy of VS 2010 Beta 2 installable DVD just a few days back. Without wasting much time I straight away installed the beta version of VS 2010 .Installation was pretty smooth , just like its predecessor VS installation requires quiet a big amount of space in your hard drive.Since its only a beta version , you need to connect to internet to get some high end features.But no worries , whatever comes with the DVD installable is sufficient enough that you can kick start your development process.

Note : Do not use the beta version of VS 2010 to write application code for your production environment.Its meant only for your personal use so that you can gain familiarity with this new development environment.

So let me take you through a quick tour of VS 2010 Beta 2 , thereby highlighting some major changes that have been done to this new development environment.

Start the VS 2010 IDE by going to Start –> Microsoft Visual Studio 2010 –> Visual Studio 2010 – ENU.

Once opened , go to File and select “New Project”.Following dialog box comes up :-

AddNew

This is the dialog box which will be used to add new items to your existing solution or to add a new solution all together.Very much like VS 2008 , the layout is same but with some minor differences in terms of UI and colour scheme.On extreme right we have small description of the item which is selected in the central pane.You can sort the list in central pane by making use of “Sort By” option provided at the top of the window.Also similar to VS 2008 , VS 2010 offers the capability of multiple framework target support which you can leverage by selecting the appropriate .Net Framework from option provided in “.Net Framework” dropdown.Default is .Net Framework 4 , which happens to be the latest .Net Framework from Microsoft.

Select console application from the options give project name as “FirstApplication”.Once clicked okay VS 2010 opens up with the following window which is the default one for console applications.

NewProgram

Now just like previous VS IDE’s here also the screen is divided into multiple sections.”FirstApplication” in solution explorer is the default project and to overall solution I added one more “Class Library” project called “BIZLayer”.At the bottom left of the screen , you can see value like “100%”, which is used to set the font size of the IDE.

Now there is something interesting going on and for that to know you have to right click on the project “FirstApplication” and select “Add Reference”.Following window comes up which is in sync with what we used to get in previous versions.

AddReference

Now we can see a major change here in the form of Versions of the dll’s.Most of the dll’s are of version 4.0.0.0 .And when I say most of them then I also mean to say dll’s like “System” , “System.Data” etc .Till .Net 3.5 framework these core dll’s where not modified but with .Net Framework 4.0 , all the dll’s(classes , libraries etc) have been modified so as to target the new CLR version.Yes new CLR version , is being shipped with .Net Framework 4.0.Till .Net 3.5 framework only the upper layer classes got changed , new functionalities where added on top of previous layers but the internal CLR engine remained same.But here even the CLR engine has been modified or say upgraded.Well this is one of the biggest changes that .Net framework 4.0 has to offer.Since I have mentioned about CLR , I highly recommend .Net developer’s to read “CLR via C#” book by Jeffery Richter.

There is one more things to notice here,once you have selected .Net framework 4.0 as your choice of framework and then you say “Add Reference” then this dialog window will only list dll’s of version 4.0.0.0 . Whereas in previous .Net Framework all the dll’s where listed irrespective of their versions but some of them will be greyed out if their version if higher than the version of the project.You can verify this in your local machine.

Hold on , the dll story is still not over.To know about one more feature excellent feature of .Net Framework , all you have to do is right click of the “FirstApplication” project and select “Project Properties”.In the newly opened window , select the “Target Framework” dropdown and you will notice one more unique feature and it is called “Client Profile”.

ProjectProperties

To know more about this concept called “Client Profile” check out the following article :- .NET Framework 4 Client Profile - Introduction

Now under BIZLayer library add one class file say “BizLayer” and to that add one method named “ReturnTime” which returns the current DateTime.Following code window shows the code of both “BIZLayer” and the “FirstApplication” project.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FirstApplication
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(BIZLayer.BizLayer.ReturnTime());
Console.ReadKey();
}
}
}

Code For BIZLayer Class :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BIZLayer
{
public class BizLayer
{
public static DateTime ReturnTime()
{
return DateTime.Now;
}
}
}

 

Code is fairly simple , a call is made from Main() method to ReturnTime() method in BizLayer , which returns the current time and then that time is displayed in console window.One real interesting thing in VS 2010 is the refined intellisense.Until VS 2008 intellisense option listed all the possible entries irrespective of what member we are looking for and in that list we have to scroll up/down to look for the desired method or property.Example :-

DefaultIntellisense

But with VS 2010 , as soon as we type the very first letter of our desired method/property etc the list gets shorted and it only shows the members beginning with our entered text.

NewIntellisense

Following is the output of above program.

ProjectRunning

All right , forget about the output rather concentrate on the extreme right hand side of the image and what we can see is one of the most important feature of VS 2010 and it is called “IntelliTrace”.You can check out for more about this feature by checking out the following article :- VS 2010 Beta 2 IntelliTrace In-Depth First Look .

Another feature to notice is the “Architecture” tab in the toolbar.

Architecture

Selection of anyone of the options generates the “Dependency Graph”.Which initially looks like this :-

ArchitectureUnExpaned

In the above diagram we can see how the various class libraries are interconnected.”FirstApplication” is dependent upon “BIZLayer” and “Externals”.Externals here are the other dll’s on which your applications depends upon.Dll’s which run behind the scene are a part of externals.You can also expand the individual node in the above diagram to explore its corresponding nesting structure.Following diagram highlights the same :-

ArchitectureExpanded

Here I have expanded the BIZLayer node using the expander icon provided at the top of each node.That's not all , you can do lots of other operations on this designer and explore the various layering and interdependent function calls.Next few images highlights the same :-

Highlight Individual Link : To know more about a particular dependency , highlight the link and select the up and down arrow.In the image below the highlighter is shown on the link between Main method and the Externals node.

ArchitectureAnotherView

Once we select the right side arrow in the highlighter it expands the “Externals” node and gives the basic preview of it.

ArchitectureExpandedFull

You can also perform other operations on this Node diagram by making use of advanced selection criteria's.Image below highlights the same :

AdvancedSelection

Next on the list is the Analyze tab in the toolbar.With this option you can perform various types of analysis either at application level or at individual function level.

AnalyzeTab

Various kinds of analysis are there that can be performed.Few of them are Performance , Code Analysis and Code Metrics etc.

Once you run the Code Metrics , it highlights the information like Cyclomatic Complexity , Depth Of Inheritance , Class Coupling , Lines Of Code etc.

CodeMatricsAnalysis

 

 

 

 

 

 

 

 

 

And in case of performance wizard it provides insight regarding the performance issues of your application.Following is one sample Profiling Report.

SampleProfilingReport

I guess I have mentioned quiet a lot about VS 2010 special and new feature in the current writing.Topics like IntelliTrace , Code Metrics , Performance Analysis , Architecture etc are require separate attention.But I included their overview just to inform users that there is lots of new features that are coming up in new versions of VS 2010 and we should prepare ourselves for an altogether different kind of programming experience with VS 2010.

In the above article I have referenced many other blogs or article which will help you in providing in-depth understanding of that particular concept.I would like to thank all of them for providing such excellent articles.

I will continue exploring VS 2010 and .Net Framework 4.0 and will come up with new articles on my blog with more information.Till then cheers ….

Contact Me

rk.pawan@gmail.com | +1-737-202-7676 | LinkedIn | Facebook | Github |

1 Comment

Comments have been disabled for this content.