Mohammed Atef’s Technical blog

Directed Graph Markup Language(DGML)


DGML (Directed Graph Markup Language) is Microsoft use in VSTS 2010 Architecture to render graphs the power of DGML is in its simplicity.

Using DGML Code
if you have Visual Studio 2010 CTP you can add new file and rename it with dgml extension then add the following lines of code

<DirectedGraph xmlns=>
  <Nodes>      </Nodes>
  <Links>      </Links>

The DirectedGraph node used to inform Visual studio that we have DGML file. Nodes list contain all nodes for this diagram and Links determine the link between Nodes.

Yes it is very simple, let’s see what happen if you need to add to nodes like the below Image


Directed Graph Markup Language

Directed Graph Markup Language

 Just write the following code

<DirectedGraph xmlns=>
  <Nodes>      </Nodes>
  <Links>    <Link Source=From Target=To />  </Links>

 You can notice that we just add one line which tells the Visual Studio that we have Source node From and Target Node is To.
I think you get it now, you can add any number of related nodes with this simple code


What happen if you need to group number of nodes into one single node? It is very simple you can create Container which can group number of nodes.
You can create container with adding two few lines of code as follows

<Node Id=My containner Group=Expanded/>
Link Source=My containner Target=From Category=Contains/>

So if you need to draw diagram like the below one


Directed Graph Markup Language

Directed Graph Markup Language

Just write this few lines of code

<DirectedGraph xmlns=>
  <Nodes>    <Node Id=My containner Group=Expanded/>  </Nodes>
    <Link Source=From Target=To />
    <Link Source=My containner Target=From Category=Contains/>

Actually VSTS 2010 CTP use DGML for draw all architecture for assemblies, namespace, classes and method.
It is very useful for any developer to understand the architecture for old exist systems, now you can do this by click View->Architecture
Explorer from Visual Studio IDE as shown below


VS 2010 CTP Architecture Explorer

VS 2010 CTP Architecture Explorer


 Really thank you Microsoft for this great product. I think Microsoft has been covered a lot of our needs in our Software Lifecycle.Hope this help….


March 30, 2009 Posted by | .Net 2010 | , , | Leave a comment

Domain-Specific Language (DSL) Tools

Kindly I have wrote this post to give you quick brief about DSL tools and howit is related to Visual Studio.

DSL Tools

Domain-Specific Language Tools enable the construction of custom graphical designers and the generation of source code using domain-specific diagrammatic notations. So you can create a UML-like graphic designer in Visual Studio.
Using DSL Tools is quite straightforward, and you can create your own UML-like language relatively quickly.

Domain Specific Language Tools used to build a graphical designer integrated into Visual Studio for your own domain specific language. The Domain Specific Language Tools ship as a separate download for Visual Studio. The DSL Tools are an SDK that allows you to use Microsoft’s generic modeling platform to build visual modeling tools that run inside of Visual Studio. The SDK contains code generation tools that will generate a running designer based on an XML description.

First I want quickly introduce the DSL Tools. DSL Tools was merged with the Visual Studio SDK, but do not mix them up because DSL Tools is actually one layer above as it uses the Visual Studio SDK to allow you to create your plug-in. We could describe the relationships between the Visual Studio SDK, DSL Tools, and Visual Studio as three domains containing each other like this:

Domain-specific language Tools

Domain-specific language Tools

Hope this help…..

March 29, 2009 Posted by | Architucture | , , | 1 Comment

VS 2010 web Package


Every web developer does deployment for his web application more times and sometimes we face problems. But these problems became very important as some enterprise environments needs to move across various environments before being deployed to a production Environment.  A typical set of transition servers are development, testing/QA, staging/pre-production and production.  Also on the production environment there are web farms where these webs need to be replicated

Actually any web deployment needs the following check list during deployment.

  • Web Content (.aspx, .ascx, images, xml files, ..etc)
  • IIS Settings (Directory browsing, Error pages, Default Documents etc)
  • Databases that the web project uses
  • GAC Assemblies and COM components which the web project depends upon
  • Registry Settings that may be used within the web project
  • Security Certificates
  • App Pools

Today using VS 210 doing all these things is more or less a manual process and involves documentation that both developers and server admins have to deal with. 

Web Package Steps

VS 2010 uses MSDeploy to create the web package from your web application. The package created by VS can be installed using UI in IIS Manager, we anticipate that developers eventually will give the web packages to server administrators who will be able to inspect/verify the package and then install them on the server. Now let us learn how to create a web package.
VS 2010 introduced one additional property page for WAPs (Web Application Projects) called “Publish” as shown below:

web package publish preoperty page

web package publish preoperty page

You can follow this step to create Web Package

Step 1: Configuration


The Publish tab is made configuration aware as deployment settings tend to change from environment to environment; for e.g. many a times developers want to deploy their “Debug” configuration on a Test Server and include PDBs as part of this deployment. When the same web is deployed in “Release” configuration on a production server the deployment may exclude PDBs. As shown below you can select deployment mode for configuration you can configure your deployment to be used in debugging, release or any custom mode.
web package configuration tab

web package configuration tab


Note VS 2010 add new feature for configuration manager properties screen. if you need to learn about this click Here

Step 2: Items to Package/Publish
This section will help you decide what type of content you would really like to package/deploy.

Types of Files:

