News

VSLive!: Expert Describes Windows Workflow 4.0 as a Vast Improvement Over Prior Versions

SAN FRANCISCO -- When Microsoft releases the 4.0 version of Windows Workflow Foundation (WF), it will be providing the first truly usable version of the technology since it debuted more than two years ago, according to Aaron Skonnard, a co-founder with Pluralsight, which provides training to developers on the .NET Framework.

Skonnard gave his assessment during a session at this week's VSLive! conference. WF 4.0 will be part of the .NET Framework 4.0 that will be supported in Visual Studio 2010. Unlike the Windows Communication Foundation (WCF), which he characterizes as "well-baked," Skonnard described the existing versions of WF as a bit underdone.

"It was technology with a lot of promise," he said. "You'd kind of look at and say, hmm, that looks interesting, but I'm not sure I should move there yet. There are a lot of companies getting a lot of benefit from WF today, but they're doing a lot of work to get it. With the changes Microsoft has planned for WF, you'll be able to get those benefits without having to do so much work."

Skonnard, a long-time teacher who wrote Pluralsight's REST, WCF and BizTalk courses, outlined some of the changes expected in WCF and WF 4.0, with an emphasis on the latter. WF 4.0 as nearly a complete re-write, he said. The basic WF concepts will remain the same, he said, but the way you go about writing activities and the APIs used to host the workflows have changed. One of the fundamental improvements in WF 4.0, he said, is its support for the authoring of completely declarative, XAML-based workflow services that can be more easily deployed, hosted and managed.

"It's very challenging to write purely declarative workflows," Skonnard said, "but that's always been the vision for workflow, that the workflows themselves would just be data, just an XML file. And the things in that XML file would map to activities that will go and execute some code. But the program itself is just data. If you deploy a .NET workflow service in Windows Azure, you're basically just going to take an XML file that describes that workflow and stick it up there."

"That's a huge shift," he added. "And a good one, because it forces developers that are going to use this technology to focus on the activities and design them right." Versioning, which was problematic in WF 3.0, is also improved dramatically by this change, he said. "XAML-only is a great solution for dealing with the versioning problems people had in 3.0, because there's less code to deal with."

WF 3.0 also lacked a base activity library -- no activity for getting data from a database, for example, or executing a powershell script. That omission has been "beefed up" in WF 4.0, Skonnard said. Microsoft is currently building WF into many of its key products today, Skonnard observed, including SharePoint, BizTalk and even SpeachServer. And most of the emphasis in the 4.0 release is on bringing WCF and WF together and providing a "unified story" across the two. That's because when the two technologies shipped in .NET 3.0, there was no integration between them at all, Skonnard said.

But there's a strong synergy between the two technologies that begs for integration. "When you're building workflows, you typically think about creating a business process type thing, where you're modeling message exchanges, or a human workflow type of interaction, and that requires communication," he said.

Together, WCF and WF 4.0 will support the development of declarative workflow services that can be hosted on a desktop, a server farm or in the cloud, connected with standard WCF communication techniques.

The new WCF features Skonnard highlighted including a new REST starter kit and overall improved REST capabilities, built-in support for WS-Discovery, a simplified configuration model, new messaging features, and a new "receive context" for transactional reads off the channel stack, among others

"One of the most common requests for WCF today is for a more efficient in-memory channel for intra-process communications," he said. "They're working on what they're calling the ‘local channel,' which we hope is going to be in WCF 4.0."

Skonnard warned that none of these changes are set in stone. "I think most of these things will make the cut, but Microsoft is right now deciding what stays and what doesn't as they go into the final crunch phase," he said.

About the Author

John K. Waters is a freelance writer based in Silicon Valley. He can be reached at [email protected].