« October 2008 | Main | December 2008 »
Suppose an enterprise has a set of services that it feels can be exposed to the internet for business or for its own usage, there are two ways to address it.
1) Setup the services on a DMZ thereby exposing the services in a secure manner to the internet.
2) Open up ports on the enterprise firewall to allow inbound access from outside machines to the services running. [This is not allowed as it has the potential to allow users to exploit the enterprise network]
The first mode of setting up a DMZ is the preferred way, but its limitation would be allowing access of DMZ machines onto the enterprise network. If the DMZ needs to access internal systems like a Mainframe, then there could be deployment and security issues.
The Microsoft .NET services (or the BizTalk Services as it was previously called) allows enterprises to expose their services to the internet from within a firewall without having to setup a DMZ or allow explicit inbound access to the machines. It used the concept of Relay Binding (extension over the existing WCF) to allow access to the services. Allowing disparate systems to be interconnected through the internet, the .NET services sets up an internet service bus in the Microsoft cloud.
Some of the offerings of .NET Services are:
1) Access Control Services or Identity Services: it is a hosted service that enables enterprises easily manage its users supporting user identities from various organizations
2) Connectivity Services: These services make connectivity between services in different enterprises feasible. We could host a service from within Infosys Firewall and it could be consumed by a customer in another enterprise or on the internet. It allows enterprises to expose services through the .net services as a URI which is accessible over the internet. In practice, the actual URL and Machine of the service is hidden from the client applications.
3) Workflow Services: A new addition to the .NET services, it allows execution of Windows Workflow Services that orchestrate the interactions between other services hosted via the ISB.
4) .NET framework extensions that allow connecting to the ISB through applications
The Connectivity Services relies on using RelayBinding

Applications that need to use connectivity services establish outbound connections (allowed by enterprises) to the service bus. This would be done by both the sending as well as receiving applications.
When an application listens on an endpoint, it automatically polls the Connectivity Service to retrieve incoming messages. In a simple example, suppose applications in two distinct enterprises send and receive messages through the WCF framework and APIs. Enterprise A establishes an outbound connection to the Connectivity Service, and begins listening on an endpoint, defined by the URI labs.biztalk.net/enterpriseA/someapp. Enterprise B also establishes an outbound connection to the Connectivity Service, and sends a message to the same URI. The Connectivity Service receives the message, and relays it to the application in enterprise A, via its already open connection. The SDK simplifies developing applications that use the .net services, and enables existing applications to use the service bus without modifications.
In cases where Direct connection is possible, the service bus would first establish a relay connection and then make a direct connection between the applications. The connectivity service internally calls the identity services to authenticate the users. The steps to start working on service bus are.
1) Create an account on the http://labs.biztalk.net site.
2) Download the .net services SDK and install it on the machine.
3) If the machine is within a firewall then open outbound connections to 65.55.22.* and 65.22.20.* IP range over the following ports 808, 809, 818 and 819. Install the Winsock client so that access to the BizTalk service machines is available. [This is required because the relay mechanism internally uses TCP connections to ensure connectivity with the Service bus]. Now we are set to start using the sample applications.
There are many sample applications available in the SDK that showcase the various abilities of the Service bus like Relay connection, multicast, Direct connection, Http based file sharing and Workflow. The .NET services offer a simple way for enterprises to share their services across the internet without having to put them on a DMZ or another hosting service. This blog from Clemens Vasters has a good amount of information about .NET services.
1. Better support for side by side, where in you can have CLR 2.0 and 4.0 in the same host process. This will be specifically useful for addins.
2. No more PIA (primary interop assemblies) to worry about.
3. New signature generation tool that can look up windows.h to generate p/invoke signatures. The tool will be on code plex shortly.
4. .NET supported 16 languages, but no support for dynamic languages and functional language. Iron Python, Iron Ruby and F# will now be supported.
5. Big integers support added in BCL (base class library) so any language on top can leverage it. For more details on BCL changes check here.
6. Tuples supported in F# and Iron Python. It is more used for making new classes or allows functions to return multiple values. This is now added to BCL so langauge interop becomes easy.
7. Tail recursion optimizations done in F#. C# compiler still doesn't support this.
8. .NET Framework now installs faster and applications can startup faster. Installation and NGEN is done in parallel. Startup times improvements due to layout optimizations and can result in upto 40% improvements in some applications.
9. .NET applications can now run from network share with full trust, so it is easy to deploy applications. This feature has been added in .NET 3.5 SP1 itself.
10. Improvements in threading to take advantage of multi-core machines. Thread pool code improved in conjunction with task parallel library implementation.
11. Support for background GC.
12. Better profiling support with ability to attach/detach performance and memory profilers to production servers without having to install
13. Using catch(Exception e) is bad since it will catch all exceptions include access violation, illegal instruction (exceptions that corrupt the state) etc. Going foward to handle this, you will have to use the [HandleProcessCorruptedStateExceptions] attribute at the function level.
14. Dump debugging simplified by supporting ICorDebug to debug dumps right from Visual Studio. Also new lock APIs are available to help find more details about locaked objects.
15. Code contracts are powerful new constructs that can help write assert and post condition type statements, but in a more powerful manner. Static analysis tools can understand these and identify violations without you even running the code. To know more about code contracts and how they work well with unit testing to help improve the code quality, check this pdc session.
If you want to play around VS 2010 and .NET 4.0, you can download the CTP from here, and can provide your feedback here.
However when we configured the specific applications on IIS, and tried to browse to the WCF's SVC file, we got a 404.3 as seen in the figure below.