By default this option is set to “Only files needed to run this application”. This is usually sufficient for your deployment as it includes all the files from your project except source code, project files and other files not required to be deployed. But we have another two additional options available as shown below…



web package Item to package

web package Item to package


“All files in this project” and “All files in this project folder” options are very similar to what Publish WAP options were in VS 2008.

  • Exclude Files from App_Data folder

 “App_Data” folder is a special ASP.NET folder where many developers like to put their SQL Express DBs (.mdf/.ldf files), XML files and other content which they consider Data. In many situations on production web server a full version of SQL Server is available and using SQL Express is not all that relevant. In such scenario a user can check the “Exclude Files from App_Data”.

  • Exclude Generated Debug Symbols

 It is important to understand that generation of debug symbols is different from deployment of the same. This check box will tell VS 10 whether you would like to package/deploy the already generated Debug Symbols or not.
You can see the previous to options in the below image.



web package Items to package options

web package Items to package options










Let’s talk for a minute about debug symbol. If you would like to generate debug symbols for your application you can do so by going to the “Build” tab in the Property Pages and clicking “Advanced” bottom at the bottom. Here you will have different options for the level of debug symbols you would like to generate for your Web Application Projects (WAP) as shown below …

web package debug symbol

web package debug symbol








Step 3: Package Items

  • IIS Settings 
    Checking this checkbox informs VS10 that you are ready to take all of your IIS Settings configured for your application in IIS Manager as a part of your web package.  I am glad to tell you that IIS 5.1, IIS 6 as well as IIS 7 environments are supported as part of this feature hence whether you are working on XP, Win2K, Win2K3, Vista or Win2K8 you should have no issue with packaging IIS Settings…  
    This setting includes the “App Pool mapping” your web is configured to run against
  • Additional Settings –   The items in this grid are advanced properties.  It is still good to know about this because it impacts what will be included in your package.  Most of the properties in this grid are related to the entire server and not just to your application so you should use them very carefully. 

You can see this two option in the below screen shot

web package Items

web package Items

Step 4: Package Settings
  • Create MSDeploy Package as a ZIP file
    this checkbox allows you to decide whether you would like to create your web package as a .zip file or as a folder structure. If you are concerned about the size and are moving the web package around very often then I can see you using .zip format for the package. On the other hand if you care to compare two packages using diff then you can use the folder format.
  • Package Location – This is an important and required property as it defines the path at which Visual Studio will place your web package. If you choose to change this path make sure that you have write access to the location.
  • Destination IIS Application Path/Name – This property allows you to give IIS Application name that you will use at the destination Web Server.
  • Destination Application Physical Path – One of the most important information which is embedded inside the web package is the physical location where the package should be installed. This property allows you to pre-specify this embedded information.  You will have an opportunity change both IIS Application Physical Path as well as Application Name at the time of deployment. 



web package setting

web package setting

Last Step: Create the “Web Package” 

This is the last step in creating the web package and the simplest too…  The idea is that once you configure the above settings creating a package should be easy; in fact even if you do not go to the “Publish” tab we have tried to set smart defaults so that in most normal circumstances creating web package should be just the below two steps:


web package create package option

web package create package option










  • Right Click on your “Project”
  • Click on Package –> Create Package

Once you click on this command you should start getting output messages around your package creation pumped into your output window… 

When you see “Publish Succeeded” in the output window then your package is successfully created.

To access the package go to the location specified in the “Package Location” textbox.

Finally, you can also automate creation of web packages via your team build environment as everything discussed above is supported via MSBuild Tasks.

 Hope this helps… 




March 26, 2009 Posted by | .Net 2010 | , , , | 1 Comment

VS 2010 Configuration Manager


Kindly I would like to give you new features added to Configuration Manager Properties page in VS 2010.all of us use this property page lets know what’s new.

Configuration Manager
Many property pages of a project (File –> New –> Project –> Web Application Project) support Configuration specific properties:
vs 2010 configuration option shoot


What this essentially means is that all the properties in that tab can be saved in the project file and will be saved per configuration.  This would mean that when your active configuration is “Debug” then all the “Debug” settings will be used.
Debug and Release configurations are available by default in Visual Studio but if you would like to add more build configurations (for various server environments like “Dev”, “QA”, “Staging”, “Production” etc then you can do so by going to the Build –> Configuration Manager.
VS 2010 configuration manager property page








Note: Deleting a configuration for the solution does not delete it for every project within the solution and vice versa, so when using Configuration Manager make sure that you remove the configurations from the correct locations.

You can also select your active configuration for Visual Studio 10 from the Configuration Manager UI as shown above.
The configurations are stored in the project file as shown below:

VS 2010 Configuration Manager project config file









Hope this helps…..

March 26, 2009 Posted by | .Net 2010 | , , | 1 Comment

Microsoft Dev Night

Hi all,
I am very glad to invite you to attend this public event ‘Microsoft Dev Night’.

Actually, we will talk about Microsoft SQL Server 2008, Visual Studio 2010 Team System and .Net Framework 4.0.

ISA, I will speak about Visual studio 2010 Team Systems, so kindly find the main topic that I will go throw it.

Visual Studio 2010 Team System

       Design & Architecture

      Parallel Programming

      Quality/ Testing

      Source Code Management


      Project Management

      Web development

If you are interested to know about this topic you are welcome and I will be very happy to see you there.


March 24, 2009 Posted by | .Net 2010 | , , , | 1 Comment