Windows Workflow Foundation for John – from novice to expert
Windows Workflow Foundation ~ what is it? why so much hype about it and how to “do” it? This series of posts will not only answer each of this questions, it will also act as smart practical guide for developers to excel WWF.
I am a typical programmer and therefore hate reading long theoretical tutorials and discussion about things in air, so my focus will be more on practical examples and giving you ideas that would pump up your passion and fuel your excitement for this wonderful new “thing” in programming world. First of all, let us decide who is the target audience of this series of tutorials on Windows Workflow Foundation.
Who is John?
No! no one is asking you famous question from Ayn Rand’s magnum opus Atlas Shrugged, ‘Who is John Galt?’. Our John is a programmer, fresh grad or with years of experience, who knows about .NET and has some experience programming in C# / VB.NET [by the way, these tutorial posts will have examples in C# but VB.NET lovers shouldn't get mad at me since as is said 'this is all about framework' and if they can just understand code in C#, they can easily write it in VB.NET] and who is curious about this new buzzword “WWF” in industry.
What is objective of this tutorial posts series?
To make John, a programmer who knows nothing about WWF now; an expert in WWF (provided he read all these posts ofcourse).
Okay, we have set target audience and explained objective of tutorial posts, so what are we waiting for! Hop in and lets start our cruise to this new world of ‘workflow-based’ programming.
So what exactly “Windows Workflow Foundation” is?
1. WWF is not some new bleeding edge technology that MS has invented.
2. Neither its some sleekiest product MS is shipping with Vista.
3. Its not targeted for business analysts (though some business analysts are using it!) and IT professionals. This is for Developers-only.
4. WWF is actually a programming model, engine and tools for building “better” workflow-enabled software easily, quickly and smartly.
Now, this point 4 needs lots of elaboration. Like what are workflow-enabled softwares, how I can claim ‘better’ software can be built using this, whats criteria of calling software creation process ‘quick’ and ’smart’. Well I will answer some of questions now and other will themselves get elaborated as we progress further on this tutorial. So starting with prized question;
What are workflow-enables softwares and why a new framework for it?
Well buddies, let me tell you few interesting facts.
1. You have already worked on various workflow-enabled software. Yes! trust me I know this about you!
2. If I ask you how important and vital COM + & DTC is for our programming world, I know I am gonna hear this long speech from you on how much you love it and can’t live a second without it! To tell you truth buddies, WWF is something really BIGGER than COM+/DTC. There are many applications that don’t have COM+/DTC but almost every application have a workflow embedded in it.
And that is the simple reason, WWF is here. Since workflow enabled software is ubiquitous, Microsoft presented this new programming model to ease job of developers and to separate business rules implementation with workflow activities. Now enough usage of this “workflow” buzzword. Let me now explain what it means in this context.
What is Workflow?
Workflow (noun): Series of steps, decisions, and rules needed to complete a specific task.
Example: Consider this control flow of this simple payroll application that calculates daily wages on the basis of number of working hours.
This is workflow of payroll application! In each step, certain rules are evaluated and some conditions are verified. Now consider of woes of programmer while coding this application, not only she has to write code for implementing business rules, she also has to write supporting code to call each step after another, maintain status / result of each step and provide necessary input to every next step. This particular issue is addressed by WWF. Basic Idea of WWF is to separate software workflow supporting code from its actual business implementation, and that is the reason it gave its separate engine, model and tools for running workflows.
And by the way, since nearly every application, from GNU C compiler to most state of art fighter plane software, have some tasks to execute in some sequential fashion or on the basis of some condition / status. Thus, we can say almost every software has some workflow built-in it, as that’s the reason I claim you have already worked on workflow-enabled software!!
Enough of intro and theory, I promise subsequent tutorial posts will be less and less theoretical and more and more practical, but perhaps this was needed today to lay down proper foundation.
Take care buddies…. Next time we will be looking at how to prepare our computer for WWF and start looking at ‘activity’.
This is quite a up-to-date info. I think I’ll share it on Twitter.