Essentially what this shows is that IIS isn't configured correctly and when you try to access the service details by accessing the SVC file, IIS is unaware on how to handle this request. The resolution shown here can be a bit misleading. The mime map option isn't right since what we want is to be able to execute the SVC file on server and not really return it as some kind of stream from IIS. For execution, appropriate http module and handlers need to be registered with IIS. This can be done via the IIS Admin console or directly editing the applicationHost.config file (filepath - C:\Windows\System32\inetsrv\config). The following changes are required.
Add the following handlers to the file inside of section "<location path="" overrideMode="Allow">"
<add name="svc-ISAPI-2.0" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
<add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode" />
and also in the same section add the following module
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler" />
While you can manually change the file to do this, it is much easier to do this via the "Turn Windows features on or off" (via Control panel). Apart from the config file changes, there could be other configurations related to specific security settings etc (I haven't tried to find out as yet) could be required that will be taken care via this setup.

The "Windows Communication Foundation HTTP Activation" is not enabled by default. You can check that and click OK and this will do the necessary configurations along with making the changes to the applicationHost.config file as I mentioned above.
With these done, when I browsed my service's SVC file again. I got the familiar screen as seen below and got the service working fine.

HTH.
If you have been following updates on Silverlight (SL) 2, you would already be aware of SL 2 Toolkit on codeplex. Scott in his blog has shared some amazing numbers on usage of SL and also given some indicators to where SL is headed in its next version.
I had been away from SL for some time due to other focus areas. However I decided to try my hands on the support for themes, a feature added with SL Toolkit.
This intro by Jesse Liberty amazed me. The theme seemed so trivial to use. The basic idea on these being available as controls that I could drop on my form and embed other controls inside of it was amazing. I decided to give this a try and started with my sample application. While building this, I observed a few things, which I wanted to capture and share
I am surprised why debug execution gives an error while run doesn't (point 5). If anyone has found out a reason, please share.
You can handle the AppDomain.UnhandledException event to attempt to save some state/information as may be required and possible, but you can't stop the application from terminating. Note however that if a similar unhandled exception is raised from the main thread (of a winform application), the application may not terminate.
MSDN excerpt - "In applications that use Windows Forms, unhandled exceptions in the main application thread cause the Application..::.ThreadException event to be raised. If this event is handled, the default behavior is that the unhandled exception does not terminate the application, although the application is left in an unknown state."
To see this behavior, check the following code. In the Form1, I have added 2 buttons (button1 and button2). In the button1 code, I raise an exception, so this acts as an exception on the main thread itself. In button1 code, I start a new thread and then raise an exception in the thread function.
private void button1_Click(object sender, EventArgs e)
{
throw new NotImplementedException();
}
private void button2_Click(object sender, EventArgs e)
{
Thread th = new Thread(new ThreadStart(func));
th.Start();
}
void func()
{
throw new NotImplementedException();
}
Finally, in the program.cs, I have added an event handler to handle the thread exception.
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
MessageBox.Show("exception caught");
}
To see the actual behavior, you should run the application and not debug it. In case of the button1 exception, you get a framework provided message box that allows you to handle the exception and continue executing the application. In case of the button1 exception, you will see the message box as per the code in the event handler that I have written in program.cs (as shown above), and after you click OK on the message box, the application terminates.
So back to the question we started with. Essentially the solution lies in not throwing the exception from the thread, but handling it in the thread method itself and instead firing an event that the main thread can handle and get details on the exception. The good news is that this behavior has already been provided in BackgroundWorker class. See the modified logic for button2 code to show how this works.
private void button2_Click(object sender, EventArgs e)
{
BackgroundWorker worker = new BackgroundWorker();
worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
worker.DoWork += new DoWorkEventHandler(worker_DoWork);
worker.RunWorkerAsync();
}
void worker_DoWork(object sender, DoWorkEventArgs e)
{
throw new NotImplementedException();
}
void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Error != null)
MessageBox.Show(e.Error.Message);
else
MessageBox.Show("all fine");
}
In case of exception the RunWorkerCompletedEventArgs.Error property is set and the details on the same can be obtained in the RunWorkerCompleted event handler. If you are interested, you can always debug into the framework code to see the details. The following code snippet shows how this is implemented in the BackgroundWorker.cs class
private void WorkerThreadStart(object argument)
{
object workerResult = null;
Exception error = null;
bool cancelled = false;
try
{
DoWorkEventArgs doWorkArgs = new DoWorkEventArgs(argument);
OnDoWork(doWorkArgs);
if (doWorkArgs.Cancel)
{
cancelled = true;
}
else
{
workerResult = doWorkArgs.Result;
}
}
catch (Exception exception)
{
error = exception;
}
RunWorkerCompletedEventArgs e =
new RunWorkerCompletedEventArgs(workerResult, error, cancelled);
asyncOperation.PostOperationCompleted(operationCompleted, e);
}
You can see the main execution logic on the BackgroundWorker is inside of a try catch block and the exception obtained is set to the Error property of the RunWorkerCompletedEventArgs class.
Hope this helps.
One of my colleague, Archana Sachin Ghag who is a key member of our software factory team has just finished writing a Blueprints Walkthrough. I am sharing this walkthrough with rest of the development community hoping it may act as a jumpstart for your Blueprints adoption.
Before you start creating your own Blueprint using Microsoft’s Blueprint Manger go through this article which introduces Blueprint Concept and Blueprint Manager. To start building your own Blueprint, Blueprint Manager comes with “Microsoft Blueprint Factory” which is nothing but a Blueprint itself.
When you select “Microsoft Blueprint Factory” from Blueprint Manager and click “Unfold”, it prompts for project you want to unfold this Blueprint Factory. I usually prefer Blank Solution to unfold Blueprint Factory.

