Jon Flanders' Blog

SharePoint 2010 – access data through ADO.NET Data Services (Astoria)

Sunday, October 25, 2009 4:33:16 PM (GMT Standard Time, UTC+00:00)

Last week - I had the privilege of speaking at Microsoft's SharePoint conference in Las Vegas.  I had a talk about Workflows in SharePoint 2010 - and had a blast at the conference.  Honestly probably the best technical conference I've ever spoke at, certainly the best I've been to in at least 10 years.

I'm super excited about SharePoint 2010, expect more blog posts and other information flowing from this blog RSN.

One thing I am really really excited about it is all the emphasis on REST in SharePoint 2010.  Case in point - as you can read over at the ADO.NET Data Services team blog =  http://blogs.msdn.com/astoriateam/ - SharePoint list data is going to be exposed via ADO.NET Data Services!

Just go to /_vti_bin/ListData.svc/   (note that you may have to install ADO.NET Data Services 1.5 CTP2 if you haven't already  as you'll get 404 - page not found errors if you try to hit the ListData.svc URI without it installed).

Another really cool part of this integration between ADO.NET Data Services and SharePoint 2010 is that document libraries are exposed as well -and documents are exposed as Atom pub media links (a standard way to expose binary data as part of an atom feed).

I was playing around with this today - and wanted to blog about how to use it through the ADO.NET generated client.  The DataServiceContext object you use to connect to your list data has two methods :  GetReadStream, and SetSaveStream.

When you want to retrieve the document from the document library associated with a list item, you pass the list item to GetReadStream:

   1: var uri = new Uri("http://flash/spc/_vti_bin/ListData.svc");
   2: var ctx = new TwiddlerDataContext(uri);            
   3: ctx.Credentials = System.Net.CredentialCache.DefaultCredentials;
   4: var extf = ctx.FlowTest.FirstOrDefault();
   5: var stream = ctx.GetReadStream(extf); 

You use SetSaveStream to associate a list item with a stream that will be save as the document.

  #    Comments [0]   

Update to BizTalk Patterns Wizard for BizTalk 2009

Friday, September 04, 2009 3:45:42 AM (GMT Daylight Time, UTC+01:00)

It's been along time since I posted anything about BizTalk  :)  It really wasn't accidental, honestly it appeared for quite a while that the product known as BizTalk was probably not going to survive at Microsoft.   Turns out that rumors of BizTalk's demise where premature.

 

It appears that Microsoft is stewarding BizTalk quite nicely and I expect to see many good things come down the pike.

One of my favorite  (but not my most popular) tools for BizTalk was the Patter Wizard (see my first post about it here).

I've just now updated it for BizTalk 2009 (which means Visual Studio 2008) - hopefully people will continue to find it useful.  If anyone has feedback on it I'd love to hear it.

Download the new bits here:

http://patternwizard.codeplex.com/

BizTalk | BizTalk 2009   #    Comments [0]   

Code from TechEd US 2009

Sunday, May 17, 2009 5:11:55 PM (GMT Daylight Time, UTC+01:00)

Had a blast last week at TechEd – if you came to one of my sessions – here is the code as promised:

REST - SOA302_Demos.zip (342.61 KB)
Busy Developers Guide to WCF - SOA303_Demos.zip (424.64 KB)

Feel free to contact me through my blog if you have questions – or email me – jon.flanders – at the evil gmail.com ;-)

REST | WCF   #    Comments [0]   

If you are in LA for TechEd - also a Star Trek movie review

Monday, May 11, 2009 6:48:45 PM (GMT Daylight Time, UTC+01:00)

Movie was just awesome.  Maybe one of the best movies of all time.  Really ever.

If you are in LA for TechEd you have a moral obligation to go see Star Trek - at the Arclight Cinerama Dome Hollywood -http://tinyurl.com/ca3b3o.  The Arclight is really the best theater I've ever been too.  Leather *assigned* seats, no talkers (well almost never any talkers)  great projection and sound in every theater. 

If you are into music - go next door to Ameoba - its an old school record store (and there aren't many of those left).

  #    Comments [0]   

VSLive - Las Vegas!

Wednesday, April 08, 2009 11:43:53 PM (GMT Daylight Time, UTC+01:00)

I'm super excited to be doing two talks at VSLive Vegas on Oslo.  If you register with code  S9V10  you can get and all-access Passport Package for just $1,295, a savings of $400.00 off the standard price of $1,695.

Register now and I'll see you in Vegas!

  #    Comments [0]   

WCF "Champ"

Thursday, April 02, 2009 11:21:04 PM (GMT Daylight Time, UTC+01:00)

Funny video - http://www.microsoft.com/net/wcf/champ.  I wonder if they will have a WCF REST vs SOAP version (you know who I'd be betting on :))

REST | WCF   #    Comments [0]   

Got a very nice book review

Thursday, April 02, 2009 11:19:27 PM (GMT Daylight Time, UTC+01:00)

Thanks Nick - http://techfortesco.blogspot.com/2009/04/tescocom-api-to-become-more-restful.html

  #    Comments [0]   

MUrl – a DSL and runtime for exercising HTTP

Friday, March 20, 2009 5:39:34 PM (GMT Standard Time, UTC+00:00)

Get it at the Oslo Dev center http://msdn.microsoft.com/en-us/oslo/default.aspx  (link in the middle box).  I just saw Chris and Doug do a talk using this at Mix09.  I think its a very interesting example of how using a DSL can simplify developer tasks.

M | MGrammar | Oslo   #    Comments [0]   

Problem with the ETag code in my book

Wednesday, March 18, 2009 3:53:38 PM (GMT Standard Time, UTC+00:00)

I just discovered that in Chapter 11 - my code for generating ETags has a bug.  The code needs to wrap the ETag in a set of quotes:

string GenerateETag(User u)
{
    byte[] bytes = Encoding.UTF8.GetBytes(u.UserId + u.LastModified.ToString());
    byte[] hash = MD5.Create().ComputeHash(bytes);
    string etag = Convert.ToBase64String(hash);
    return string.Format("\"{0}\"", etag);
}
Sorry - as I always say "Hi - I'm Jon, I'm a developer, and I write code with bugs" ;)

  #    Comments [0]