RESTful.NET Fundamentals

RESTful.NET Fundamentals

Besides working on my RESTful.NET book, I’m also working with Aaron to
build a course on REST and WCF for Pluralsight.

We’re excited that the course is
now up and will have its first run in November (the 19th-21st to be exact) at the
Microsoft MTC in Boston – so sign
up today!

Everyone who attends will get a copy of my new book as well, so come and learn about
REST!



Check out my new book on REST.

WF and WCF resources

WF and WCF resources

I just found out about a few new resources that Microsoft has put together to help developers locate relevant information for developing applications using WF and WCF. This includes some of the screencasts that Aaron and I have been doing on those technologies.  It is nice to have this information in one place and provides a great jumping off point for people wanting to learn about these great technologies. 

 

Endpoint.tv (the home of our screencasts and other podcasts) –  http://channel9.msdn.com/shows/Endpoint/

 

WF on the MSDN Social Server

  • Screencasts – http://social.msdn.microsoft.com/content/en-us/msft/netframework/wf/screencasts 
  • Webcasts – http://social.msdn.microsoft.com/content/en-us/msft/netframework/wf/webcasts
  • Code samples (labs, applications) – http://social.msdn.microsoft.com/content/en-us/msft/netframework/wf/Codesamples

 

WCF on the MSDN Social Server –

  • Screencasts – http://social.msdn.microsoft.com/content/en-us/msft/netframework/wcf/screencasts 
  • Code samples (labs, applications) – http://social.msdn.microsoft.com/content/en-us/msft/netframework/wcf/Codesamples

 

In addition, we are Pluralsight attempt to keep our resource pages for this stuff up to date with articles books etc. on our Wiki.  The links to those

Pluralsight's WCF wiki – http://pluralsight.com/wiki/default.aspx/Aaron/WindowsCommunicationFoundationWiki.html

Pluralsight's WF wiki – http://www.pluralsight.com/wiki/default.aspx/Workflow/HomePage.html

Next UK SOA/BPM User Group Meeting – 14th October 2008 London

The next UK SOA/BPM User Group Meeting has been announced which will be taking place on Tuesday, 14th October 2008 at Microsoft’s London office.
The meeting will include an introduction to BizTalk 2006 R3 2009, a presentation by ISV Frends Technology on integration solutions, plus developer and architecture sessions; there will also be beer and pizza. […]

This Week on MSDN – New Dev Center Pages

There has indeed been a lot going on over the last month, and I apologize for the silence over the past couple weeks…but I believe the fruits of the work is now starting to bloom. This is the first in a series of three blog posts that I will be getting out this week; this one lays the foundation for the other two, explaining the new platform that we launched to host leaf-node developer-oriented content around Windows Workflow Foundation (WF) and Windows Communication Foundation (WCF).

On Wednesday of last week, the talented folks over at MSDN launched the latest release of the MSDN Social platform. I’m pleased to say that the WF/WCF technologies were one of three groups to help beta-test the authoring environment, and go live on the new platform this month. Last week, we had a total of nine pages go live on the new server, and we’ll be adding additional content over the next few weeks.

Changes to the MSDN Dev Center Main Pages

On the main pages for the WF Dev Center and the WCF Dev Center (as an example, I’ve placed a screen capture of the WF Dev Center on the left), the change is pretty minimal right now…an updated version of this page will go live next week to try and better rationalize the platforms together and try to help the seams become less obvious. But last week’s update really sees two changes: changes in the Getting Started box, and a change to the Videos section.

Getting Started with WF Links

On the WF Dev Center, the first thing you may notice is that the ‘Learn WF’ text on the upper-left box is now a hyper link. This will now take you to the new ‘Getting Started’ pages for WF. Also, the links below it now point to sub-pages of the new ‘Getting Started’ page, instead of the MSDN Online Library documentation (I’ll come back to this in a couple paragraphs).

More than More…