Before unfolding starts, user will be prompted for the project name.

By default, the name is shown as BlueprintFactory. You can change the name according to your requirements. I will say it as MyFirstBlueprint.
Unfolded project in blank solution will look like this.

When you right click MyFirstBlueprint project you get a context menu with caption “Blueprints” containing different options to configure various aspects of the blueprint.

Note: Menu item Blueprints is the key for Blueprint development. All guidance is provided through this menu. Whenever a blueprint is unfolded on a machine, it adds a blueprint context menu item specific to this unfolded blueprint which provides guidance to the developer.
Next step is to configure my Blueprint. Click Blueprints -> Edit Configuration. Blueprint will display Blueprint Editor which allows user to configure all possible options available with blueprint viz.
1. General Configuration
2. Options
3. Menus
4. Commands
5. Related Blueprints
6. Installation Actions.
In this article we will see some of the general configuration settings and further discuss how to implement commands and menus in our custom blueprints.
Edit Configuration will show the following dialogue box.

On Configuration Tab you can configure
1. Project Name- This name will be used during unfolding of projects and it is also important as far as build artifacts of blueprint is concerned. When we build Blueprint project it creates a zip file containing all information for RSS. The name of this file will be <ProjectName>-RSS.zip. Build will also generate folder named ‘ProjectName_Pacakge’. This contains all files needed to run blueprint. To see all this information you have to open Windows Explorer after build and see your blueprint directory. You cannot see this information in Visual Studio itself.
2. Type of Blueprint can be Microsoft or Third Party or hidden.
3. Publisher will be your company name.
4. You can also give RSS feed link here. This is very important from a delivery and deployment perspective as Blueprints Manager can update existing blueprints through this RSS Feed whenever a new version is available from within Visual Studio IDE itself.
We will now see how to use Commands and Menus Tabs to create our own Menu option for “Blueprints”.Each menu item has command associated with it. On click of this menu item, command associated with it gets executed.
Blueprint shows/executes its commands or menus from .Net library called Blueprint Extension Library. This library has to follow some standard so that blueprint understands it properly.
1. Assembly name for extension library should start with Blueprint’s project name.
2. Class which handles commands must derive from ‘BPMExtensionBase’ from ‘Microsoft.SoftwareFactories.Blueprints’
3. You must copy the extension library to “extensions” folder inside “MyFirstBlueprint” project folder.
Click Blueprints -> Add Extensions to create a new extension.

