Last week i got my first hands on experience of working on an exciting new technology called Windows Workflow Foundation which ships with the WinFX package. The best part is you have WWF add-ins for VS2005 for designing your workflow. For someone who has no prior experience of using Biztalk, the concept of visually designed workflows is hard to sink in. But when you start of on a new technology you are bound to face some initial hurdles. I would like to highlight one of the major ones here.
I created a workflow runtime object using the new operator and the WorkflowRuntime class constructor, like so:
WorkflowRuntime wr = new WorkflowRuntime();
Using this code in ASP.NET is fine as long as you place it in Application_Start and then find a way to make the object that is created reachable from within your page code. Instantiating the workflow runtime for each request results in an exception because the workflow runtime cannot be loaded more than once in the same AppDomain. Two ASP.NET requests have distinct state and context, but run in the same AppDomain. As a result, the first request works while the second throws an exception.
Windows Workflow Foundation provides a built-in infrastructure to guarantee that there's exactly one workflow runtime object per AppDomain and that you don't have to worry about its creation and instantiation. In ASP.NET, in fact, you can use the WorkflowWebRequestContext class to access the current and correct instance of the workflow runtime. This code shows how to get a reference to the workflow runtime:
WorkflowRuntime wr =
Internally, the get accessor of the Current property calls into a public member of a static class that caches the workflow runtime instance, creating a new instance if one cannot be found. Once you've got a reference to the runtime object, you can register the handler for the WorkflowCompleted event and start the actual workflow. This code shows how:
Type t = typeof(Samples.LoginWorkflow);
WorkflowInstance instance = wr.CreateWorkflow(t, parameters);
To comply with an ever-increasing number of regulations governing electronic data, the life sciences industry must maintain strict controls over the way this data is managed and tracked. But these same controls can also impede workflow speed and efficiency. The Microsoft Office System provides the tools and flexibility needed for efficient document management without compromising the security needed for compliance. More…
Microsoft Windows SharePoint Services 2.0 provides document library events that enable developers to build upon the SharePoint platform. Developers can create managed code assemblies that define handlers for these events and then bind the handlers to document libraries. The event handlers can call into the SharePoint object model to access the configuration and content databases directly, or they can invoke external services, using Windows SharePoint Services as a user interface for other systems. More…
The Native Image Generator creates a native image from a managed assembly and installs it into the native image cache on the local computer. The native image cache is a reserved area of the global assembly cache. Once you create a native image for an assembly, the runtime automatically uses that native image each time it runs the assembly. You do not have to perform any additional procedures to cause the runtime to use a native image. Running Ngen.exe on an assembly allows the assembly to load and execute faster, because it restores code and data structures from the native image cache rather than generating them dynamically. More…
The twelve performance tips given below provides you with a grab bag of ways to optimize application performance. All of them provide you with definite performance advantages, used both individually or together. Now you should be well-equipped with skills that will allow you to write fast and efficient Windows Forms applications that will impress your users and keep them happy while using your applications.
* Load fewer modules at startup
* Precompile assemblies using NGen
* Place strong-named assemblies in the GAC
* Avoid base address collisions
* Avoid blocking on the UI thread
* Perform lazy processing
* Populate controls more quickly
* Exercise more control over data binding
* Reduce repainting
* Use double buffering
* Manage memory usage
* Use reflection wisely
Read the Article: Click Here
I dont know whether you have read this article before, but if you have not, let me just tell you that you are going to miss some important information if you are not going to read this article.
IntelliSense Code Snippets are reusable, task-oriented blocks of code. Visual Studio 2005 includes code snippets covering tasks ranging from creating a custom exception, to sending an e-mail message, to drawing a circle. A set of Visual Basic and Visual C# Code Snippets are included in the Visual Studio 2005 box – additional Code Snippets can be found at: http://msdn.microsoft.com/vstudio/downloads/codesnippets/default.aspx