The second thing that the reader may notice is that the ‘More…’ link is now gone from the ‘WF Videos’ section; replaced with links to the ‘WF Screencasts’ and ‘WF Webcasts’ pages on the new MSDN Social platform. Previously, the ‘More…’ link would take the reader to the same WF Videos RSS feed that the RSS graphic; while this made sense, it seemed a bit redundant and not too terribly useful for folks new to the technology.

Pulling the New Pages Together

In the next update to this page, we’ll be trying to pull content from the various MSDN services (Dev Centers, Online Library, Blogs, Social Bookmarking, Code Gallery, and Channel9), and trying to get it to flow better together. The goal is to have the WF and WCF Dev Centers function as a portal or hub for the developer community – helping to rationalize the content into something more cohesive and approachable.

At the moment, this means using a ‘Getting Started with…’ collection of links, which is done to keep the site in-line with the other MSDN Developer Center layouts. We are considering breaking this one box into a couple boxes, to better help users explore the material out there, both content and documentation. But we’ll come back to this over the coming weeks and months, if there is interest in having this discussion publicly.

But that brings us to the next step – what exactly the Dev Center becomes the hub for…

The New WF and WCF Pages on MSDN Social

Visually, the site that the new pages are hosted on retains much of the same look and feel as the MSDN Dev Centers you’re familiar with. But the new server uses the same social platform as the new MSDN Forums and MSDN Social Bookmarking site. As opposed to providing a deep dive of the new platform, I hope to provide a quick, 5-minute overview of what we’ve done, and offer the opportunity for feedback – both publicly and privately (amusing note – I’ve gotten more private feedback than public…side note that it’s okay for folks to comment here ^_^).

To the right is the ‘Getting Started with Windows Workflow Foundation’ page on the new MSDN Social server. I’m hoping that the page is pretty self-explanatory, over all, but I would like to call your attention to five points about the page layout.

  1. WF Context Header
    This is different from the MSDN Dev Center. As the user transitions from the Dev Center to the new MSDN Social content pages, the user loses the breadcrumb trail (which was, unfortunately, unavoidable). It is hoped that this helps to orient the user to where they are (using .NET Framework, and the associated links seemed a bit big/grand…and the links pointing to non-WF/WCF pages when the user is among a collection of 10 pages on that topic seemed to confuse folks, rather than provide consistency). The links within the technology’s context header take users to pages that are related to the technology (‘Home’ takes the reader to the Dev Center; ‘Community’ to the proper Forum, etc)
  2. MSDN Login
    This login is the same as the new MSDN Forums and Social Bookmarking site. Once logged in, this allows you to bookmark these MSDN pages, just as you bookmark forum posts. The largest advantage here is to provide an easy way to track the pages that you find the most useful (much like tracking forum posts). In an upcoming release of the MSDN Social platform, this will provide some great auto-generated portal options, but that’s for another post (and another blog ^_^ ).
  3. MSDN Social Bookmarking
    These pages are integrated into the Social Bookmarking system, allowing you to easily tag the pages as you find appropriate.
  4. Right Column – Section Pages
    The layout of the new MSDN pages is a two-column structure, with the main content web parts being laid out in the body of the page, and a much more narrow column present underneath the sign-in and bookmark web parts. In the layout of the WF and WCF pages, we’ve chosen to add an HTML web part that lays out the pages within the section the reader is on, along with graphics.
    You’ll notice, for now, that we also have additional links that have descriptive text along with them. We will be going on way or the other within the upcoming week, and thoughts are welcome on which is preferred.
  5. Right Column – Related Links/Downloads
    In addition to the links within the section, we also place web parts in this column to link to related downloads or pages. As an example of non-download related links, we link to the Channel9 webcasts/screencasts in the WF/WCF webcasts/screencasts pages.

The Dev Center Ahead

The first release of the MSDN Social content pages only supports the above layout in this release. We’re working with them to help get additional layout capabilities added, and hope to have more options when in their next release. But this offers an excellent and exciting opportunity.

