learnWorkflow: about the 3.5 book




about the book: Pro WF Windows Workflow in .NET 3.5

I started working with the new Microsoft WinFX technology stack early in the beta and Community Technology Preview (CTP) stages. The foundations that began their life as WinFX (Windows Presentation, Windows Communication, and Windows Workflow) became a shipping Microsoft product named .NET Framework 3.0 in November 2006. I actually started to learn and use all three of these foundations at the same time in my day job. Talk about a massive learning curve.

While I was impressed with the flexibility and capabilities of Windows Presentation Foundation (WPF) and Windows Communication Foundation (WCF), I was somehow inexplicably drawn to Windows Workflow Foundation (WF). WF isn’t just a new way to implement a user interface or a new way to communicate between applications and services. WF represents a completely new way to develop applications. It is declarative, visual, and infinitely flexible. It promotes a model that cleanly separates what to do from when to do it. This separation allows you to change the workflow model (the when) without affecting the what. Business logic is implemented as a set of discrete, testable components that are assembled into workflows like building blocks.

Workflow isn’t a new concept. But when Microsoft spends years developing a workflow foundation and provides it to us without cost, it is an event worth noting. Other workflow frameworks exist, but WF is the de facto standard workflow framework for Windows applications.

I originally wrote the first edition of this book because I was excited about workflow, and about WF in particular. I was excited about the opportunities that it held for application developers like us. And that excitement continues today, especially with the release of .NET Framework 3.5. With this release, Microsoft has continued to provide additional enhancements to WF. In particular, .NET 3.5 includes support for workflow services. These are Windows Communication Foundation services that are implemented as workflows.

My hope is that this book will help you to use WF to build an exciting new generation of workflow-enabled applications.

who should read this book

This book is for all .NET developers who want to learn how to use Windows Workflow Foundation in their own applications. This book is not a primer on .NET or the C# language. To get the most out of the examples that I present in this book, you need a good working knowledge of .NET 1.1 and preferably .NET 2.0. All of the examples are presented in C#, so you should be proficient with C#.

Since Visual Studio 2008 has built-in support for Windows Workflow Foundation, it is the recommended development platform and the one that I used to produce the examples and figures in this book. In my example code, I make use of some timesaving C# 2008 features such as autoimplemented properties. So, it is helpful if you are familiar with the new features in C# 2008.

what you need to use this book

Windows Workflow Foundation was originally made available as part of .NET 3.0. The development environment was supplied as an add-in to Visual Studio 2005. Visual Studio 2008 now includes builtin support for WF, and .NET 3.5 includes several new WF features such as support for workflow services.

In order to execute the examples presented in this book, you’ll need to install a minimum set of software components on a supported OS. The minimum requirements are the following:

Check with Microsoft for a current list of supported operating systems. Generally, you can use Windows XP Service Pack 2 and beyond.

The combination of Visual Studio 2008 and .NET 3.5 will allow you to use all of the latest WF features and use all of the examples in this book. And it has the advantage of one simple installation.

Alternatively, you can still use Visual Studio 2005 and .NET 3.0 for WF development. However, if you do so, you will be limited to only those features that shipped with the original version of WF. Please refer to Chapter 1 for more details on the software stack that is required if you are using Visual Studio 2005.

The Microsoft .NET Framework Development Center is a good starting point to locate any files that you need.

obtaining this book’s source code

I have found that the best way to learn and retain a new skill is through hands-on examples. For this reason, this book contains a lot of example source code. I’ve been frustrated on more than one occasion with technical books that don’t print all of the source code in the book. The code may be available for download, but then you need to have a computer handy while you are reading the book. That doesn’t work well on the beach. So I’ve made it a point to present all of the code that is necessary to actually build and execute the examples.

When you are ready to execute the example code, you don’t have to enter it yourself. You can download all of the code presented in this book from the Apress site and go to the Source Code/Download section. I’ve organized all of the downloadable code into separate folders for each chapter with a separate Visual Studio solution for each chapter. The only exception is one shared project that is referenced by projects in most of the chapters of this book. I’d suggest that you also keep your code separate by chapter as you work through the examples in this book.

chapter overview

A brief overview of each chapter is presented here.

sample chapter

Apress has made a sample chapter of this book available for download in PDF format. You can obtain this sample chapter from the Apress page for this book.

errata

Changes that were discovered since the initial publication can be found at the Apress site.