It will add extension library project to the solution and set Assembly Name as required by the blueprint. Specify project name for extension using the following dialog box.

Now solution will look like this

MyExtensions project contains class “ExtensionClass” with a sample command implemented that will help you to implement your own commands. You get Menu “Blueprints” even on MyExtensions project which will give option to see workflow which will give step by step guidance on how to use this project for your blueprint. Modify class ExtensionClass to implement your own commands. Build MyExtensions project using Visual Studio.
Now the next step is to specify commands from MyExtension which will be used by “MyFirstBlueprint”. For this we will again click on Blueprints -> Edit Configuration menu to get Blueprint Editor. Open Commands Tab.
Add new command and fill the details as follows

Once command is added, the only step remains is to associate this command with a Menu Item. Create new Menu Item using Blueprint Editor’s Menus Tab.

Visibility has many options supported as Filters. You can see all available Filters from Blueprints -> Workflow menu item. These filters decide for which project or project item you want to show this context menu item.
Save both projects and build them. Once built and auto install is successful, you can see your blueprint entry in Blueprint manager. Unfold it and see whether you get custom menu created by you.
NOTE. Remember you have checkbox “Custom Menu Filters” checked on Blueprint Manager to see your own menus.

Hope this helps to quick start Blueprint development. Once Menus are appearing you can write whole lot of customized stuff in your commands to auto generate repetitive code or provide any kind of guidance needed.
Installing SQL Server 2008 Developer Edition RTM on one of my desktop having Windows Vista has been a nightmarish experience for me. The setup always failed at the end while running post installation scripts with an error message “Access is denied”. I tried running setup with all possible security settings that I could have but of no avail.
When I checked the installation log file, I found the following
2008-11-06 09:23:21 SQLEngine: : Checking Engine checkpoint 'GetSqlServerProcessHandle'
2008-11-06 09:23:21 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' to be created
2008-11-06 09:23:26 SQLEngine: --SqlServerServiceSCM: Waiting for nt event 'Global\sqlserverRecComplete' or sql process handle to be signaled
2008-11-06 09:23:26 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-11-06 09:23:26 Slp: Access is denied
2008-11-06 09:23:26 Slp: Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigRC and scenario ConfigRC.
2008-11-06 09:23:26 Slp: System.ComponentModel.Win32Exception: Access is denied
2008-11-06 09:23:26 Slp: at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)
2008-11-06 09:23:26 Slp: at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)
2008-11-06 09:23:26 Slp: at System.Diagnostics.Process.OpenProcessHandle()
2008-11-06 09:23:26 Slp: at System.Diagnostics.Process.get_Handle()
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceBase.WaitSqlServerStart(Process processSql)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerServiceSCM.StartSqlServer(String[] parameters)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlServerStartup.StartSQLServerForInstall(String sqlCollation, String masterFullPath, Boolean isConfiguringTemplateDBs)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.ConfigSQLServerSystemDatabases(EffectiveProperties properties, Boolean isConfiguringTemplateDBs, Boolean useInstallInputs)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.DoCommonDBStartConfig(ConfigActionTiming timing)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineDBStartConfig.Install(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
2008-11-06 09:23:26 Slp: at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
2008-11-06 09:23:26 Slp: Exception: System.ComponentModel.Win32Exception.
2008-11-06 09:23:26 Slp: Source: System.
2008-11-06 09:23:26 Slp: Message: Access is denied.
After spending some time on google, I could not resolve the problem. So, I logged an incident with Microsoft Support but even after spending 3 hours with the support engineer the issue could not be resolved. Next day I tried to install it on my freshly built laptop with Windows Vista and to my surprise it got installed without any problem. I assumed the problem may have something to do with some corporate group security policy on the desktop which might have changed after installing some of the security updates and since this laptop is freshly build so it might not contain those updates and I was able to install SQL Server 2008 successfully. At that point of time I remembered somebody talking about WinHttpAutoProxy Service and its security descriptor. I tried to find the security descriptor for this service on both my laptop as well as the desktop using command:
SC sdshow WinHttpAutoProxySvc
Security Descriptors I got for both these machines were different. So, I went ahead and replaced WinHttpAutoProxy Service’s security descriptor on desktop with the one I got from laptop for the same service. The command for it is:
SC sdset winhttpautoproxysvc D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;LCRP;;;IU)(A;;LCRP;;;SU)
Note: To issue this command you have to run Command Prompt with Administrative Privilege. You can find more information on Security Descriptors here and here.
After that I tried installing SQL Server 2008 again and it installed smoothly. Frankly, I don’t know the reason why setup depends on WinHttpAutoProxy Service or whether it depends on it at all but wouldn’t it better if we get details of the actual error encountered during the setup in more intuitive fashion than simply saying "Access is denied". It would certainly help us solving the problem quickly. I hope Microsoft addresses this pain point in future.
Before we start discussing Microsoft Blueprints technology, let us try to answer this simple question: Do you have structured and systematic reuse practices in place? Please don’t rush to the answer because when one says “reuse”, the first thing that comes to mind is “code” reuse and our answer is mostly based on this perception. To bring objectivity while explaining the concept of reuse we should think in terms of reuse of intangible assets like reuse of knowledge, intelligence, domain/technical expertise etc. You might have gone through the situation when an experienced person quits the team and you find yourself struggling to meet the deadlines. Why? Because, we always tend to reuse the person itself rather than his/her knowledge or intellect. And a time comes when you become heavily dependent on that person to implement defined procedures and processes. So, the question is why do we need to re-invent the wheel when ideally we can embed all of our intellect and expertise inside a workflow based process-oriented tool and reuse that tool itself to implement a particular aspect or process during software development lifecycle or develop a particular feature of a specific type of application for example, implementing MVC pattern for your web application or implementing Single Sign-On or implementing a Data Access Layer using Entity Framework. There are a multitude of scenarios where you can use this kind of a tool tightly integrated with your development environment to provide step by step guidance to build a finished product.
Whenever I come across this term “Blueprint”, I imagine an architect pulling out a big rolled out sheet of paper and spreading it on top of a table with some criss cross lines and curves drawn across it. Essentially, blueprint is a term associated with construction industry which contains a diagram of the architectural design of an entire building or a part of it. But in a broader sense blueprint refers to nothing but a detail plan. If one follows the individual well defined steps listed in a blueprint, you can get to the finished product at the end. Why can't we use a similar kind of approach for software development process? In fact we can. What we need is a support from underlying technology platform in order to build software blueprints which can be accessed from within our development environment itself. A software blueprint should be focused on a particular aspect of a software application. For example you can have blueprints that provide step by step guidance and code generation capability for Data Access, Application Security, and Smart Client etc.
During recently concluded Professional Developer's Conference 2008, Microsoft announced the first CTP release of a new platform for authoring contextual guidance which they call Blueprints. Once you install it, you will get an additional item "Blueprints Manager..." on the Tools Menu within your Visual Studio 2008 IDE.