With the new platform, we have the ability to publish content in a faster fashion, with greater control over what the look and feel is in the end. The current MSDN and TechNet Publishing System has been well documented, both in terms of its capabilities and its limitations, but the greatest limitation of the system has been the time it takes to publish, which has forced many groups to turn to using blogs or third-party sites as a mechanism for added user documentation and community engagement. For us, this offers an exciting opportunity to iterate more quickly, and with greater fidelity, documentation and link collections for you and with you – to hopefully make information on WF and WCF easier to find and easier to develop with.

First BizTalk Double Feature

First BizTalk Double Feature

I'm excited to be teaching the first BizTalk double feature class coming up October in Irvine.  Now I know what you are thinking: "of course you are happy to get out of Minnesota and go to sunny California", but I actually like fall in MN. No , this class is going to be cool because it allows me to cover all of BizTalk Server 2006 R2.  A normal class just doesn't give me the time to cover the core BizTalk messaging engine, orchestration, rules, etc. AND RFID, EDI, and WCF adapters.  So having the double feature is great because students new to BizTalk development will get the whole package in one week.  So if you want to learn BizTalk, come join me in CA for a very full week of BizTalk content.

Extracting data from a sub loop – two ways to accomplish the task

I have come across this issue eleventeen million times, so I figure I would write about it (finally).

The issue: I want to extract data from a repeating record, but I need the output records based on something that is higher up the food chain. If I simply use the logical equals and value mapping or value mapping (flattening) funtiods, if the qualifier is the first occurrence it will successfully extract the data, otherwise it will not pull the data out.

Here is a screen shot of an 837 map that shows the issue in the 2000 REF segment:

For simplicity’s sake, I have created a smaller map:

Here is the input:

<ns0:Root xmlns:ns0="http://Schemas.Input"> <Record> <SubRecord Qualifier="AA"> <Data>Here is AA Data</Data> </SubRecord> <SubRecord Qualifier="ZZ"> <Data>Here is ZZ Data</Data> </SubRecord> </Record> </ns0:Root>

I want to extract the /Root/Record/SubRecord/Data where the Qualifier is ZZ, but I want to create it driven on the /Root/Record

By using the out of the box functiods, I get the following output:

<ns0:Root xmlns:ns0="http://Schemas.Output"> <Record> </Record> </ns0:Root>

Which is not what I wanted.

There are two ways to extract the data. The first is to use three functiods, a string concatenate functiod to a cumulative concatenate functiod, to a script functiod like this:

The string concatenate functiod’s arguments are the following:

The cumulative concatenate functiod:

And the arguments to the script functiod:

And the C# script inside the script functiod:

public static string extractFromInnerLoop(string qualifier, string segmentTerminator, string data) { string actualdata=""; int posOfDelimiter = qualifier.Length; if(posOfDelimiter>data.Length) goto end; string delimiterValue = data.Substring(posOfDelimiter, 1); string fullQualifier = qualifier + delimiterValue; int locOfFullQualifier = data.IndexOf(fullQualifier); if (locOfFullQualifier < 0) { actualdata = ""; goto end; } int posOfSegment = data.IndexOf(fullQualifier); int segmentEnd = data.IndexOf(segmentTerminator, posOfSegment); int elementLength = segmentEnd-posOfSegment-fullQualifier.Length; actualdata = data.Substring(posOfSegment+fullQualifier.Length,elementLength); end: return actualdata; }

It works, but I thought that there must be a better approach. A second approach is to use Inline XSLT Call Template:

The arguments to the script:

and the Inline XSLT Call Template script:

<xsl:template name="SubLoopExtract"> <xsl:param name="qual" /> <xsl:element name="Data"> <xsl:value-of select="SubRecord[@Qualifier = $qual]/Data/text()" /> </xsl:element> </xsl:template>

Both of them create the following output:

<ns0:Root xmlns:ns0="http://Schemas.Output"> <Record> <Data>Here is ZZ Data</Data> </Record> </ns0:Root>