Monday, April 30, 2007

.NET Framework 3.5 Beta1 is Live on the Web

Last week we posted beta1 of Visual Studio "Orcas", which turns out to be a big release for the Connected Framework team.  A few days ago we also posted a "standalone" version of the corresponding beta1 release of the .NET Framework 3.5, which is the framework that ships with Orcas.

While the .NET Framework has a bunch of new interesting features, like LINQ support and integration of ASP.NET AJAX into the framework, we feel especially proud of the work we've done in our areas of responsibility - WCF and WF.

Tools
VS Orcas now has a decent Add Service Reference dialog, there are a few new project and item templates that get you started, and there's an "Auto-Host" for self-hosted WCF services (kind of like Cassini is for Websites - you can create a service using a template, hit F5, and the service just runs - without having to write a host for it).  In beta2 we are also going to deliver a "Test Form" - which launches when you hit F5 on a service, so that you can interrogate it for its contract and endpoints, and invoke operations on those endpoints, without having to write a custom client.

WCF/WF Integration
Lots of our customers tell us they use these two technologies together, and they have to write a bunch of glue code to do that.  It turns out that we purposefully avoided having either technology take a dependency on the other back in the .NET FX 3.0 days, to reduce risk to either project.  But for 3.5, we've done some really nice things..

  • Durable Services: we greatly enhanced our duplex / async messaging story by offering the ability to create long-running "durable" services - i.e. services where you have some long-running process and you want to have a programming model where you can rely on your previous state getting reconstituted when processing messages.  The canonical example is a shopping cart - each user represents a "conversation" and each of the interactions with the shopping cart service is routed to the proper service instance.  And given that we already had a continuation runtime with WF, where program state can be durably "freeze-dried" between interactions and then "thawed out" when the next operation is invoked, we have a nice framework for reliably and efficiently implementing long-running processes.  And the coolest thing is that we were able to implement all this by using "standard" extensibility points in WCF - a set of behaviors to allow dispatching into an active workflow, and a "context channel" that can carry a cookie that helps the dispatcher route to the correct instance.
  • Services as Workflows: an obvious integration point is to offer the ability to author services (either each operation, or the flow across operations) as a workflow.  This is just cleanly layered on top of the durable services runtime - including a WorkflowServiceHost that wires all the right behaviors and channel attributes for you, and a set of activities to send/receive messages.
  • Sending messages out of a Workflow: You don't have to write a service in order to enjoy the benefits of the integration - the WCF send/receive activities give you the ability to talk HTTP, SOAP, or WS-* from your workflows.

Deeper Support for the Web
A big focus area has been to support more web protocols and formats out of the box.  In .NET FX 3.0, we focused on nailing some key enterprise scenarios, like reliable exchange, transaction flow, end-to-end security, and queuing transports, to name a few.  For .NET FX 3.5, we offer some nice features for public web services as well:

  • Syndication: we have some classes for publishing and consuming RSS and Atom feeds.  These formats (Atom especially) are quickly emerging as payload formats for all kinds of schematized data, not just blog entries or newsfeeds.  You can use our classes independently from WCF for a simple OM on top of either format, and we integrate into WCF by implementing the obvious serialization interfaces, so that you can pass SyndicationFeeds into and out of service operations.  I used an early version of this feature to create WCF-based RSS/Atom endpoints for my dasBlog instance.
  • webHttpBinding: a new standard binding that has all the right defaults for "web" services - including support for GET as a verb, and a "bare" encoding (losing the SOAP envelope so that you have a POX message).  Stay tuned, beta2 has MUCH more in store for the Web programmer... including deeper support for URL-based dispatch, more declarative support for GET and other verbs, and support for content-types beyond text/xml :-)
  • ASP.NET AJAX Integration: we created a new JSON encoder which makes it trivial to use WCF to create the web services that "back" an AJAX page.  In fact the primary services story for AJAX pages in Orcas is WCF.
  • Partial Trust: we added support for running WCF services that use basicHttpBinding in medium trust hosts - this helps online hosters allow running WCF services in shared-hosting environments.  We also took the opportunity to allow WCF partial trust clients (e.g. when you're trying to call services from WPF XBAP's).

Finally, we added support for all the new WS-* protocols that are coming out of OASIS - WS-ReliableMessaging, WS-AtomicTransaction, and WS-Trust/WS-SecurityPolicy, to make sure WCF continues to be a good WS-* citizen.

Enjoy! 



 |  | 
Monday, April 30, 2007 3:30:06 AM (GMT Standard Time, UTC+00:00)  #  Comments [0] Tracked by:
".Net 3.5, Silverlight, Internet Service Bus & WS-Federation" (Hugo Batista) [Trackback]
"Community Convergence XXVI" (Charlie Calvert's Community Blog) [Trackback]
"WCF, SOAP, REST, and the rest" (WCF Team Bloggers) [Trackback]
"Visual Studio 2005 or 2008? What's more risk?" ( [Trackback]
"New and Notable 166" (Sam Gentile's Blog) [Trackback]