At the core of the Blueprints platform are Blueprints Manager and Blueprints Runtime. Blueprints Manager is responsible for managing and updating all the blueprints available on the system. It also manages the Blueprints Repository which is a centralized storage for all the versions of every single blueprint installed on the system. Blueprints Runtime provides support for various runtime activities like executing templates, workflow execution, visual studio interfacing etc. Microsoft Blueprints Manager comes with one default blueprint called "Micosoft Blueprint Factory" which you can use to build your own custom blueprints. It provides step-by-step guidance on how to build a custom blueprint.
Versioning has always a problem with the GAT based guidance packages. Whenever there is a new version of a guidance package available you need to uninstall the previous version in order to install the new version. But with the blueprints you have an advantage here. One can update the installed blueprints through RSS Feeds from within Visual Studio IDE itself. Blueprint Manager keeps on checking for the updated versions of a particular blueprint on the Internet and notifies you about the latest updates which it can download and update the underlying blueprint. So, the delivery of blueprints becomes as easy as clicking a button on the screen. Information about all the versions are kept in a repository so that when you start working on an application unfolded by some older version of a given blueprint, you can always get that version from the repository and update your application. It is very important if your current version of the blueprint is incompatible with this old application.

Another big leap is windows workflow based guidance. Till now, if you look at GAT base software factories, you may find guidance is provided in the form of documents. You can see a list of steps that need to be taken in order to build an application using a software factory using guidance explorer. But this sort of guidance does not stop a user from executing a recipe to generate business entities from a database before executing the recipe to create a database connection which ultimately results in error. For an experienced developer or an architect it is I would say “OK” since they know the fact that we need to establish a database connection first before getting any meta data information from the database but for a developer who is new to development process, it becomes really tedious to understand why this particular recipe is not working and guidance packages as the name suggests are all about providing guidance to a mere mortal like me.
With the blueprint technology, you can build your guidance on top of workflow foundation itself so that you can create a workflow for an entire development process!! Individual activities might reflect the actual steps in SDLC. For example if you are following a Waterfall Model you can define a workflow which starts with requirement capturing activity and unless and until you upload the business requirement document in the repository, it won’t allow you to move to the next step. You can go ahead and even build some intelligence so that the workflow can check whether all the important section in the document has been filled or not. Once this is done it will mark the current activity as completed and you can move on to the next activity so on and so forth. You can also mark some of the workflow activities optional. We can display the entire workflow to the user with each activity in a different color based on its current state.

