Wednesday, April 20, 2011

Installing SQL Server 2011(Denali) CTP Step by Step overview

Today I have downloaded the SQL Server 2011 CTP and I am very excited about the new features provided by it. I am going to post new features of the SQL Server 2011(Denali) CTP in future post. Today I am going to post about how install SQL Server 2011(Denali) CTP on Windows7 machine.

First you need to download the SQL Server 2001(Denali) CTP setup from the following URL. You need download the setup as per your operating system version 32bit or 64 bit version.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9

After once you download the setup. You need to extract files to a location and from that you have to click setup.exe.  After clicking on setup.exe first screen will appear like following.

Step1

Once this screen appear you need to click on installation. Once you click the Installation following screen will appear.

Step2

Above screen will give you few options about installing SQL Server. As I want to install Stand Alone installation I have clicked on Stand alone installation. After that it will perform several test like system requirement and other stuff and then if successfully passed all the test then following screen will appear.

Step3

Then Click OK to continue to setup. Then following screen will appear.

Step4

As I want to install the express edition I have selected the express with advance service. After that terms and conditions screen Like following will appear.

Step5

Accept the licence terms and then click Next and Install. It will start installing the it. After that it will checked about rules and will bring following screen.

Step6

Click on Next and then you select the checkbox for SQL Server features and then following screen will appear.

Step7

Select the features you wan to install then click next then following screen will appear.

Step8

As I have to install default instance I have selected default instance and then click next. Then again one validation screen will appear you need to click next on that and then service account screen will appear you need to select the account via clicking on Use the same service account for SQL Server services like following.

Step9

Once you are done click next and then SQL Server Authentication mode screen will appear like following.

Step10

As I have to select mixed mode which will allow both windows authentication as well normal sql server account. Click on Next there will be several screens which are there for validation once you click next next and then Install it will start installing the SQL Server. Once you are dong with installing SQL Server following screen will appear.

Step11

That’s it You have installed SQL Serve 2011 Denali!!. Hope you liked it. Stay tuned for more..

Shout it

kick it on DotNetKicks.com
Share:
Monday, April 18, 2011

Visual Studio 2010 and UML(Unified Modeling Language) Part-I

Microsoft Visual Studio 2010 comes with great UML Features I will explain them in details in future post. But In this post I am going to explain the UML concepts because its necessary to understand UML concepts before moving to Visual Studio 2010 part. I know this post may sound very basic to some of people but its necessary to understand visual studio 2010 UML Features. So let’s start first basic question.

What is UML?

UML means Unified Modeling Language its a standard language for specifying, visualizing, and documenting the artifacts of software systems as well as for business modelling . UML provide a set of engineering practice that has proven successful modeling of large complex and complex systems. In UML mostly graphical notations are used for expressing design concepts of software. Using UML software development team communicate,explore and architectural design of large scale projects.

Goals and Advantages of UML

  1. Provide user a visually appealing modelling language
  2. Its provides extensibility and specialization mechanism to extend the software.
  3. Its independent of any programming language
  4. Its works better with Object Oriented Design concepts
  5. It integrates best practices

Why we need to use UML?

As you know software is now key part of any company production life cycle. Companies want to enhance their production life cycle with the help of software. So software industries are looking towards to automate the best practices,frameworks and patterns. UML language is defined to use this kind of things.

Different Type of UML Diagrams

1) Class Diagram

This diagram displays contains classes,packages and structures. It displays the relationship between them and Inheritance also.

2) Sequence Diagram

This diagram displays sequences of object and classes participating in the particular operation.

3) Use Case Diagram

This diagram displays the relationship between the actors and user cases.

4) Activity Diagram

This diagram displays the flow of the iteration. Here it describes the actions that are taken on particular objects

5) Component Diagram

This diagram displays the code component of system. It displays high level structure of code itself. It also shows dependencies among the components.

6) Layer Diagram

This diagram visualizes the logical architecture of the system.
We will explore this each Diagram in great details in forthcoming posts.

Visual Studio 2010 and UML

Microsoft Visual Studio 2010 supports the Modelling Projects from where you can create different diagrams. Like following.

ProjectDialog

After that You can add any diagrams and other components of the UML via right click project->add new item.

UMLDiagram

That’s it. We will explore all the features in great details in forthcoming posts. Stay tuned for more.. Hope this will help you..

Shout it
kick it on DotNetKicks.com
Share:
Thursday, April 14, 2011

ExpandoObject class in C# 4.0

