<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Brain.Save()</title>
  <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/" />
  <link rel="self" href="http://hyperthink.net/blog/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2008-05-12T12:43:56.8973268-06:00</updated>
  <author>
    <name>Steve Maine</name>
  </author>
  <subtitle>steve maine's blog</subtitle>
  <id>http://hyperthink.net/blog/</id>
  <generator uri="http://www.dasblog.net" version="1.9.7174.0">DasBlog</generator>
  <entry>
    <title>We are pleased to bring you new features in .NET 3.5 SP1</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/05/12/We+Are+Pleased+To+Bring+You+New+Features+In+NET+35+SP1.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,d29b94b7-7cbe-4ac6-82fc-ca1654255603.aspx</id>
    <published>2008-05-12T12:43:56.8973268-06:00</published>
    <updated>2008-05-12T12:43:56.8973268-06:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
In case you haven't noticed yet, the bits for <a href="http://go.microsoft.com/fwlink/?LinkId=115068">.NET
3.5 SP1 Beta 1</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=117351">Visual
Studio 2008  SP1 Beta 1</a> are now available...take a minute and go grab them,
and then you can finish reading this post while they install :) 
</p>
        <p>
          <strong>What's new?<br /></strong>Looking at the platform holistically, the big-ticket features in SP1 are
the ADO.NET Entity Framework (finally ;) ) and the <a href="http://blogs.msdn.com/astoriateam/archive/2008/05/12/ado-net-data-services-framework-beta-1-is-live.aspx">ADO.NET
Data Services (Astoria)</a>. I'm sure lots of folks will be talking in-depth about
those things, so I'll focus on some of the smaller (but no less interesting!) features
that my team is delivering as part of this release.
</p>
        <p>
From the WCF/WF perspective, here's what you can look for in SP1. There's a lot here
and each one of these probably merits an individual post but here are the bullet points:
</p>
        <p>
          <em>Core Framework</em>
        </p>
        <ul>
          <li>
            <strong>Expanded UriTemplate syntax </strong>including support for compound template
segments (like <em>/{filename}.{ext}</em> and <em>/customers({id})</em>), default
values (like <em>/customers/{id=0}</em>), and optional trailing slashes.</li>
          <li>
            <strong>Syndication OM for the Atom Publishing Protocol. </strong>We added strongly-typed
OM for all of the constructs defined in the Atom Publishing Protocol specification
(like ServiceDocument and Workspaces) and put them in the <strong>System.ServiceModel.Syndication</strong> namespace. 
</li>
          <li>
            <strong>Attribute-free Data Contract serialization.</strong> The DataContract serializer
now supports a model that <em>doesn't</em> require you to put [DataContract]/[DataMember]
on every serializable member. 
</li>
          <li>
            <strong>Interoperable Object References. </strong>The DataContract Serializer now
supports an interoperable object reference scheme that allows it to serialize object
graphs (not just trees). Thanks to this, Entity Framework types are also serializable
via the DataContract serializer.</li>
          <li>
            <strong>Improved logging/tracing in Partial Trust. </strong>We added more of our diagnostic/tracing
path to the partial trust sandbox to improve the debuggability of hosted applications
running in partial trust.</li>
          <li>
            <strong>Scalability Improvements on IIS7: </strong>It's now possible to plug WCF into
IIS7 asynchronously instead of synchronously, which can improve overall throughput
and thread utilization on IIS7 for a class of high-latency scenarios.</li>
        </ul>
        <p>
          <em>Tools</em>
        </p>
        <ul>
          <li>
            <strong>Enhanced Service Test Client: </strong>The Test Client can now test services
that use MessageContract/XmlSerializer types as well as Nullable&lt;T&gt;. 
</li>
          <li>
            <strong>Hosting Wizard: </strong>There's now some tooling support for deploying Service
Library projects to a host environment</li>
          <li>
            <strong>Workflow Designer Performance Improvements: </strong>Auto-Save is faster now.
A LOT faster.</li>
          <li>
            <strong>Silverlight Templates: </strong>Visual Studio templates for WCF services in
Silverlight, nuff said.</li>
        </ul>
        <p>
We've managed to put a lot into this little release...take a look at the new bits
and tell us what you think.
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=d29b94b7-7cbe-4ac6-82fc-ca1654255603" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Read Brian's blog on F#</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/05/10/Read+Brians+Blog+On+F.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,889a1f49-baf6-4205-9f02-609d0de26f99.aspx</id>
    <published>2008-05-09T22:30:07.3749495-06:00</published>
    <updated>2008-05-09T22:30:07.3749495-06:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
You should seriously check out <a href="http://lorgonblog.spaces.live.com/blog">Brian's
F# blog</a>. It's way good.
</p>
        <p>
Brian is a WCF alum; he owned a hefty chunk of the code in System.ServiceModel.Dispatcher
and the 3.5 Web Programming Model work.
</p>
        <p>
It's funny...I used to mistype his name in emails a "Brain McNamara" at least once
a week, which actually was a pretty accurate statement.
</p>
        <p>
Anyway, he's over in 41 working on the F# compiler now and blogging up a storm. I'm
spending more time getting to know the F# language, and I'm liking what I'm seeing.
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=889a1f49-baf6-4205-9f02-609d0de26f99" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Partial trust binding validation is a usability feature</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/03/18/Partial+Trust+Binding+Validation+Is+A+Usability+Feature.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,10cfce28-8e91-4bf7-91c7-1e92e6a3d031.aspx</id>
    <published>2008-03-18T01:39:52.1102087-06:00</published>
    <updated>2008-03-18T01:39:52.1102087-06:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Nicholas has a good post on the <a href="http://blogs.msdn.com/drnick/archive/2008/03/13/partial-trust-binding-black-list.aspx">binding
validation WCF does in partial trust</a>.
</p>
        <p>
As he points out, a ServiceHost running in anything less than a fully trusted AppDomin
will so some baked-in validation on the bindings being used. Specifically, we have
a list of binding elements that are explicitly prohibited in partial trust, and if
we catch you trying to use one of these binding elements we'll prevent your service
from activating.
</p>
        <p>
This behavior has absolutely nothing (zip, zero, nada) to do with security. For that,
we rely on the Code Access Security features implemented by the CLR, like any other
framework component.
</p>
        <p>
So why do we do this validation? One reason -- usability. Exceptions at deterministic
times (say, Open()) are vastly better than exceptions at random times (say, when you
receive a message that triggers a code path that does a demand for a permission you
don't have). Having binding validation in place doesn't make the system more secure,
but does avoid exposure to a large class of issues that can be pretty hard to reproduce
and diagnose.
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=10cfce28-8e91-4bf7-91c7-1e92e6a3d031" />
      </div>
    </content>
  </entry>
  <entry>
    <title>RestChess: MySpace + WCF @ Mix</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/03/11/RestChess+MySpace+WCF+Mix.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,183a6682-3653-4a6e-a67f-5dd2a0341935.aspx</id>
    <published>2008-03-10T23:51:47.4889489-06:00</published>
    <updated>2008-03-11T14:26:40.8632112-06:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Sadly, duty called and I didn't get to make it to Mix '08 this year. To make up for
it, I think I'll take a couple days this week to watch <a href="http://sessions.visitmix.com/">some
recorded sessions</a> via teh intarweb and then drive to the Indian casino in Everett.
</p>
        <p>
Here's what's in my queue:
</p>
        <p>
          <a title="http://sessions.visitmix.com/?selectedSearch=T26" href="http://sessions.visitmix.com/?selectedSearch=T26">http://sessions.visitmix.com/?selectedSearch=T26</a> --
Justin Smith on the NetFx 3.5 WCF Web Programming Model<br /><a href="http://sessions.visitmix.com/?selectedSearch=T19">http://sessions.visitmix.com/?selectedSearch=T19</a> –
Pablo on talking to Windows Live Services via AtomPub<br /><a href="http://sessions.visitmix.com/?selectedSearch=BT02">http://sessions.visitmix.com/?selectedSearch=BT02</a> –
Mike Flasko’s Astoria overview<br /><a href="http://sessions.visitmix.com/?selectedSearch=T22">http://sessions.visitmix.com/?selectedSearch=T22</a> –
Scott Hanselman’s MVC overview<br /><a href="http://sessions.visitmix.com/?selectedSearch=T28">http://sessions.visitmix.com/?selectedSearch=T28</a> –
John Lam on the DLR<br /><a href="http://sessions.visitmix.com/?selectedSearch=T07">http://sessions.visitmix.com/?selectedSearch=T07</a> –
another Astoria talk, this one from Pablo<br /><a href="http://sessions.visitmix.com/?selectedSearch=T13">http://sessions.visitmix.com/?selectedSearch=T13</a> –
our very own EugeneOs on web services and Silverlight
</p>
        <p>
But of course the big one for me is <a href="http://sessions.visitmix.com/?selectedSearch=T01">Creating
a RESTful API with Windows Communication Foundation</a>, presented by Haider Sabri
and some friends from the MySpace developer API team. These guys have been building
the public-facing MySpace REST API as a set of WCF services and were kind enough to
do a talk at Mix about their experience. They even built a cool demo app -- <a href="http://www.restchess.com">http://www.restchess.com</a> using
WCF and shared the source for everyone to play with. There's a sweet (and highly reusable)
OAuth channel in there along with lots of other goodies...thanks guys!
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=183a6682-3653-4a6e-a67f-5dd2a0341935" />
      </div>
    </content>
  </entry>
  <entry>
    <title>WCF Web Programming Model Documentation</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/01/18/WCF+Web+Programming+Model+Documentation.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,f366e9bf-b498-43c9-a00e-76c360630534.aspx</id>
    <published>2008-01-18T16:49:45.0949894-07:00</published>
    <updated>2008-01-18T20:05:10.0988942-07:00</updated>
    <category term="indigo" label="indigo" scheme="http://hyperthink.net/blog/CategoryView,category,indigo.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've gotten a lot of requests (internally and externally) for requests for resources
on how to use the new WCF Web Programming Model features in .NET 3.5.
</p>
        <p>
MSDN has a lot of great content on this stuff, but it's kind of sprinkled around in
various places due to the way the MSDN table of contents is laid out. I figured it
would be nice to have links to all of the important topics in one place, so here's
the "mini-TOC" for the Web Programming Model content:
</p>
        <p>
          <strong>Conceptual Overviews:</strong>
        </p>
        <ul>
          <li>
            <a href="http://msdn2.microsoft.com/en-us/library/bb412169.aspx">Web Programming Model</a>
          </li>
          <li>
            <a href="http://msdn2.microsoft.com/en-us/library/bb412202.aspx">AJAX and JSON</a>
          </li>
          <li>
            <a title="WCF Syndication" href="http://msdn2.microsoft.com/en-us/library/bb412202.aspx">WCF
Syndication</a> (Atom and RSS) 
</li>
          <li>
            <a title="Partial Trust" href="http://msdn2.microsoft.com/en-us/library/bb412175.aspx">Partial
Trust</a>
          </li>
        </ul>
        <p>
          <strong>Class Library Reference (not exhaustive):</strong>
        </p>
        <ul>
          <li>
            <a title="System.ServiceModel.Web Namespace" href="http://msdn2.microsoft.com/en-us/library/bb514905.aspx">System.ServiceModel.Web
Namespace</a>
          </li>
          <li>
            <a title="System.ServiceModel.Syndication Namespace" href="http://msdn2.microsoft.com/en-us/library/bb357210.aspx">System.ServiceModel.Syndication
Namespace</a>
          </li>
          <li>
            <a title="System.Runtime.Serialization.Json Namespace" href="http://msdn2.microsoft.com/en-us/library/bb907644.aspx">System.Runtime.Serialization.Json
Namespace</a>
          </li>
          <li>
            <a title="SyndicationFeed Class" href="http://msdn2.microsoft.com/en-us/library/bb348994.aspx">SyndicationFeed
Class</a>
          </li>
          <li>
            <a title="SyndicationItem Class" href="http://msdn2.microsoft.com/en-us/library/bb357133.aspx">SyndicationItem
Class</a>
          </li>
          <li>
            <a title="WebOperationContext Class" href="http://msdn2.microsoft.com/en-us/library/bb515847.aspx">WebOperationContext
Class</a>
          </li>
          <li>
            <a title="WebServiceHost Class" href="http://msdn2.microsoft.com/en-us/library/bb515827.aspx">WebServiceHost
Class</a>
          </li>
          <li>
            <a title="WebGetAttribute Class" href="http://msdn2.microsoft.com/en-us/library/bb536021.aspx">WebGetAttribute
Class</a>
          </li>
          <li>
            <a title="WebInvokeAttribute Class" href="http://msdn2.microsoft.com/en-us/library/bb515593.aspx">WebInvokeAttribute
Class</a>
          </li>
          <li>
            <a title="WebHttpBehavior Class" href="http://msdn2.microsoft.com/en-us/library/bb536047.aspx">WebHttpBehavior
Class</a>
          </li>
          <li>
            <a title="WebScriptEnablingBehavior Class" href="http://msdn2.microsoft.com/en-us/library/bb348930.aspx">WebScriptEnablingBehavior
Class</a>
          </li>
          <li>
            <a title="DataContractJsonSerializer Class" href="http://msdn2.microsoft.com/en-us/library/bb908432.aspx">DataContractJsonSerializer
Class</a>
          </li>
        </ul>
        <p>
          <strong>Configuration Schema:</strong>
        </p>
        <ul>
          <li>
            <a title="enableWebScript" href="http://msdn2.microsoft.com/en-us/library/bb675191.aspx">enableWebScript</a>
          </li>
          <li>
            <a title="webHttp" href="http://msdn2.microsoft.com/en-us/library/bb924425.aspx">webHttp</a>  
</li>
          <li>
            <a title="webHttpBinding" href="http://msdn2.microsoft.com/en-us/library/bb412176.aspx">webHttpBinding</a> </li>
        </ul>
        <p>
          <strong>Samples:</strong>
        </p>
        <ul>
          <li>
Web Programming Model 
<ul><li><a title="Basic Web Programming Model" href="http://msdn2.microsoft.com/en-us/library/bb472530.aspx">Basic
Web Programming Model</a></li><li><a title="Advanced Web Programming" href="http://msdn2.microsoft.com/en-us/library/bb472541.aspx">Advanced
Web Programming</a></li><li><a title="UriTemplate" href="http://msdn2.microsoft.com/en-us/library/bb943469.aspx">UriTemplate</a></li><li><a title="UriTemplate Table" href="http://msdn2.microsoft.com/en-us/library/bb943476.aspx">UriTemplate
Table</a></li><li><a title="UriTemplate Table Dispatcher" href="http://msdn2.microsoft.com/en-us/library/bb943472.aspx">UriTemplate
Table Dispatcher</a></li><li><a title="WebContentTypeMapper" href="http://msdn2.microsoft.com/en-us/library/bb943479.aspx">WebContentTypeMapper</a></li><li><a title="HTML Form Handler" href="http://msdn2.microsoft.com/en-us/library/bb943485.aspx">HTML
Form Handler</a></li><li><a title="Push-Style Streaming" href="http://msdn2.microsoft.com/en-us/library/bb472551.aspx">Push-Style
Streaming</a></li></ul></li>
          <li>
AJAX and JSON 
<ul><li><a title="Basic AJAX Service" href="http://msdn2.microsoft.com/en-us/library/bb410778.aspx">Basic
AJAX Service</a></li><li><a title="AJAX Service Without Configuration" href="http://msdn2.microsoft.com/en-us/library/bb472534.aspx">AJAX
Service Without Configuration</a></li><li><a title="AJAX Service Using Complex Types" href="http://msdn2.microsoft.com/en-us/library/bb472484.aspx">AJAX
Service Using Complex Types</a></li><li><a title="AJAX Service with JSON and XML" href="http://msdn2.microsoft.com/en-us/library/bb472488.aspx">AJAX
Service with JSON and XML</a></li><li><a title="JSON Serialization" href="http://msdn2.microsoft.com/en-us/library/bb410770.aspx">JSON
Serialization</a></li><li><a title="Weakly-typed JSON Serialization (AJAX)" href="http://msdn2.microsoft.com/en-us/library/bb943471.aspx">Weakly-typed
JSON Serialization (AJAX)</a></li></ul></li>
          <li>
Syndication 
<ul><li><a href="http://msdn2.microsoft.com/en-us/library/bb410776.aspx">Intro to Syndication</a></li><li><a title="Loosely-Typed Extensions" href="http://msdn2.microsoft.com/en-us/library/bb943475.aspx">Loosely-Typed
Extensions</a></li><li><a title="Strongly Typed Extensions" href="http://msdn2.microsoft.com/en-us/library/bb943468.aspx">Strongly
Typed Extensions</a></li><li><a title="Streaming Feeds" href="http://msdn2.microsoft.com/en-us/library/bb472423.aspx">Streaming
Feeds</a></li><li><a title="Feed Formatter (JSON)" href="http://msdn2.microsoft.com/en-us/library/bb943484.aspx">Feed
Formatter (JSON)</a></li></ul></li>
          <li>
Partial Trust 
</li>
          <ul>
            <li>
              <a href="http://msdn2.microsoft.com/en-us/library/bb943481.aspx">Partial Trust client
and server</a>
            </li>
          </ul>
          <li>
Everything and (a picture of) the Kitchen Sink (Thanks, <a href="http://blogs.msdn.com/justinjsmith/">Justin</a>!)</li>
          <ul>
            <li>
              <a title="http://samples.netfx3.com/PictureServices/" href="http://samples.netfx3.com/PictureServices/">http://samples.netfx3.com/PictureServices/</a>
            </li>
          </ul>
        </ul>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=f366e9bf-b498-43c9-a00e-76c360630534" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Declaring XML Namespaces on a SyndicationFeed</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/01/15/Declaring+XML+Namespaces+On+A+SyndicationFeed.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,375db710-4ff1-4170-b643-f214572e1465.aspx</id>
    <published>2008-01-15T01:07:00.0489476-07:00</published>
    <updated>2008-01-15T01:07:00.0489476-07:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Lots of folks have asked me how to add various XMLism like XML Namespace prefixes
to the serialized output of a <strong>SyndicationFeed</strong>. This is actually easy
to do once you know the trick but it's admittedly not the most obvious thing in the
world.
</p>
        <p>
The thing to remember is that the System.Xml stack treats prefix declarations as special
kinds of attributes. If you want to emit an XML namespace declaration of <em>xmlns:contoso=<a href="http://schemas.contoso.com">http://schemas.contoso.com</a></em>you
need to emit attribute whose name is the prefix you're declaring (e.g. "contoso"),
whose value is the namespace URI that corresponds to the prefix (e.g. 'http://schemas.contoso.com').
This attribute needs to be in the special XML namespace declaration namespace (!)
of <a title="http://www.w3.org/2000/xmlns/" href="http://www.w3.org/2000/xmlns/">http://www.w3.org/2000/xmlns/</a></p>
        <p>
Since SyndicationFeed supports additional XML attributes through the AttributeExtensions
property, you can do this on SyndicationFeed as follows (using the C# 3.0 collection
initializer syntax, natch):
</p>
        <p>
          <font face="Courier New">SyndicationFeed feed = new SyndicationFeed()<br />
{</font>
        </p>
        <p>
          <font face="Courier New">   AttributeExtensions = </font>
        </p>
        <p>
          <font face="Courier New">  {<br />
     { new XmlQualifiedName("contoso", "</font>
          <a href="http://www.w3.org/2000/xmlns/&quot;)">
            <font face="Courier New">http://www.w3.org/2000/xmlns/")</font>
          </a>
          <font face="Courier New">,
"http://schemas.constoso.com</font>
          <a href="http://AstoriaNamespaceUri&quot;">
            <font face="Courier New">"</font>
          </a>
          <font face="Courier New"> }<br />
  }<br />
};</font>
        </p>
        <p>
If you like syntactic sugar, here are a few extension methods that add a helper function
to all of the OM constructs that support attribute extensibility: 
</p>
        <p>
          <font face="Courier ">using System;<br />
using System.Xml;<br />
using System.ServiceModel.Syndication; </font>
        </p>
        <p>
          <font face="Courier ">namespace Samples<br />
{<br />
    public static class SyndicationExtensions<br />
    {<br />
        public static void DeclareNamespace(this
SyndicationFeed feed, string prefix, string nsUri)<br />
        {<br />
            feed.AttributeExtensions.Add(new
XmlQualifiedName( prefix, "</font>
          <a href="http://www.w3.org/2000/xmlns/&quot;">
            <font face="Courier ">http://www.w3.org/2000/xmlns/"</font>
          </a>
          <font face="Courier "> ),
nsUri);<br />
        } </font>
        </p>
        <p>
          <font face="Courier ">        public static void
DeclareNamespace(this SyndicationItem item, string prefix, string nsUri)<br />
        {<br />
            item.AttributeExtensions.Add(new
XmlQualifiedName(prefix, "</font>
          <a href="http://www.w3.org/2000/xmlns/&quot;)">
            <font face="Courier ">http://www.w3.org/2000/xmlns/")</font>
          </a>
          <font face="Courier ">,
nsUri);<br />
        } </font>
        </p>
        <p>
          <font face="Courier ">        public static void
DeclareNamespace(this SyndicationCategory category, string prefix, string nsUri)<br />
        {<br />
            category.AttributeExtensions.Add(new
XmlQualifiedName(prefix, "</font>
          <a href="http://www.w3.org/2000/xmlns/&quot;)">
            <font face="Courier ">http://www.w3.org/2000/xmlns/")</font>
          </a>
          <font face="Courier ">,
nsUri);<br />
        } </font>
        </p>
        <p>
          <font face="Courier ">        public static void
DeclareNamespace(this SyndicationLink link, string prefix, string nsUri)<br />
        {<br />
            link.AttributeExtensions.Add(new
XmlQualifiedName(prefix, "</font>
          <a href="http://www.w3.org/2000/xmlns/&quot;)">
            <font face="Courier ">http://www.w3.org/2000/xmlns/")</font>
          </a>
          <font face="Courier ">,
nsUri);<br />
        } </font>
        </p>
        <p>
          <font face="Courier ">        public static void
DeclareNamespace(this SyndicationPerson person, string prefix, string nsUri)<br />
        {<br />
            person.AttributeExtensions.Add(new
XmlQualifiedName(prefix, "</font>
          <a href="http://www.w3.org/2000/xmlns/&quot;)">
            <font face="Courier ">http://www.w3.org/2000/xmlns/")</font>
          </a>
          <font face="Courier ">,
nsUri);<br />
        }<br />
    }<br />
}</font>
        </p>
        <p>
On a side note, I'm becoming a huge fan of extension methods. They are not perfect,
but I expect that their existence will have a pretty substantial impact on the way
the internals of the framework get factored in future versions...
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=375db710-4ff1-4170-b643-f214572e1465" />
      </div>
    </content>
  </entry>
  <entry>
    <title>ContractNamespaceAttribute and Serialization</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/01/12/ContractNamespaceAttribute+And+Serialization.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,82e65262-d02c-4e9e-9e1b-c0d70170d65e.aspx</id>
    <published>2008-01-11T20:43:03.7685876-07:00</published>
    <updated>2008-01-11T20:43:03.7685876-07:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the things that the DataContractSerializer does is create a mapping between
CLR type names and XML qnames.
</p>
        <p>
Lots of people know that you can control this mapping on a per-type basis via the
[DataContract] attribute, e.g.
</p>
        <p>
          <font face="Lucida Console">namespace Contoso.Serialization<br />
{<br />
  [DataContract( Namespace="http://schemas.contoso.com/2008" )]<br />
  public class Person<br />
  {</font>
        </p>
        <p>
          <font face="Lucida Console">     [DataMember]<br />
     public string Name { get; set; }<br />
  }<br />
}</font>
        </p>
        <p>
Having to explicitly specify this on every type gets a little laborious, especially
if you just want to say "put all types in this CLR namespace into this XML namespace".
</p>
        <p>
Few people know that there's a simple way to do this via the assembly-level <a href="http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.contractnamespaceattribute.aspx">ContractNamespaceAttribute</a>:
</p>
        <p>
[assembly: ContractNamespace( "http://schemas.contoso.com/2008", ClrNamespace="Contoso.Serialization"
)]
</p>
        <p>
If you have that, then you can just say [DataContract] (sans Namespace="...") and
it's just as if you had said [DataContract( Namespace="http://schemas.contoso.com/2008"
)] for all [DataContract] types in the Contoso.Serialization namespace.
</p>
        <p>
That comes in handy from time to time and can save some keystrokes.
</p>
        <p>
This has been around since .NET 3.0, but I didn't know about it until recently. Figured
not many other people did either :)
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=82e65262-d02c-4e9e-9e1b-c0d70170d65e" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Wisdom from Ganesh</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2008/01/05/Wisdom+From+Ganesh.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,ea9266f0-e3d7-40e2-83af-b54f76943b53.aspx</id>
    <published>2008-01-05T01:27:19.8997828-07:00</published>
    <updated>2008-01-05T01:28:34.9601293-07:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I thought this post from Ganesh Prasad was both cheeky and refreshing:
</p>
        <p>
          <em>Though I like REST and consider it a very elegant model for SOA, it's a little
tiresome to hear day in and day out that it's so much more elegant than the SOAP-based
Web Services model. In fact, I'm getting so tired of this shrill posturing that I'm
going to stick it to the RESTafarians right now, in their own style. Watch.</em>
        </p>
        <p>
          <a title="Paying the RESTafarians Back in Their Own Coin" href="http://wisdomofganesh.blogspot.com/2007/12/paying-restafarians-back-in-their-own.html">Paying
the RESTafarians Back in Their Own Coin</a>
        </p>
        <p>
I think I would get along well with Ganesh.
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=ea9266f0-e3d7-40e2-83af-b54f76943b53" />
      </div>
    </content>
  </entry>
  <entry>
    <title>WebHttpBehavior vs WebScriptBehavior</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2007/08/23/WebHttpBehavior+Vs+WebScriptBehavior.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,269c83c1-9db4-4699-9c70-9bdad03bdbde.aspx</id>
    <published>2007-08-23T11:29:31.3461849-06:00</published>
    <updated>2007-08-23T11:29:31.3461849-06:00</updated>
    <category term="indigo" label="indigo" scheme="http://hyperthink.net/blog/CategoryView,category,indigo.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you want to use the [WebGet]/[WebInvoke] programming model in WCF, you need an
endpoint with the right binding and the right endpoint behavior.
</p>
        <p>
The binding is the out-of-the-box <strong>WebHttpBinding. </strong>The endpoint behavior
can be either <strong>WebHttpBehavior </strong>or <strong>WebScriptEnablingBehavior.</strong></p>
        <p>
What's the difference between the two?
</p>
        <p>
The <strong>WebHttpBehavior</strong> is a general-purpose behavior that supports UriTemplate
dispatch and POX/JSON/byte stream formats on the wire. Use it for general purpose
HTTP/REST/Web-Style services.
</p>
        <p>
The <strong>WebScriptEnablingBehavior</strong> is a "profile" of the <strong>WebHttpBehavior</strong> functionality
designed specifically for interop with ASP.NET AJAX clients. It adds in some AJAX-isms
like the ability to automatically generate ASP.NET AJAX client proxies.
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=269c83c1-9db4-4699-9c70-9bdad03bdbde" />
      </div>
    </content>
  </entry>
  <entry>
    <title>How to get rid of that blasted .svc extension...</title>
    <link rel="alternate" type="text/html" href="http://hyperthink.net/blog/2007/08/21/How+To+Get+Rid+Of+That+Blasted+Svc+Extension.aspx" />
    <id>http://hyperthink.net/blog/PermaLink,guid,b7e1760f-da37-44f4-8adc-851ebf3cb93f.aspx</id>
    <published>2007-08-21T14:55:55.9196678-06:00</published>
    <updated>2007-08-21T14:55:55.9196678-06:00</updated>
    <category term="indigo" label="indigo" scheme="http://hyperthink.net/blog/CategoryView,category,indigo.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I get asked by many, many folks if there's a way to cleanse the .svc file extension
from WCF service URI's running in IIS.
</p>
        <p>
Of course there is, and <a href="http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,9e0d8d1e-ac7c-49b5-8072-bde42609f5db.aspx">Jon
Flanders shows you how</a>.
</p>
        <p>
Thanks for writing that up, Jon!
</p>
        <img width="0" height="0" src="http://hyperthink.net/blog/aggbug.ashx?id=b7e1760f-da37-44f4-8adc-851ebf3cb93f" />
      </div>
    </content>
  </entry>
</feed>