O'Reilly logo

RESTful .NET by Jon Flanders

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Using Workflow to Deliver REST Services

WCF in .NET 3.0 provided a way for you to use and expose services using your favorite .NET language. Also part of .NET 3.0, Windows Workflow Foundation (WF) provided a way to use a declarative language to create model-driven, reactive programs. Both frameworks shipped in the same vehicle (.NET 3.0), but neither had any OOTB integration with the other. Using them together in .NET 3.0 applications required a fair amount of repetitive manual coding.

Along with the Web Programming Model, .NET 3.5 brings a layer of integration between WCF and WF in the form of a pair of WF activities to model the processes of sending and receiving messages into workflows using WCF. .NET 3.5 also provides a hosting environment that allows you to stand up a service endpoint using a workflow in a way that is similar to how you can stand up a service endpoint using code. No explicit integration between the Web Programming Model and WF was included in this release, but it is still possible to use these two new frameworks together.

In this chapter, we’ll look at how to consume REST endpoints using WF. We’ll also examine how to create stateless and long-running stateful workflows to expose REST endpoints. As I discuss these options, I will raise the issue of whether melding the well-understood advantages of statelessness on the server in a REST service with the potential long-running nature of WF is a good idea. For the purposes of this chapter, I will assume ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required