08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

230<br />

CHAPTER 9 ■ .<strong>NET</strong> 3.0: WINDOWS WORKFLOW FOUNDATION<br />

Notice that the exposed web method is called doCToF, as this is what you defined on<br />

the interface. Also, when you select doCToF to call up its test page, you’ll see that you can<br />

enter the value for nC (see Figure 9-20).<br />

Figure 9-20. Entering the nC value<br />

Clicking Invoke will now call the workflow <strong>and</strong> convert the input value from centigrade<br />

to Fahrenheit, returning the answer in an XML-encoded double.<br />

This example shows how straightforward it is to use WF to create a workflow <strong>and</strong><br />

expose it as a web service. It’s worth playing <strong>and</strong> experimenting with, as, particularly for<br />

large complex transactions, you can drastically reduce the amount of code that you have<br />

to write <strong>and</strong> encapsulate business processes in easy-to-manage redistributable libraries<br />

that can be published as web services or hosted within web applications.<br />

Summary<br />

WF is a powerful <strong>and</strong> flexible design <strong>and</strong> runtime environment that allows you to encapsulate<br />

your business processes into a visual design <strong>and</strong> then compile <strong>and</strong> implement that<br />

design into a working program. This can come in particularly h<strong>and</strong>y for web development,<br />

where you can neatly bundle up some very sophisticated functionality behind<br />

redistributable libraries or hosted, sharable web services. As you design your web appli-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!