Infosys Microsoft Alliance and Solutions blog

« November 2008 | Main | January 2009 »

December 31, 2008

Unfolding Multiple Projects using Blueprints

In this blog we will see how to unfold multiple projects using Microsoft Blueprints. Unfolding default project or single project is quite easy. We will start with default and single project first and then see what extra needs to be done for multiple projects.

 

 

 

 

 

When user selects blueprint which he/she needs to use and clicks unfold, .Net project gets unfolded in current solution. By default the structure of this unfolded project looks as follows  

 

 

 

 

How to specify this unfolded project according to our requirements? We will see this today where we will first unfold single project using blueprints and then extend it to unfold multiple projects.
To specify your own project template for blueprint, right click on Blueprint project and click “Edit Configuration” menu. You will see input “Template” here. By default value selected is “Auto-generated”.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

You can choose option “User supplied” which allows you to specify which project template to be used for unfold action. Name of template file can be then entered in “Template” input textbox.
To create template file we will use utility provided by Visual Studio itself. Open the project for which template has to be created and select Menu File -> Export Template. This will create corresponding template for project and put it in folder “My Documents\Visual Studio 2008\My Exported Templates”
Suppose we have created template for Windows Application project, and name of template file is “WindowsApp.zip”. Copy this file and put it Blueprint project’s “templates” folder.

 

 

 

 

 

 

 

Also make sure you have given same file name for Template input using “Edit Configuration”.

 

 

 

 

 Now Build Blueprint and see what it unfolds by opening another Visual Studio instance and using Blueprint manager. The unfolded project will be exactly same as what we have put in WindowsApp.zip template.

 

 

 

 

 

 

 

 

 

 

All menus with visibility “ThisProject” will be enabled for this unfolded project.
So we have successfully unfolded single project using blueprint. Steps were very straight forward and easy. Now let’s see how to unfold multiple project using blueprints. We will use already created project template “WindowsApp.zip” as first project template and will create new project template for class library say “ClassLib.zip”.
Now let’s target to unfold both these projects together using blueprints. Steps are as follows

  • Make new folder “WinSols” in templates directory of blueprint.
  • Unzip “WindowsApp.zip” and “ClassLib.zip” inside “WinSols” folder.
  • Add file “MyTemplate.vstemplate” in “WinSols” folder.
  • Edit file “MyTemplate.vstemplate” so that it contains information which projects to unfold when this template is used. We will use “ProjectCollection” tag to specify multiple projects. File will look like this

 

 

 

  • Now select all files in “WinSols” folder by selecting “MyTemplate.vstemplate” first and say “Add to Zip”.
  • Zip file “WinSols.zip” will be created. Put this file in templates folder of Blueprints which should be visible from Solution Explorer too.
  • Specify now “Winsols.zip” as template file name using “Edit Configuration” dialog of blueprint.
  • Rebuild blueprint and see what it unfolds now using second visual studio instance and Blueprint Manager. Unfolded projects look like
 

But now if you right click on any of above projects, you won’t be getting menu “Blueprints”. But this is not desired as then it loses main purpose of blueprints as workflow attached with blueprint is not accessible at all. Now here is a trick how to achieve this.
In steps we listed above for unfolding multiple projects, when you finish step 2 where we unzipped our multiple templates follow steps given below so that those projects get right click menu “Blueprints”.

  • When you build blueprint project, build action creates file “StartupGUID.xml” in properties folder of blueprint. Note that this file is not visible in solution explorer and you need to browse for it in Windows explorer.
  • Open this file and you will see entry as follows

            

 

 

 

 

Now this GUID is mainly used to associate unfolded project with specific blueprints. This only decides what menu should be available on unfolded project.

  • Copy above ProjectExtensions tag and put it in both projects .csproj file. At the end (i.e. Classlib\Classlib.csproj and WindowsApp\WindowsApp.csproj). For this you need to open these files using Notepad.
  • Once you modified .csproj files repeat steps explained above from 3 and see if you are getting menu “Blueprints” now on unfolded projects. And all blueprint menus having “ThisProject” visibility will be available for them.

December 24, 2008

Financial implications of the Cloud

Cloud computing is a new style of computing which packages computing resources such as processing power, storage, connectivity etc as a service and delivering the same to the consumer in a scale-free, cost efficient and timely manner over the web. Applications get into production much quicker than the traditional models by which applications are provisioned. This entails a shift in the way applications would be built, executed and also managed in the future.

In an attempt to understand the financial implications of the new cloud based model used for deploying and running web applications over the traditional client server web application model a little better, we shall discuss this in the context of a hypothetical scenario which would highlight differences one would observe in both the cases.

 

 

 

A startup company that intends to have some web presence decides to build a self service web application which shall receive orders from their end customers. From a architectural perspective, they decided to build a simple data driven web application that is easily available over the internet to their customers.  Let us assume that the application designed is a traditional 2 –tiered client server architecture representative as shown in the figure below: 

clientsrvr.jpg

So what is it that is required to build an application which is available over the Internet? An attempt to mark out some of the key asks are in the list below and classified them under the various costing heads
Capital Expenditure

1.       Construct a physical brick and mortar facility to host the servers including the cabling, USP/Generators to keep the server always ON

2.       Procure a server grade hardware(s) for the client and server setup. In case you have availability requirements then you would have at the minimum two servers that bring in some redundancy to help achieve this. Additionally we would have to include redundant component such as NICs, UPS’s, switches

