• Feeds

    Subscribe in a reader

  • Ads

Mix is done (and our new bits are live)

Phew, Mix is over. The conference technically ended yesterday but we had a follow-on event with a few customers to dive deeper into Web Programming Model stuff that Don and I covered in our Navigating the Programmable Web talk (the recording of which is now live on http://sessions.mix.com). Bottom line is that I'm just now getting some time to blog...

I'm really stoked to announce that all the bits that Don and I used in our demo are now available to the public as part of the newly refreshed BizTalk Services SDK, which can be found at http://labs.biztalk.net (webby folks, don't let the BizTalk name scare you -- remember, URI's are opaque ;) )

The feature set in this SDK is really quite amazing. Using these bits, you can do simple HTTP GET's on URI's. You can syndicate data using Atom + RSS. You can build RESTful services that use PUT, DELETE, and other features of HTTP. You can use the Relay service as a broker for doing NAT traversal securely. You can use the new Direct Connect feature of the RelayBinding to get better performance by establishing direct TCP connections with the remote host, even when both sides are sitting behind NAT's and firewalls. You can use the Identity service to establish trust between those two parties, so the whole thing is done securely. And finally (the killer in my book) is you can use the Service Bus capability to do simple pub/sub and eventing. Whew! We've always said that WCF is a big tent -- nothing proves that story more in my mind than the bits in this SDK.

There are a bunch of samples included in the SDK that give you the full tour of the features. I'll be blogging about the web programming model features here over the next several days. One bit of housekeeping about the samples, though -- if you're running the Web samples on vanilla 3.0 (no Orcas beta), than you'll need to slightly modify the samples in order to get them to work. It's pretty straightforward, though -- just replace this stuff:

Update 5/11/2007: We just refreshed the bits on http://labs.biztalk.net. The samples have been updated to work correctly on both .Net 3.0 and .Net 3.5 Beta 1.

using(ChannelFactory<IService> cf = new ChannelFactory<IService>() )
{

    cf.Endpoint.Behaviors.Add( new WebHttpBehavior() );

    //YOUR CODE HERE
}

with this stuff:

using( WebChannelFactory<IService> cf = new WebChannelFactory<IService>() )

{

       cf.Endpoint.Address = new EndpointAddress("http://localhost:8000");

       cf.Endpoint.Binding = new WebHttpBinding();

 

       cf.Endpoint.Behaviors.Add(new WebHttpBehavior());

       //YOUR CODE HERE
}

Sorry about that -- we'll get it fixed in the download ASAP.

In the mean time, have fun playing with the bits! The best way to get started is by looking at the samples:

Technology Samples

  • Basic Web Programming – this sample demonstrates how to build a simple WCF service that responds to HTTP GET and POST without requiring clients to use the SOAP protocol.
  • Advanced Web Programming – this sample demonstrates more advanced capabilities of the Web Programming model, including Uri Templates and support for additional HTTP methods such as PUT and DELETE.
  • Basic Syndication – this sample demonstrates how to use the Syndication API to produce and consume data exposed as RSS and Atom feeds.
  • Web Activities – this sample demonstrates how to interact with Web resources using Windows Workflow Foundation
  • Paste as Serializable Type – this sample demonstrates how to use the Paste-As-Serializable-Type Visual Studio add-in to easily create CLR types from XML instance documents.

Extensibility Samples

· Push-Style Streaming – this sample explores various approaches to streaming API’s in relation to the Web Programming Model.

· Streaming Feeds – this sample explores how the Syndication API can be used to efficiently work with feeds containing large numbers of items, both on the client and the server.

Scenario Samples

· PhotoFeeds – this end-to-end scenario sample demonstrates many aspects of the Web Programming Model in the context of a simple web-enabled photo sharing system.

There are lots of samples for the connectivity and identity stuff too -- keep an eye on Dennis' blog for information on that stuff.

I'm really looking forward to community feedback on this stuff, so if you have comments feel free to post them on your blog (I'll be keeping an eye on the 'WCF Web Programming' technorati tag, so feel free to use that), or just leave a comment here.

Happy hacking!

Technorati Tags: ,
#1 Dave Bettin on 5.03.2007 at 6:31 PM

Are these the same bits that were released with Project Astoria on Monday?BTW, I do like the nominal change from "HttpTransfer" to "Web" in the programming model. However, why introduce the nasty RPC invokesemantic (WebInvoke)on the user instead of providing attributes that map the entire spectrum of http verbs we all know and love?

#2 Mike Vire on 5.03.2007 at 8:56 PM

Hey Steve, I can't get to your PhotoFeeds pdf. Am i crazy?

#3 Christian Weyer on 5.03.2007 at 11:49 PM

When you think things are not possible: WCF duplex callbacks through NATs and firewalls - safe and secure:http://blogs.thinktecture.com/cweyer/archive/2007/04/27/414819.aspx

#4 Steve Maine on 5.04.2007 at 2:53 AM

Christian -- isn't it great? I love that. Nice writeup, BTW.Mike -- no, you're not nuts. The link to PhotoFeeds.pdf is 404. I should never have included it.Dave -- the Astoria build was snapped just a bit earlier than the actual CTP build. We added a couple of late-breaking bug fixes after we did the Astoria work. The API's are identical, but given the choice between the two I'd use the build in the BizTalk Services SDK unless I'm doing Astoria work.Glad you like the new programming model.WRT [WebInvoke] vs something like [WebPut] -- to be clear, we didn't inflict the RPC "invoke" semantic on the web. It's already there. Lots of folks take advantage of the unbounded semantics of POST to do all sorts of things other than just adding stuff to collections. SOAP is definitely in this camp, but is by no means the only member. As we were looking at this space, we noted that once you down the road of refining the "do it" semantic (which is all [WebInvoke] means), you run into problems pretty quickly. For example, where do you stop? Do you include just the 2616 verbs -- what about WebDav, or the verbs that Henrik came up with for DSSP? The HTTP verb set is extensible...we landed on "view it" and "do it", and are pretty sure that's all you need. Of course, [WebInvoke] is parameterized so you can use it for PUT/POST/DELETE/MKCOL or whatever else you want.

#5 Steve Maine on 5.08.2007 at 8:38 PM

Josh -- it installs to c:\program files\BizTalk Services SDK

#6 Morten on 5.11.2007 at 4:39 PM

I was trying to put the REST-like service you made into a webbased SVC service, but I couldn't figure out how to call my methods based on a URI template. The sample works great as a console host, but how would I call a service with the following UriTemplate:[WebGet(UriTemplate="rest/{service}"]http://localhost/myapp/myservice.svc works fine and gives me the service interface, buthttp://localhost/myapp/myservice.svc/rest/someValue gives me an "DestinationUnreachable"Furthermore I would like to just say something like:http://localhost/myapp/rest/someValue(hide the .svc in the url)Do I need to configure something special to have it run on IIS?

#7 Steve Maine on 5.16.2007 at 1:33 AM

You can use configure an endpoint with the WebHttpBinding + the WebHttpBehavior, or you can use the WebServiceHostFactory from within an .svc (which takes care of all that for you). I blogged about that here: hyperthink.net/.../A+Brief+Aside+W that helps-steve