Monday, February 26, 2007

Windows Workflow Foundation

Workflow at its simplest is the movement of documents and/or tasks through a work process. More specifically, workflow is the operational aspect of a work procedure: how tasks are structured, who performs them, what their relative order is, how they are synchronized, how information flows to support the tasks and how tasks are being tracked. As the dimension of time is considered in Workflow, Workflow considers "throughput" as a distinct measure. Workflow problems can be modeled and analyzed using graph-based formalisms.

Business processes are set up by organizations to define precisely how they are to work.

Workflows are a way of defining business processes. They define the steps followed in a process, who carries out each step, and what are the inputs and outputs of each step.

A workflow is often seen as a precise definition of how business is conducted or how a business process proceeds. It defines the business process using a precise set of system terms - for example, roles, tasks, documents, transitions and so on. Most current workflow definition methods define those business processes that follow a precise set of steps.

WWF or WF is the built-in collaboration and workflow technology included in the .NET Framework of the Windows Vista operating system. WF is part of the Vista programming model formerly called WinFX and now called .NET Framework 3.0. To develop workflow applications, Visual Studio 2005 is required plus the Extensions for Windows Workflow Foundation.

From Wikipedia:

Windows Workflow Foundation (WF) is a Microsoft technology for defining, executing, and managing workflows. This technology is part of .NET Framework 3.0 and will be available natively in the Windows Vista operating system, and has been backported to the Windows XP and Windows 2003 Server operating systems. The .NET Framework 3.0 "workflow runtime" provides common facilities for running and managing the workflows and can be hosted in any CLR app domain.

A new XML-based language XAML is commonly used for declaring the structure of a workflow. However, the workflow may also be expressed in code using any .NET-targeted language (like C#).

Workflows comprise 'activities'. Developers can write their own domain-specific activities and then use them in workflows. The .NET Framework 3.0 Windows Workflow Foundation also provides a set of general-purpose 'activities' that cover several control flow constructs.

Windows Workflow Foundation is supported by a companion set of extensions to Visual Studio 2005. These extensions contain a visual workflow designer which allows users to design workflows, a visual debugger which enables the users to debug the workflow designed, and a project system which enables the user to compile their workflows inside Visual Studio 2005.

Here are some good articles to understand what is Windows Workflow Foundation in .NET 3,0 from a higher lever:
  • What Is Windows Workflow Foundation?
  • Get Ready for Windows Workflow Foundation
  • Windows Workflow Foundation at MSDN

    Some interview questions related to WWF or WF are:
    What is Windows Workflow Foundation?
    What is a Workflow?.
    What are different types of Workflow in Windows Workflow foundation?
    When should we use a sequential workflow and when should we use state machine?
    How do we create workflows using designer?
    How do we specify conditions in Work flow?
    How do you handle exceptions in workflow?
    What is the use of XOML files?
    Twist: - How can we serialize workflows?
    How can we pass parameters to workflow?
  • Tuesday, January 30, 2007

    Top 12 all time technical books for every Software Developer & Engineer

    Top 12 all time technical books for every Software Developer & Engineer

    I found this article on Vishal Sharma's Blog on Startups, Technology, Telecom, Current Affairs very useful. The top 12 books listed here realy very important for every software developer or Engineer. I my self has read most of them but not all :)

    The top 12 books listed here are:

    • Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
    • Code Complete, Second Edition by Steve McConnell
    • The Mythical Man-Month: Essays on Software Engineering,
      20th Anniversary Edition by Frederick P. Brooks
    • The Art of Computer Programming, Volumes 1-3 Boxed Set by Donald E. Knuth
    • The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt, David Thomas
    • Unix Network Programming, Vol. 1 and II: The Sockets Networking API, Third Edition by W. Richard Stevens, Bill Fenner, Andrew M. Rudoff, Richard W. Stevens
    • Advanced Programming in the UNIX(R) Environment (2nd Edition) by W. Richard Stevens, Stephen A. Rago
    • Algorithms in C, Parts 1-5 : Fundamentals, Data Structures, Sorting, Searching, and Graph Algorithms (3rd Edition)
    • Modern Operating Systems (2nd Edition) by Andrew Tanenbaum
    • The Protocols (TCP/IP Illustrated, Volume 1 by W. Richard Stevens
    • Fundamentals of Database Systems (5th Edition)
      by Ramez Elmasri, Shamkant B. Navathe
    • The Guru's Guide to Transact-SQL by Ken Henderson.

    Monday, July 10, 2006

    Null Coalescing Operator in C# 2.0

    Today while going through David Hayden's blog I found this "??" Null Coalescing Operator in C# 2.0.

    This operator (null coalescing operator) is new in C# 2.0. The null coalescing operator provides inherent null-checking capabilities. The result of the expression is based on whether the first operand is null. If the first operand is not null, it is the result of the expression, otherwise, the result falls to the second operand. In other words, return the first value if not null, otherwise the second.

    a ?? b is equivalent to a != null ? a : b.

    To show an example of this operator. I created a new C# windows application wrote below code for Form_Load.

    private void Form1_Load(object sender, EventArgs e)
    int? a = null, b = 1;
    int? x = a ?? b;
    MessageBox.Show(x.ToString()); // x = 1

    A couple of links on this are: Fritz Onion's blog and Oliver Sturm's blog .

    Wednesday, June 28, 2006

    .NET Framework 3.0

    WinFX is Now the .NET Framework 3.0

    S. Somasegar describes the decision to rename WinFX to the .NET Framework 3.0. The comments and questions on this blog are interesting. Why does microsoft always comes up with some name and then changes that and I agree with Wasim Sadiq on Microsoft screwing up cool names.

    Now one more question is .NET 3.0 = 2.0 ? It seems like taking existing .NET Framework 2.0 and adding WPF (Windows Presentation Foundation), WCF ( Windows Communication Foundation), WF (Windows Workflow Foundation) and WCS (Windows CardSpace) and calling it .NET Framework 3.0.

    Monday, June 12, 2006

    Unit Testing with VSTS

    I attended the MS Tech-Ed session on Unit Testing with Visual Studio Team System last friday. Unit testing .NET code is not something new. Developers have been doing unit testing of .NET code since .NET is out. To name a few .NET unit testing tools are :

    With VSTS microsoft has integrated not only unit testing framework with .NET IDE but has added supports to other testing, such as functional and load testing. Code coverage and Static Code analysis tool (FxCop) are other tools which are available with VSTS.

    There has been already a lot of talk about the pricing for VSTS and different flavours of Visual studio 2005. Professional version doesnot have any of the above mentioned tools, while VSTS for developers (VSTD) has unit testing, FxCop and Code Coverage but functional (web testing) and load testing tools are not available with this. To get functional (web) testing tool and load testing tool you will have to buy Visual Studio team suite or VSTS for testers.

    Unit testing tool available with VSTS is very similar to NUnit with added features like you can right click on your method/class and create unit test. It will create a unit test and test project for you. You can go ahead and modify the unit test by setting proper values etc. Other features of this unit testing framework are that you can make your test data driven and can see the coverage of your tests using code coverage.

    The thing I like about this unit testing framework integrated with .NET IDE is that I can use my unit tests for load testing and as well as for my subsiquent build verification tests. Since this unit tests are nothing but similar .NET projects I can store them in source safe and can have different versions of my unit tests.

    Here is a good article on MSDN on unit testing walkthrough with visual studio team test .