As you know till now in c# everything was static and known at design time. But with the C# 4.0 language Microsoft have enabled new dynamic data type which is belongs to Dynamic Language Runtime on top of CLR(Common language Runtime). As you know that dynamic object will know their behaviour at run time. Here Microsoft has given one new class called ExpandoObject class. ExpandoObject class is a member of System.Dynamic namespace and is defined in the System.Core assembly. This class object members can be dynamically added and removed at runtime. This is class is a sealed class and implements number of interfaces like below.

public sealed class ExpandoObject :
IDynamicMetaObjectProvider,
IDictionary<string, object>,
ICollection<KeyValuePair<string, object>>,
IEnumerable<KeyValuePair<string, object>>,
IEnumerable,
INotifyPropertyChanged;

Now let’s take a simple example of console application. Where we will create a object of expandoobject class and manipulate that class at run time. Let’s create a simple code like below.

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

namespace ExpandoObject
{
class Program
{
    static void Main(string[] args)
    {
        dynamic users = new System.Dynamic.ExpandoObject();
        users.UserName = "Jalpesh";
        users.Password = "Password";

        Console.WriteLine(string.Format("{0}:{1}","UserName:",users.UserName));
        Console.WriteLine(string.Format("{0}:{1}","Password:",users.Password));

        Console.ReadKey();
    }
}
}

Here in the above code I have added a new memeber called UserName and Password for the new dynamic user type and then print their value. Now let’s run the application and see its output as below

ExpandoObject

That’s it. You can add valid type of member to ExpandoOjbect class. Isn’t interesting.. Hope you liked it.. Stay tuned for more..

Shout it

kick it on DotNetKicks.com
Share:
Wednesday, April 13, 2011

Variable Reference Code Highlighting and Hide selection features of Visual Studio 2010.

Microsoft Visual studio 2010 is a Great IDE(Integrated Development Environment) and I am exploring everyday something new in this blog post , I am also going to explore something new with Visual Studio 2010. There are two more new features that can make developers life easier. Let’s explore that in detail.

Variable Reference Code Highlighting

It’s a new feature there in Visual studio 2010. Whenever you put the cursor on the variable it will highlight all the code where that variable used. This is a very nice features as within one shot we can see what is done with that variable in code just like following.

VariableRefeferene

Hiding selected code in Visual Studio 2010

In earlier version of Microsoft Visual Studio We can collapse the method and region. But you can not collapse the particular code block but with Visual Studio 2010 code you can hide the particular selected code via right click outlining –>Hide Selection and you can highlight code lets see first following code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Blogging
{
 public partial class _Default : System.Web.UI.Page
 {
     protected void Page_Load(object sender, EventArgs e)
     {
         if (Page.IsPostBack)
         {
             Response.Write("Page is not postback");
         }

         for (int i = 1; i <= 20; i++)
         {
             Response.Write(i.ToString());
         }
     }
 }
}

Now I want to hide the following Page.IsPostBack part via right click Outlining –> Hide Selection

CodeHiding

As you can see in above image there is –(Minus) Icon so you can collapse that code Just like region. Now you want to undo the collapsing then once again you need to select the code in editor and then right click and then select Outlining->Stop Hiding Current and then it will be treated as normal code with out collapsible block Like below.

UndoSelection

That’s it hope you liked it.. Stay tuned for more.. Happy programming..

Shout it

kick it on DotNetKicks.com
Share:
Monday, April 11, 2011

New search feature Navigate To in Visual Studio 2010

While you are doing code review then it is very necessary to search code and navigate code what you are reviewing and Navigate To feature of Visual Studio 2010 is made for the same. With the help of that feature you can easily navigate through code. You can go to Navigate Window via Edit-> Navigate To or you can directly apply Ctrl + , like following.

NavigateTo

After clicking on Navigate Too a window will open like following.

NavigateToWindow

Now you can navigate to any code with this window like following.It’s a incremental search so once you started typing it will automatically filter it self.

NavigateToSearch

So If you know the method name and anything related to project then it very easy to search with this feature. Hope you liked it. Stay tuned for more.. Happy Programming.

Shout it

kick it on DotNetKicks.com
Share:
Sunday, April 10, 2011

Pin features while debugging in Visual Studio 2010.