These are some of the advantages of blueprints as I can see today. There are tremendous improvements in terms of software factory authoring experience too. While using GAT/GAX we have to deal with lot of Xml to show wizards, to store data, to do any actions. But now blueprint has really made it simpler introducing the concept of Commands to achieve the same result. We now no more have to worry about writing everything in Xml and following GAT/GAX standards only. So now you have your code generation logic more in C# (or VB) rather than in Xml which has lot of benefits like reducing your development and testing effort drastically.
To summarize the things, Blueprints technology from Microsoft can be used to provide a richer contextual guidance to developers. Blueprints technology is lot simpler and richer than GAT/GAX technologies and overcomes many limitations. Though the Blueprints technology is in betas, we believe this technology holds a lot of promise; software developer community is encouraged to use this technology to reap huge productivity benefits. In future we hope to see blueprints which will be capable of providing guidance on some of the business and architectural challenges.
Keep watching this space as I along with my colleagues will keep updating with the latest happening on Blueprints Technology. To know more about Microsoft Blueprints please visit here.
In the recently held PDC 2008, Microsoft announced Azure, a cloud platform from Microsoft which comprise of the following technologies:
We are working closely with Microsoft on these set of technologies to understand and in turn realize the learning’s into real life solutions that will benefit our customers in their businesses. Through these blogs we shall attempt to share learning’s and developments happening on the Microsoft cloud platform aka Azure.
You can download the Azure developer SDK from here. You can view details on the session we took at PDC 2008 here.
Here's something that I accidently noticed today. Inside of a command prompt, of you type "cmd" (to launch a commonad prompt), it treats this as a new instance, though no new windows is opened. Now if you type "exit", the command window still stays since there were effectively two instances. Only when you type "exit" the second time, will the command window close.
This can go on at any level (I didn't really try too many levels). You can also easily make out the # instances by looking at the title bar. Every time you type "cmd" at a command prompt, you will see "- cmd" get added to the title. With every "exit" one of these goes away till you are back to the default title you had started up with and another "exit" will close the window.
My name is Jitendra and I am a Principal Architect on Cloud Computing work we are doing at Infosys. Microsoft announced their Cloud Computing platform “Azure” last week and with that also made lot of the technologies which we were working with them as public information. This enables me to blog on the work we were doing with Microsoft since last 8 months around their Cloud Computing platform.
I did a session at the Microsoft Professional Developer conference event last week where Microsoft announced the Azure platform. My session was a walkthrough on one of the Partner Integration solutions we developing on this Azure Platform. You may view the recording of the session on the channel 9 http://channel9.msdn.com/pdc2008/BB56/. Infosys Case Study on this can also we found at http://www.microsoft.com/azure/casestudies.mspx.
Enabling partner integration and extending the enterprise boundaries to external partners and customers is one of the core enabling functions of a Cloud computing platform. This gives enterprises an incredible value to expand their boundaries to public facing endpoints and make the overall business process more straight through. For instance, the AReIS solution described above helps dealers to collaborate and share information with other Dealers over cloud based infrastructure. In my next blog I would touch upon the how we used the appliance based architectures patterns to realize the solution and why such patterns would be more relevant in the world of cloud computing for large Enterprises
In a nutshell, WPF designer can use three types of triggers: Event triggers, Property triggers and Data triggers.
Event triggers – Most useful for UX designers, these triggers come into play (invoked is the technical term) when a routed event is raised. We will demonstrate the power of Event triggers that use the ‘Action’s specifications to initiate Animations in WPF in next blog.
Property triggers – Also popular in UX specifications, property triggers come into play when a dependency property is changed. A property trigger (0f Trigger Class)lists all the Setters that need to be executed when a specified property has a specified value. Once the property loses that value, the Setters cannot be in effect.
Suppose, as a designer, you want to demonstrate a button that displays ‘On Hover’ responsiveness. The property you could look for and set trigger against is “IsMouseOver”.
So, here is what you can do.
<Style x:Key=”Hover_Butoon” TargetType={x:Type Button}”>
<Style.Triggers>
<Trigger Property=”IsMouseOver” Value=”True”>
<Setter Property=”BorderBrush” Value=”#FFCE5555”>
</Trigger>
<Style.Triggers>
<Setter Property=”Background” Value=”Gray” />
<Setter Property = “Foreground” Value=”Black />
</Style>
In this case, when the user hovers over the button, the trigger sets in and renders a light orangish border around the button to show that the button is being hovered on.
Data triggers - This type of triggers are actually more generic in nature than event triggers in that they can be triggered by any .NET property. The following TextBox has a Style that triggers the setting of IsEnabled based on the value of its Text property - which is not a dependent property. When Text is the string “Disabled,” IsEnabled is set to false.
<StackPanel Width=”400
<StackPanel. Resources>
<Style TargetType = “{x: Type TextBox}”>
<Style. Triggers >
<DataTrigger
Binding= {Binding RelativeSource={RelativeSource Self }, Path=Text}”
Value=”disabled”>
<Settter Property=”IsEnabled” Value=”False”/>
</DataTrigger>
</Style. Triggers>
<Setter Property=”Background”
Value=”{Binding RelativeSource={RelativeSource Self}, Path=Text}” />
</Style>
</StackPanel.Resources>
<TextBox Margin=”5”/>
</StackPanel>
I am simplifying the logic we have in our application to showcase here and it is pretty much same as what Avi has shown.
public static string commandArgs = string.Empty;
protected override void OnStartup(StartupEventArgs e)
{
if (e.Args!= null && e.Args.Length > 0)
{
commandArgs = e.Args[0];
}
}
We have some custom file extension that we have associated with our application. And on double clicking such a file, our application launches and we still very much get the file name as part of command line arguments, without having to worry about accesssing it from AppDomain.CurrentDomain.SetupInformation.ActivationArguments.ActivationData[0].
And we have been working with .net 3.5 and our code works both without SP1 and with SP1