3.       Software Licenses required to build High-Available web applications Windows Server OS’s, NLB, firewalls and security solutions such as ISA

4.        Additional hardware and software cost required for setting up an available DNS server to  resolve client requesting name resolution

5.       Provision a static IP from your ISP

6.       Database software licenses would have to be purchased

7.       Operations and Management software licenses such as MOM, backup facilities.

8.       Purchase a development system, assuming that you would want to have your development environment separate from the production site

9.       At the minimum Win XP license for developers

10.   Purchase the Visual studio licenses to develop the web application

11.   Purchase the developer edition db license for the persistent storage

Operational Cost

1.       Registering your DNS addresses with ICANN

2.       Per unit power charges for keeping the production systems always ‘ON’  including power consumed by the hardware, air-conditioning

3.       Salaries to maintain and manage the infrastructure

Non-Operational Costs:

1.       Carbon tax for companies running their own data centers

Opportunity Loss:

1.       Sub-optimally utilized hardware

2.       More time to market involved mainly due to the time spend on procuring and provisioning the resources

 Now comparing this to an application which adopts to a cloud based architecture as shown in the figure below

cloudarch.jpg

 

The costs which shall be incurred would include:

Capital Expenditure:

1.       Purchase a development system, assuming that you would want to have your development environment separate from the production site

2.       At the minimum Win XP license for developers

3.       Purchase the Visual studio licenses to develop the web application

Operational Cost:

1.       Per unit charge to use the cloud OS services which will execute the web application

2.       Per unit charge to use the cloud db services

As can be seen a business has been able to considerably eliminate its capital expenditure on IT, resulting in tremendous savings. Savings allows firms to invest in its core business areas that would lead to revenue generation. Moreover in these times of economic recession, credit for businesses is not easily available; hence any savings that businesses can achieve will help them to have that much extra to run the business.

In addition to having direct financial implications in terms cost, the cloud platform also help in enhancing the Time to Market of software applications

Time is Money

It’s an old cliché we all know and understand, but to what extent do we see IT able to support businesses in applying this in principle. Businesses have lost out on opportunities simply because the systems which they have build over the past decade or so have now become inept or non-responsive to cater to the growing dynamics of the business. Their architectures do not allow them to adapt to the dynamically changing requirements or even for that matter be elastic to cater to fluctuating user demand.

Some factors effecting an applications Time to Market:

1.       Time is spent on procuring or provisioning hardware or software while deploying a new application.

2.       Time is spent on procuring or provisioning additional hardware if existing applications have to handle any growth in business such as during mergers/acquisitions, seasonal or market.

The evolution of the Web, SOA and Virtualization technologies have now amalgamated to herald this new style of computing, read more here. The Cloud inherits the intrinsic traits of these three technologies which allow enterprises adapting to this new style of computing build applications which are available everywhere, become agile and elastic to meet fluctuating user demand. It not only extends existing on-premise/hosted applications but also gives opportunities to realize existing architectural patterns more easily or even discover new patterns in which applications get developed, provisioned and delivered. All this in a relatively shorter span of time as compared to the traditional approach of constructing and commisioning applications.

December 15, 2008

Remote deployment of Clickonce application on IIS 7

Recently I was working on a WPF application that was being used by our entire team and I used to keep releasing new builds frequently and it became an issue as I had to inform everyone of the new bits and then they would all install it again. So we decided to go ahead with clickonce type deployment for the application and for this purpose used the wizard that is accessible from the project properties in VS 2008.

It was pretty trivial exercise to create a virtual directory on IIS and then publish the application and all was well. Then we hit an issue that since I was working of a laptop, when I was not in office, others could not install the updates. No rocket science in this that we then moved the installer (the published version) to a server and shared the new URL.

Everything was working fine till earlier today when a new person was trying to install the application and she got an error, which said that the particular .application (the manifest) file could not be accessed. What was surprising was the path that was shown in the error was actually pointing to my laptop and not to the server machine. It was only then I realized that when I publish a clickonce application, the URL is embedded inside the manifest file and when I just copied the files to server, it wasn't actually running from the server, but still was running off my laptop.

I opened the .application file in VS and saw that the codebase attribute of deploymentProvider element was pointing to the earlier published URL (laptop's IIS). I modified this and saved the file again, but now accessing the application actually resulted in corrupt manifest error. I haven't checked the details, but most likely when the .application file is built some checksum/hash value is also embedded inside the file. There is a hash element in the file which seems to indicate this. Since I directly modified the file, the file data and hash value were no longer in synch and hence the corrupt manifest error.

So I went back to the project in VS 2008 and tried publishing from it directly to the remote location. For this purpose, I set the URL to point to the remote machine's virtual directory that I had created for this purpose. Note that the remote machine was a Vista box and hence it was on IIS 7 that I was publishing the application. I got an error that essentially stated that the remote web site didn't had FrontPage Server Extensions (FPSE) and hence publishing failed. In IIS 7 I could not see any option to install FPSE also and somehow it didn't make sense.

A bit of search online and I got some hints from this site and accordingly I picked deployment to physical file folder and gave the URL in the "Installation Folder URL" field as seen in the figure below.

clickonce.jpg 

With this the publishing happened without any more errors and the person was also able to intall the application without any issues.

Subscribe to this blog's feed

Follow us on

Blogger Profiles

Infosys on Twitter