Visual Studio 2010 is one of most awesome tool to debug Microsoft.NET related code. I have found one more interesting feature with the Visual studio 2010. That is called Pin Data Tip feature. This features can be very useful when you are debugging the code with loops. Normally when you debug with the code if you want to know the value of variable then you have to put your cursor on that variable and tool tip will show the values of that variable. The pin feature will pin that tool tip and you don’t have to put mouse over there. Let’s take a simple example to examine that feature. Below is the code for that. I have created a simple for loop and I am printing variable value with Response.Write on asp.net page. Below is the code for that.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Blogging
{
  public partial class _Default : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          for (int i = 1; i <= 20; i++)
          {
              Response.Write(i.ToString());
          }
       
      }
  }
}

Now let’s put the break point on for loop like following and then start debugging via pressing F5.

BreakPoint

Now I have started debugging and first time code execution came to my break point. Now you can see when I put mouse pointer to that value it will show a variable I value like following.

VaraibleValue

Now as you can see there is one Icon in above code so once you click on that pin Icon that it will pin the DataTip for that variable like following.

Pindatatip

So now whatever you debug in that loop you can see the the value of variable I at any time like following.

VaraibleValue

So that’s it. Now life become easy with this kind of new debugging features of visual studio 2010. Hope you liked it.. Stay tuned for more.. Happy Programming.

Shout it

kick it on DotNetKicks.com
Share:

View Call Hierarchy window in Visual Studio 2010

Visual studio 2010 Ultimate is great IDE(Integrated Development Environment) and I am loving more and more whenever I found some thing new. While doing some Code and Review and other stuff with Visual Studio 2010 I have found one of most interesting feature in Visual Studio 2010 called “Called Hierarchy”.You can navigate your code better with the Call Hierarchy feature in Visual Studio 2010.
To check out let’s Create a sample asp.net MVC application like following .

CallHirerchay

After creating a ASP.NET MVC 2 application it will create a basic simple application and we can run it and We have two views like home and about. We will check few code with Call Hirarchy. We can enable Call hierarchy window with two way one from the View->View Call Hierarchy like following or you can also use the shortcut Ctrl+Alt+K.

CallHirerarchywindow 

Now lets check the Account Controller-> Logon Action Result with call hierarchy You can also enable call hierarchy with selecting the Logon action and right click –> View Call Hierarchy like following or You can use the Shortcut for that like Ctrl + K,Ctrl + T.

ViewCallHierarchy 

Once you click the call Hierarchy It will open the code that is called logon and also call made from the logon method like below.

CallHierarchayforLogin

One you expand the both ‘Call To LogOn’ and ‘Calls from LogOn’ you can see all the calls Since there is no call for Logon on asp.net mvc sample application it will say but you can see calls made from it like following.

DetailOfCall

And on double click on any method or property will navigate you that code. Like I have double clicked the IsNullOrEmpty I have navigated to string class with that property.

StringIsnullOrEmpty

That’s it. So you can see its a great way to navigate code for code review and code inspection. Hope you liked it.. Stay tuned for more.. Happy Programming..

Shout it

kick it on DotNetKicks.com
Share:
Saturday, April 9, 2011

Adding labels to breakpoint in visual studio 2010

With visual studio 2010 Microsoft has given a new features called to add/edit label in break point. This features comes very handy when you are having very large code to debug and You are having so many break points to debug. So, You can add the label to various break point and then use this label to understand execution of program. Let’s see how its works with visual studio 2010.

I have written following sample code to understand it better. This is a simple default.aspx page with four method to print a string on web page.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Blogging
{
  public partial class _Default : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          Method1();
          Method2();
          Method3();
          Method4();
       
      }

      public void Method1()
      {
          Response.Write("Method1");
      }
      public void Method2()
      {
          Response.Write("Method2");
      }
      public void Method3()
      {
          Response.Write("Method4");
      }
      public void Method4()
      {
          Response.Write("Method4");
      }
  }
}

Here you can see there are four methods method 1,2,3 and 4 and each printing respective string with respective methods.

Now Let’s put four break point in visual studio like following.

Four breakpoints with four methods

Now let’s debug the web application via pressing F5 and then we will go one by one break point and will add labels. Now I am at first break point.

FirstBreakPoint

Now when you go to the break point window you can see all the break point over there like following.

BreakPointWindow

Now let’s Create a new label first for break point via selecting that row and right click edit label like following.

Edit Labels

Once you click edit labels a window will appear which will ask for adding a new label for break point like following.

AddLabel

Now I am adding a new label called method1 label in this box.Now you can see the in break point window with a label just like following.

Method1Label

So now you can see the Method 1 Label is there so you need not to check this break point via clicking on that break point. You can remember this break point via clicking on this. That’s it. Hope you like it.. Stay tuned for more.. Happy Programming.

Shout it

kick it on DotNetKicks.com
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews