<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Dan Rigsby - Coding Up Style</title>
	
	<link>http://www.danrigsby.com/blog</link>
	<description>.Net, C#, &amp; Wcf Development</description>
	<pubDate>Wed, 02 Jul 2008 01:58:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<geo:lat>39.835369</geo:lat><geo:long>-85.986353</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DanRigsby" type="application/rss+xml" /><item>
		<title>Lansing Day of .Net</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/322171427/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/06/28/lansing-day-of-net/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 18:44:56 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/index.php/2008/06/28/lansing-day-of-net/</guid>
		<description><![CDATA[
This weekend I spoke at the first Lansing Day of Dot Net in Lansing, MI. This trip was a bit different as my wife joined me for the first time.&#160; She didn’t come for the Day of .Net, but afterwards we headed up to Mackinac Island for an anniversary trip.&#160; She did enjoy the event [...]]]></description>
			<content:encoded><![CDATA[</p>
<p><a href="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02881.jpg" onclick="javascript:pageTracker._trackPageview ('/downloads/jpg/dsc02881.jpg');"><img title="DSC02881" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="DSC02881" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02881-thumb.jpg" width="244" align="left" border="0" /></a>This weekend I spoke at the first <a href="http://www.dayofdotnet.org/Lansing/2008/default.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/www.dayofdotnet.org');">Lansing Day of Dot Net</a> in Lansing, MI. This trip was a bit different as my wife joined me for the first time.&#160; She didn’t come for the Day of .Net, but afterwards we headed up to <a href="http://www.mackinacisland.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.mackinacisland.org');">Mackinac Island</a> for an anniversary trip.&#160; She did enjoy the event though and even got to attend my session.</p>
<p>We got up to Lansing on Friday night after dropping out daughter off at the in-laws in Fort Wayne, Indiana.&#160; We arrived around 6:30 pm and met up with <a href="http://jbknet.blogspot.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/jbknet.blogspot.com');">Joe Kunk</a>, <a href="http://keithelder.net/" onclick="javascript:pageTracker._trackPageview ('/outbound/keithelder.net');">Keith Elder</a>, <a href="http://www.mcwherter.net/wordpress" onclick="javascript:pageTracker._trackPageview ('/outbound/www.mcwherter.net');" class="broken_link">Jeff McWherter</a>, Jeff’s wife, Vivek Joshi, Vijay Jagdale, and others at the local Kinko’s.&#160; Somehow my wife and I got tricked into helping fold pocket-mod event schedules while we were there.&#160; Afterwards, we went to a local Lansing event called the <a href="http://www.festivalofthesun.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.festivalofthesun.com');">Festival of the Moon</a> which as to commemorate summer nights.&#160; It was basically just a fenced in beer garden.&#160; We met up with <a href="http://netcave.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/netcave.org');">Alan Stevens</a>, his wife, and <a href="http://www.jamescbender.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jamescbender.com');">James Bender</a> there.&#160; We didn’t stay too long as we got a bit bored with the drunken crowd and odd choices of music by the local band.&#160; We ended up heading across the street to a local pizza shop that offered Karaoke.&#160; Jeff, Alan, Keith, and myself all stepped up to the mic and performed our own renditions of various tunes.&#160; It ended being an early night since many of us had to speak in the morning. While in Lansing, my wife and I stayed with Vijay who graciously let us use a spare bedroom he had instead of paying for two nights in a hotel.&#160; Thanks for your hospitality Vijay!</p>
<p>On Saturday morning we headed to the event.&#160; I quickly met up with a number of old friends: <a href="http://blog.mrdaveredding.net/Default.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/blog.mrdaveredding.net');">Dave Redding</a>, <a href="http://blog.cloudsocket.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/blog.cloudsocket.com');">Chris Woodruff</a>, <a href="http://www.mvwood.com/blog" onclick="javascript:pageTracker._trackPageview ('/outbound/www.mvwood.com');">Michael Wood</a>, <a href="http://adanacp.spaces.live.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/adanacp.spaces.live.com');">Carey Payette</a>, <a href="http://mjeaton.net/" onclick="javascript:pageTracker._trackPageview ('/outbound/mjeaton.net');">Michael Eaton</a>, <a href="http://jasonfollas.com/blog/" onclick="javascript:pageTracker._trackPageview ('/outbound/jasonfollas.com');">Jason Follas</a>, <a href="http://blogs.msdn.com/usisvde" onclick="javascript:pageTracker._trackPageview ('/outbound/blogs.msdn.com');">Patrick Foley</a>, <a href="http://www.joshholmes.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.joshholmes.com');">Josh Holmes</a>, <a href="http://blogs.msdn.com/jennifer" onclick="javascript:pageTracker._trackPageview ('/outbound/blogs.msdn.com');">Jennifer Marsman</a>, and <a href="http://jrwren.wrenfam.com/blog/" onclick="javascript:pageTracker._trackPageview ('/outbound/jrwren.wrenfam.com');">Jay Wren</a>.&#160; I also got to meet <a href="http://geekswithblogs.net/ignu" onclick="javascript:pageTracker._trackPageview ('/outbound/geekswithblogs.net');">Len Smith</a> and <a href="http://clevelanddotnet.blogspot.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/clevelanddotnet.blogspot.com');">Sam Nasr</a> and help forge some new friendships. </p>
<h2>Sessions</h2>
<h3>Distilling the Dynamic Language Runtime</h3>
<p><a href="http://www.joshholmes.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.joshholmes.com');">Josh Holmes</a> kicked off one of the first sessions with a talk on the DLR and the relevance of dynamic languages in today’s world.&#160; Josh is a Microsoft Evangelist and an amazing speaker.&#160; I was very surprised to see that there were only 10 attendees in his session.&#160; I can only attribute this to the fact that he held one of the first sessions of the morning.&#160; Originally the event was suppose to start at 9am, but a few days before, they moved the start time to 8:30.&#160; I surmise that many people hadn’t made it to the event yet. </p>
<p>Josh did a great job as usual.&#160; This session was very introductory, but it was still informative and put things into a perspective that I hadn’t quite thought of before.&#160; Here are my notes on his session:</p>
<h4>Languages Progression<a href="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02882.jpg" onclick="javascript:pageTracker._trackPageview ('/downloads/jpg/dsc02882.jpg');"><img title="DSC02882" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="DSC02882" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02882-thumb.jpg" width="244" align="right" border="0" /></a></h4>
<h5>Early Languages</h5>
<p>More at machine level and programming against registers at a low level</p>
<h5>Modern Languages</h5>
<p>C++, VB</p>
<h5>Frameworks</h5>
<p>Java and .Net allow us to write against a framework that talks to a machine.</p>
<p>Looking back over the history of languages, Smalltalk and LISP are dynamic languages.&#160; LISP is 50 years old.&#160; Why didn’t dynamic languages take off?&#160; Some say dynamic languages were infer.&#160; However as we get more powerful PCs a dynamic language becomes more viable</p>
<h4>What is a Dynamic Language</h4>
<ul>
<li>Analogy of taking everything with camping, like running shoes, and even canoe.&#160; Then as the trip changes, you can adjust.&#160; If you feel like hiking, then you have your shoes.&#160; Everything you could need is with you. </li>
<li>Decisions limit options.&#160; Make a decision to go down a long road means there aren’t options to move. </li>
<li>Agility = Options, Quarterbacks have options of different receiver they can use </li>
<li>Dynamic languages emphasis runtime over compile time </li>
</ul>
<h5>Dynamic typing (or duck typing)</h5>
<p>Type can change at runtime. “If it looks like a duck and talks like a duck, then its a duck”.&#160; Josh gave an example where at a banking company they used a 16 bit integer to store values, but as time went on, that was not enough.&#160; It would have been nice to use a dynamic language and allow the variable to expand and adjust as needed.</p>
<h5>Dynamic Features </h5>
<p>Open up the types at runtime which allow you to inject new properties to existing and running classes. Add the ability to dynamically add new properties to objects.</p>
</p>
</p>
</p>
</p>
</p>
<p>“Trade CPU cycles for productivity” Dynamic languages are slower, but its all about the trade of ideas.</p>
<p>About making your life easier, not the CPUs life easier.&#160; CPUs are getting faster, why not harness the ease for the developer and user.</p>
<p>Evidently, Ruby is now Josh’s favorite language.&#160; In Ruby, one of the goals is to reduce line noise (things such as variable declarations, casting, semicolons, etc is just noise).&#160; Strings in Ruby are mutable.</p>
<h4>What is TDD?</h4>
</p>
</p>
</p>
<p>Test Driven Development</p>
</p>
<p>Analogy of Car assembly: A car isn’t sculpted as one piece.&#160; A car is built out of many different components. Each part of a car is designed and independently tested before it is put in place.&#160; (However, they aren’t always tested well together).&#160; This is a lot like unit testing.&#160; Each unit of code should be defined and tested.</p>
<p>Yagni (You aint goina need it) – Don’t waste time building stuff you aren’t going to need.&#160; If you design your tests before you write your code, then you are building specifications for how the code should work.&#160; Anything that doesn’t have a test must be fluff.</p>
<h5>Steps in TDD</h5>
<h5></h5>
<ol>
<li>Write tests based off of requirements </li>
<li>Run the tests to make sure they fails.&#160; If a test doesn’t fail, how can it be a good test? </li>
<li>Write just enough code to pass the test. </li>
<li>Go back and write more tests (step 1), and continue down the list </li>
</ol>
<p>The tests become the documentation for how to write the code.</p>
<h4>Dynamic Language Initiative in .Net</h4>
<p>CLR –&gt; Frameworks –&gt; DLR –&gt; Langauges</p>
<p>Python was originally written in C.&#160; Eventually there was a Java implementation of python called jython.&#160; When IronPython came along it ended up running twice as fast as standard editions of python.</p>
<h3></h3>
<h3>Regular Expressions can be your Friend</h3>
<p>Vijay ran a session on Regular Expressions and since he was hosting us for the weekend, I really wanted to make sure I attended his session.&#160; He did a great job of introducing regular expressions and what is possible with them.&#160; He event got into ways to help circumvent text based attacks.&#160; The only real suggestion I have on the presentation is to go over some of the differences in how regular expressions are implemented in different languages.</p>
<p>I was surprised at the number of people who attended and how much the audience got into the topic.&#160; This presentation contained a lot of code and demos which really fit well with the flow of the topic.&#160; I hope to see Vijay continue to speak at future events. </p>
<h3>Manage Complexity with Agility</h3>
<p>Alan Stevens gave this session which covered an Introduction to Agile and the MVC pattern.&#160; I have never gotten to attend one of Alan’s speeches before due to other conflicts, so I was glad to be able to attend this one.&#160; Alan did a great job.&#160; His explanation and examples of the basics of MVC and TDD were amazing.&#160; There is no way I could have given that good of an introduction.&#160; I went into session knowing this material, but it was great to see things in a new light, and you could see people in the audience get that little “ah ha” look.&#160; I look forward to catching some of his talks in the future.</p>
<h3>My Session: Agile Project Management with Scrum</h3>
<p><a href="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02887.jpg" onclick="javascript:pageTracker._trackPageview ('/downloads/jpg/dsc02887.jpg');"><img title="DSC02887" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="DSC02887" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02887-thumb.jpg" width="244" align="left" border="0" /></a>My session had a modest 30 or so attendees.&#160; I covered project management, what is “Agile”, and gave an overview of Scrum.&#160; The audience had a number of good questions and comments.&#160; This was the first speech of mine that my wife attended, she commented, “You did better than I expected, not that I expected you to be bad”.&#160; I am not sure how to take that, but I think it was meant as a complement.&#160; I do think that I get better each time I speak, but I have a long way to go to get as good as many speakers that I see.&#160; I had a number of people come up to me after the session to make comments and ask more about how they could apply Agile techniques at their own companies.&#160; Many people still seem to think that these techniques cant be applied to their environment.&#160; I hope that I can help change that perception over time.&#160; I have some ideas for some other Agile talks, hopefully they will see the light of day and be picked up at future events.</p>
<p>The materials from my session can be found here: <a href="http://www.danrigsby.com/files/Presentations/AgileMgmtWithScrum.zip" title="Materials- AgileMgmtWithScrum.zip" onclick="javascript:pageTracker._trackPageview ('/downloads/zip/agilemgmtwithscrum.zip');">http://www.danrigsby.com/files/Presentations/AgileMgmtWithScrum.zip</a></p>
<h2>Closing Thoughts</h2>
<p>The Lansing guys did a fabulous job for their first day of .Net.&#160; I was amazed at all of the details they put into the event such as shirts for all attendees, commemorative cups for every speaker, a local camera crew to document the event, getting the mayor of Lansing to give closing remarks, etc.&#160; I will do my best to get on the speaker list again next year.&#160; I am sorry for those who didn’t make the trip up, this event was well worth the time and price of gas.</p>
<p>After the event, Jeff McWherter hosted an afterparty at his house which he claimed took more planning than the actual event itself.&#160; Jeff really organized a high quality afterparty.&#160; Most of the speakers and a lot of the event attendees made it out.&#160; There was a lot of food, even more alcohol, and most importantly many good conversations about .Net. Unfortunately, my wife and I left around 9pm.&#160; We still had to start our anniversary trip up to Mackinac Island in the morning.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=nDNSFI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=nDNSFI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=hoOSAi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=hoOSAi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=C4V8ti"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=C4V8ti" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=11klIi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=11klIi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=o6u6WI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=o6u6WI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=vMVr5i"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=vMVr5i" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/322171427" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/06/28/lansing-day-of-net/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/06/28/lansing-day-of-net/</feedburner:origLink></item>
		<item>
		<title>IndyPASS 3rd Birthday Bash</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/314652697/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/06/18/indypass-3rd-birthday-bash/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 14:21:34 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<category><![CDATA[MSSQL]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/index.php/2008/06/18/indypass-3rd-birthday-bash/</guid>
		<description><![CDATA[ IndyPass is the Indianapolis Professional Association for SQL Server.&#160; Tonight they celebrated their 3rd Birthday Bash. The speaker was Tom Pizzato, Data Platform Architect, at Microsoft.
John Magnabosco kicked us off with the introduction.&#160; He gave the usual announcement events, board elections, etc . John ended by asking for job announcements, but was interrupted by [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.indypass.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.indypass.org');"><img title="DSC02863" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="DSC02863" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02863.jpg" width="244" align="left" border="0" /> IndyPass</a> is the Indianapolis Professional Association for SQL Server.&#160; Tonight they celebrated their 3rd Birthday Bash. The speaker was Tom Pizzato, Data Platform Architect, at Microsoft.</p>
<p><a href="http://www.johnmagnabosco.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.johnmagnabosco.com');">John Magnabosco</a> kicked us off with the introduction.&#160; He gave the usual announcement events, board elections, etc . John ended by asking for job announcements, but was interrupted by the famous <a href="http://www.buckfoley.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.buckfoley.com');">Buck Foley</a>.&#160; Buck is a “Matt Foley” impersonator (the &#8216;van down by the river&#8217; character played by Chris Farley on Saturday Night Live), and the actor is a ‘Database Guy’ by profession.&#160; He brings his own flavor of humor and applies it to SQL technologies. Buck seemed to be under the impression that he was the main speaker and not Tom Pizzato who he called “Pizza-Toe”.&#160; He winged his talk this time, but it was still humorous and set a light hearted tone for the rest of the meeting.</p>
<p>Tom’s talk was broken into two sections: a detailed talk about new features followed by a series of demos.&#160; The talk mainly went over all of the new features and changes in SQL Server 2008.</p>
<h2>Tom’s Talk</h2>
<h2></h2>
<h3><a href="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02865.jpg" onclick="javascript:pageTracker._trackPageview ('/downloads/jpg/dsc02865.jpg');"><img title="DSC02865" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="DSC02865" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/dsc02865-thumb.jpg" width="244" align="right" border="0" /></a> Amazing Journey</h3>
<p>Tom has worked with SQL Server for close to 19 years.&#160; He started his talk by taking us a down memory lane by showing some of the original disks for the first version of SQL Server back when it was just a OS2 port of Sybase.&#160; He also&#160; picked fun of the fact that there was a launch event for a product that has not yet been released. A few items of interest from his introduction were:</p>
<ul>
<li>Microsoft is still on track for a Q3 launch of SQL Server 2008, but skill couldn’t give us a more specific date yet.&#160; The next version of SQL Server will be in 2010 (at least that is where it is planned). </li>
<li>FileStream data cannot be saved to a separate machine in SQL Server 2008.&#160; it is still limited to the machine running SQL Server 2008.&#160; Microsoft knows this is a limitation, but they chose to just get the feature out there first. </li>
</ul>
<h3>Protect your Information</h3>
<ul>
<li><strong>Secure Access</strong>
<ul>
<li>Strong Authentication </li>
<li>Granular Authorization </li>
<li>Transparent Data Encryption (TDE) </li>
<li>External Key Management </li>
</ul>
</li>
<li><strong>Protect System</strong>
<ul>
<li>Secure Deployment </li>
<li>Secure by default: This ones&#160; is going to be a pain for some people.&#160; Secure by default means everything is turned off by default.&#160; Microsoft is taking this mind set into all of its major projects.&#160; I have talked about this before in terms of Wcf, but we also see it in Windows Server 2008 where almost no features are installed by default. </li>
</ul>
</li>
</ul>
<h3>Ensure Business Continuity</h3>
<ul>
<li><strong>Ensure Availability</strong>
<ul>
<li>Mirror your data: Automatic repair of primary from backups </li>
<li>Failover clustering </li>
<li>Replicate your data </li>
</ul>
</li>
<li><strong>Minimize Downtime</strong>
<ul>
<li>Online Operations: More to help you keep your system up including, hot swapping CPUs while running in production </li>
<li>Add system resources </li>
<li>Reduce Recovery time </li>
</ul>
</li>
<li><strong>Concurrent Access</strong>
<ul>
<li>Database Snapshots: Not many changes here </li>
<li>Snapshot Isolations </li>
</ul>
</li>
</ul>
<h3>Predictable Response</h3>
<ul>
<li><strong>Optimize Performance</strong>
<ul>
<li>Efficient Data Storage: Finally Compression at the data and backup levels. in SP2 for SQL Server 2005, the vardecimal datatype was introduced which helped open the doors for this feature. </li>
<li>Prescriptive Guidance </li>
</ul>
</li>
<li><strong>Analyze Performance</strong>
<ul>
<li>Data Collection: Collect reports instead of wiping them </li>
</ul>
</li>
<li><strong>Predict Performance</strong>
<ul>
<li>Plan Freezing: Allow you to save query execution plans to xml that can be run on other machines. </li>
<li>Resource Governor: Set up resources into pools and assigned users to them.&#160; Such as giving 70% CPU and memory to a power users and&#160; rest to non-power users. </li>
</ul>
</li>
</ul>
<h3>Reduce Management Cost</h3>
<ul>
<li><strong>Flexible Administration</strong>
<ul>
<li>Visual Management: Management Studio improvements, Powershell integration, etc. </li>
<li>Automate Operations </li>
</ul>
</li>
<li><strong>Manage centrally</strong>
<ul>
<li>Enterprise Policies </li>
<li>Monitor Compliance </li>
</ul>
</li>
<li><strong>Monitor Health</strong>
<ul>
<li>Management Reports </li>
<li>Performance Tuning Tools </li>
</ul>
</li>
</ul>
<h3>Simplify Development</h3>
<ul>
<li><strong>Easy Access</strong>
<ul>
<li>Model Entities: Models can be built off multiple tables such as a “User” entity that spans multiple tables.&#160; LINQ can then be used to query over this data. This is what is formally called LINQ to Entities. </li>
<li>Integrated Query: Most of the LINQ stuff is slightly slower, but it is a trade off of getting the code done faster development vs. performance.&#160; This is also know as LINQ to SQL. </li>
<li>Comprehensive connectivity </li>
</ul>
</li>
<li><strong>Program data logic</strong>
<ul>
<li>Time aware applications: Introduced separate Date and Time fields. </li>
<li>Pass data results </li>
</ul>
</li>
<li><strong>Sync your data</strong>
<ul>
<li>Local data storage </li>
<li>Offline Synchronization </li>
</ul>
</li>
</ul>
<h3>Store your information</h3>
<ul>
<li><strong>Unstructured Information</strong>
<ul>
<li>File Storage </li>
<li>Search Text </li>
<li>Extensible Types </li>
</ul>
</li>
<li><strong>Geospatial Information</strong>
<ul>
<li>Spatial Standards </li>
<li>Visualize Location </li>
</ul>
</li>
<li><strong>Structured information</strong>
<ul>
<li>Model complex hierarchies: No more need to use CTEs to recursively query data to build hierarchy trees.&#160; The new Hierarchy data type can store these values </li>
<li>Enhanced Partitioning </li>
</ul>
</li>
</ul>
<h3>Integrate and Manage data</h3>
<ul>
<li><strong>Build Faster</strong>
<ul>
<li>Connect to data </li>
<li>Cleanse Data </li>
<li>Integrate data </li>
</ul>
</li>
<li><strong>Manage Efficiently</strong>
<ul>
<li>Efficient Data Storage </li>
<li>Mange mixed workloads </li>
<li>Streamline Aggregates </li>
</ul>
</li>
<li><strong>Scalable Performance</strong>
<ul>
<li>DW Query Optimizations: Lots of optimizations in performance of Star joins </li>
<li>Enhanced Partitioning: Easier to align partitions with their indices. </li>
</ul>
</li>
</ul>
<h3>Deliver Relevant Reports</h3>
<ul>
<li><strong>Author reports</strong>
<ul>
<li>Enhanced Designers: Licensed technology from <a href="http://www.dundas.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.dundas.com');">Dundas</a> to create better and more professional looking reports. </li>
<li>Flexible Layout: Introduced <a href="http://msdn.microsoft.com/en-us/library/bb934258(SQL.100).aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">Tablixs</a>. </li>
</ul>
</li>
<li><strong>Manage reports</strong>
<ul>
<li>Enterprise Platform: SSRS was rewritten to not require IIS and scale better in the enterprise </li>
<li>Server-based Deployment </li>
</ul>
</li>
<li><strong>Deliver reports</strong>
<ul>
<li>Rich Visualizations </li>
<li>Render in office </li>
<li>Share reports </li>
</ul>
</li>
</ul>
<h3>Drive Actionable Insight (Analysis Services)</h3>
<ul>
<li><strong>Build Analytical Solutions</strong>
<ul>
<li>Scalable Platform </li>
<li>Prescriptive Guidance </li>
</ul>
</li>
<li><strong>Extend Reach</strong>
<ul>
<li>Manage KPIs: How many Microsoft tools report KPIs? </li>
<li>Predictive Analysis </li>
</ul>
</li>
<li><strong>Deliver Insight</strong>
<ul>
<li>Work in Office: Data mining add-ins for office allow you to mine and report on data directly from Office tools </li>
<li>Business view of data </li>
</ul>
</li>
</ul>
</p>
</p>
<h2>Tom’s Demos</h2>
<p>Demos were done using SQL Server 2008 CTP 6.&#160; Tom had 9 demos to show but only got to 6 of them.&#160; The demos were run from a custom application that had the queries and results all displayed in a custom window.&#160; This was obviously a pre-canned set of demos or at least a pre-canned tool, but it was a great way to display these features.&#160; I know it took a lot of time to put together, </p>
<h3>Auditing</h3>
<ul>
<li>Auditing performance can eat up to 10% </li>
<li>Audit logs are stored in a separate file on the disk.&#160; These files are not xml or directly human readable, but at least they can’t be queried like any other table. </li>
<li>Audit logs can be maintained by setting up rollover files and file sizes </li>
</ul>
<h3>Compression</h3>
<ul>
<li>Compression types can be set at the row or page levels </li>
</ul>
<h3>Powershell</h3>
<ul>
<li>Only works for the relational engine </li>
<li>Can right click on teh database in management studio and say “Open Powershell” </li>
<li>Once in powershell you can say “dir”and get the list of database objects including being able to drill into tables, users, etc.&#160; </li>
<li>You could even run more complex Powershell queries such as the ability to get tables where row count is &gt; 1000 like:
<ul>
<li>dir | where &lt; $._RowCount -gt 1000 </li>
</ul>
</li>
<li>You can pipe results out to HTML or other mediums </li>
</ul>
<h3>Freezing Plans</h3>
<ul>
<li>Gives you the ability to take a query execution plan and save it to XML </li>
<li>Can then specify when plan to use when executing a query </li>
</ul>
<h3>New DateTime Datatypes</h3>
<ul>
<li>Separate Date and Time datatypes </li>
<li>A new DateTimeOffset datatype supports years 0001 to 9999 as well as storing time zone information </li>
<li>A new DateTime2 datatype supports years 0001 to 9999 </li>
</ul>
<h3>Table Value Parameters and Merge</h3>
<ul>
<li>This was the last feature dropped from SQL Server 2005 </li>
<li>A new MERGE statement allows merging of rows from multiple tables. You can choose to update matched rows, insert unmatched rows, or delete unmatched rows from the primary table. </li>
</ul>
<h2>Prizes</h2>
<p>I know a lot of people probably only came here for the prizes, and there were some great giveaways again this year.&#160; There was an Xbox, a 30 gig Zune, two 8 gig Zunes, and a slew of books and other swag.&#160; As usual I didn’t win anything, even though the odds were pretty good.&#160; But I came here for the event more than the prizes</p>
<h2>Final Thoughts</h2>
<p>I do miss having Bill Baker at the Birthday Bashes, but Tom has been filling in nicely. He is a good speaker, is able to answer most questions, and is very competent in his skills. He was asked some detailed questions about LINQ to SQL and LINQ to Entities that he couldn’t answer, but he wasn’t afraid to punt on them and commit to getting Joe Healy to come to talk about LINQ at a future meeting.&#160; I am looking forward to future events at IndyPASS.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=cyv6eI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=cyv6eI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=B3edEi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=B3edEi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=y6p7pi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=y6p7pi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=aCo0Hi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=aCo0Hi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=tWGLKI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=tWGLKI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=WCMJQi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=WCMJQi" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/314652697" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/06/18/indypass-3rd-birthday-bash/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/06/18/indypass-3rd-birthday-bash/</feedburner:origLink></item>
		<item>
		<title>REST and Max URL Size</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/314001272/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/06/17/rest-and-max-url-size/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 18:47:00 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[REST]]></category>

		<category><![CDATA[Wcf]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/?p=244</guid>
		<description><![CDATA[I have heard many people say that the definition of REST is to just put everything in the URL.&#160; This isn’t true.&#160; One of the tenants of REST is to “embrace” the URL and use it as much as possible, but moving information to POST data is just as important and often necessary.&#160; I can [...]]]></description>
			<content:encoded><![CDATA[<p>I have heard many people say that the definition of REST is to just put everything in the URL.&#160; This isn’t true.&#160; One of the tenants of REST is to “embrace” the URL and use it as much as possible, but moving information to POST data is just as important and often necessary.&#160; I can understand how this can be misunderstood.&#160; Most REST interfaces do take in all values in into the URL to make it easier to navigate the data.&#160; Having to build a POST package can be tedious at times.&#160; So, what if you do want to send larger data to the service?&#160; When should you decide to move away from a pure URL approach and start using POST data in the header?</p>
<p><strong>Browser and WebServer Limits: </strong><em></em><a href="http://www.boutell.com/newfaq/misc/urllength.html" title="http://www.boutell.com/newfaq/misc/urllength.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.boutell.com');"><em>http://www.boutell.com/newfaq/misc/urllength.html</em></a></p>
<ul>
<li><strong>Internet Explorer:</strong> <a href="http://support.microsoft.com/kb/208427" onclick="javascript:pageTracker._trackPageview ('/outbound/support.microsoft.com');">2,083 characters</a>, with no more than 2,048 characters in the path portion of the URL </li>
<li><strong>Firefox:</strong> 65,536 characters show up, but longer URLs do still work even up past 100,000 </li>
<li><strong>Safari:</strong> &gt; 80,000 characters </li>
<li><strong>Opera:</strong> &gt; 190,000 characters </li>
<li><strong>IIS:</strong> 16,384 characters, but is configurable </li>
<li><strong>Apache:</strong> 4,000 characters </li>
</ul>
<p>Different things can happen when you go beyond these URL limits depending on the browser and web servers. It could be a “413 (Entity Too Large)” error, “414 (Request-URI Too Long)” error, the URL could be truncated, or it may just work.&#160; However since different things can happen and your service could be consumed by any source, you have to assume the worst could happen.</p>
<p>By looking at just these numbers, it seems you would be pretty safe with a URL that gets up to 2,000 characters.&#160; However, lets look at the W3C standards on this.&#160; The HTTP specification doesn’t really set a size for the length of a URL, but it does recommend being cautious when going above 255. According to <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.2" onclick="javascript:pageTracker._trackPageview ('/outbound/www.w3.org');">Hypertext Transfer Protocol - HTTP/1.1 section 3.2</a>:</p>
<blockquote><p>Servers ought to be cautious about depending on URI lengths above 255 bytes, because some older client or proxy implementations might not properly support these lengths.</p>
</blockquote>
<p>So for the sake of a REST interface you <em>should</em> avoid setting up an interface where there is any possibility of a URL getting beyond 255.&#160; If you are using a GET verb to request a resource via the URL you should be pretty safe.&#160; However POSTing or PUTing an insert or update via a URL may not be the way to go unless the data size is very small.</p>
<p>The most important thing is to keep your interfaces <strong>consistent</strong>.&#160; You don’t want one operation that allows an insert via the URL and another through POST data.&#160; This just makes things confusing and less discoverable.&#160; Especially since REST has no way to <a href="http://www.danrigsby.com/blog/index.php/2008/05/29/rest-services-and-metadata-endpoints-in-wcf/">publish metadata</a> about the operations.&#160;&#160; You could follow standards such as these:</p>
<table cellspacing="0" cellpadding="2" width="400" border="1">
<tbody>
<tr>
<td valign="top" width="143"><strong>CRUD Operation</strong></td>
<td valign="top" width="128"><strong>HTTP Verb</strong></td>
<td valign="top" width="127"><strong>Data Location</strong></td>
</tr>
<tr>
<td valign="top" width="143">Create</td>
<td valign="top" width="128">POST or PUT</td>
<td valign="top" width="127">POST Data</td>
</tr>
<tr>
<td valign="top" width="143">Read</td>
<td valign="top" width="128">GET</td>
<td valign="top" width="127">URL</td>
</tr>
<tr>
<td valign="top" width="143">Update</td>
<td valign="top" width="128">POST or PUT</td>
<td valign="top" width="127">POST Data</td>
</tr>
<tr>
<td valign="top" width="143">Delete</td>
<td valign="top" width="129">DELETE</td>
<td valign="top" width="127">URL</td>
</tr>
</tbody>
</table>
<p>In general this follows “<a href="http://lesscode.org/2006/03/19/high-rest/" onclick="javascript:pageTracker._trackPageview ('/outbound/lesscode.org');">High REST</a>” which is the more pure REST.&#160; This dictates that the HTTP Verbs define the methods to act on the resource. </p>
<p>Ultimately it’s up to you how you implement the REST interface, but stay consistent, be careful about URL limits, and try to follow industry standards.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=WPtsCI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=WPtsCI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=K0Qwoi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=K0Qwoi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=vgH9ti"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=vgH9ti" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=TpAfwi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=TpAfwi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=o4psHI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=o4psHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=hOxnPi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=hOxnPi" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/314001272" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/06/17/rest-and-max-url-size/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/06/17/rest-and-max-url-size/</feedburner:origLink></item>
		<item>
		<title>ThirstyDeveloper Podcast: The Blogging Episode</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/310742734/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/06/12/thirstydeveloper-podcast-the-blogging-episode/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 23:07:00 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[Podcast]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/?p=239</guid>
		<description><![CDATA[
A few weeks ago Larry Clarkin came down and interviewed my friend Jeff Moser and myself for an episode of the&#160; ThirstyDeveloper podcast on Technical Blogging.&#160; Larry wanted to do an episode about what it takes to create a professional technical blog and why every developer should consider it.&#160;&#160; Jeff and I have different types [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thirstydeveloper.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.thirstydeveloper.com');"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="100" alt="ThirstyDeveloper_small" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/thirstydeveloper-small-thumb.png" width="100" align="left" border="0" /></a></p>
<p>A few weeks ago <a href="http://www.larryclarkin.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.larryclarkin.com');">Larry Clarkin</a> came down and interviewed my friend <a href="http://www.moserware.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.moserware.com');">Jeff Moser</a> and myself for an episode of the&#160; <a href="http://www.thirstydeveloper.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.thirstydeveloper.com');">ThirstyDeveloper</a> podcast on Technical Blogging.&#160; Larry wanted to do an episode about what it takes to create a professional technical blog and why every developer should consider it.&#160;&#160; Jeff and I have different types of blogs, and it was good to get multiple perspectives on things. </p>
<p>It took a few weeks, but the post editing work is done and it is available to listen to.&#160; Overall, I think the interview went pretty well, but listen to it yourself and post your own comments about what you like, what we could do better, or anything you else you want to add.</p>
<p>The link to the episode is: <a href="http://thirstydeveloper.com/2008/06/11/TheThirstyDeveloper24TheBloggingEpisode.aspx" title="http://thirstydeveloper.com/2008/06/11/TheThirstyDeveloper24TheBloggingEpisode.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/thirstydeveloper.com');">http://thirstydeveloper.com/2008/06/11/TheThirstyDeveloper24TheBloggingEpisode.aspx</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=zXpXqI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=zXpXqI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=CKGl9i"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=CKGl9i" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=9kVshi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=9kVshi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=E2vSdi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=E2vSdi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=hORqDI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=hORqDI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=FYLpoi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=FYLpoi" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/310742734" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/06/12/thirstydeveloper-podcast-the-blogging-episode/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/06/12/thirstydeveloper-podcast-the-blogging-episode/</feedburner:origLink></item>
		<item>
		<title>Software Development Meme</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/310737133/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/06/12/software-development-meme/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 22:42:00 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/index.php/2008/06/12/software-development-meme/</guid>
		<description><![CDATA[
 I got hit by the latest developer oriented meme trekking through the blogosphere.&#160; My friend Michael Eaton started this one, but it has taken a life of its own.&#160; I figured eventually someone would tag me specifically to fill this out. 
Here is the trace of how this request eventually got to me:
Michael Eaton [...]]]></description>
			<content:encoded><![CDATA[</p>
<p><a href="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/images.jpg" onclick="javascript:pageTracker._trackPageview ('/downloads/jpg/images.jpg');"><img title="Meme" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="86" alt="Meme" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/images-thumb.jpg" width="133" align="left" border="0" /></a> I got hit by the latest developer oriented <a href="http://thedailymeme.com/what-is-a-meme/" onclick="javascript:pageTracker._trackPageview ('/outbound/thedailymeme.com');">meme</a> trekking through the blogosphere.&#160; My friend <a href="http://www.michaeleatonconsulting.com/blog/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.michaeleatonconsulting.com');">Michael Eaton</a> started this one, but it has taken a life of its own.&#160; I figured eventually someone would tag me specifically to fill this out. </p>
<p>Here is the trace of how this request eventually got to me:</p>
<p><a href="http://www.michaeleatonconsulting.com/blog/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.michaeleatonconsulting.com');">Michael Eaton</a> (<a href="http://www.michaeleatonconsulting.com/blog/archive/2008/06/04/how-did-you-get-started-in-software-development.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/www.michaeleatonconsulting.com');">post</a>) -&gt; <a href="http://www.codinggeekette.com/2008/06/sarahs-steps-into-software-development.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/www.codinggeekette.com');">Sarah Dutkiewicz</a> (<a href="http://www.codinggeekette.com/2008/06/sarahs-steps-into-software-development.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/www.codinggeekette.com');">post</a>) -&gt; <a href="http://www.jeffblankenburg.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jeffblankenburg.com');">Jeff Blankenburg</a> (<a href="http://www.jeffblankenburg.com/2008/06/software-development-meme.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jeffblankenburg.com');">post</a>) -&gt; <a href="http://www.joshholmes.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.joshholmes.com');">Josh Holmes</a> (<a href="http://www.joshholmes.com/2008/06/06/SoftwareDevelopmentMeme.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/www.joshholmes.com');">post</a>) –&gt;&#160; <a href="http://www.larryclarkin.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.larryclarkin.com');">Larry Clarkin</a> (<a href="http://larryclarkin.com/2008/06/10/SoftwareDevelopmentMemeOrTagIAmNext.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/larryclarkin.com');">post</a>) –&gt; <a href="http://www.danrigsby.com/">me</a> (answers below)</p>
<p><strong>1. How old were you when you started programming?</strong>     <br />I was 11.&#160; I remember it distinctly as it was when I got my <a href="http://www.danrigsby.com/blog/index.php/2008/04/04/love-at-first-byte/">first computer</a>, a Commodore 64.&#160; The entire OS was BASIC driven. I loved to copy programs out of the back of Basic Magazine and “try” to get them to work.&#160; I eventually got into <a href="http://en.wikipedia.org/wiki/RPL_programming_language" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">RPL</a> and some C++ in high school.</p>
<p>For most of my youth and through college, I considered computers and programming as a hobby.&#160; I started college working on Pre-Med degree, but ended up settling for a Psychology degree like <a href="http://www.jeffblankenburg.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jeffblankenburg.com');">Jeff Blankenburg</a>.&#160; After school I tried to use that degree, but could barely make ends meet.&#160; I ended up going back to school a year later to attempt to get a CS degree.&#160; I made it all the way up to senior project, but decided to just take my knowledge and get job.&#160; This was back in 1999 and the Internet bubble was in full swing.</p>
<p><strong>2. How did you get started in programming? </strong>    <br />I think the answer to the previous question and <a href="http://www.danrigsby.com/blog/index.php/2008/04/04/love-at-first-byte/">this blog post</a> sum things up.</p>
<p><strong>3. What was your first language?</strong>     <br /><a href="http://en.wikipedia.org/wiki/Commodore_BASIC" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Commodore BASIC</a></p>
<p><strong>4. What was the first real program you wrote?</strong>     <br />In high school I wrote a few programs.&#160; One that I remember was for my <a href="http://en.wikipedia.org/wiki/HP-48_series" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">HP 48SX calculator</a> (loved that calculator, but it was stolen in college).&#160; I had done most Basic up until then, but when I got this calculator I really got into <a href="http://en.wikipedia.org/wiki/RPL_programming_language" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">RPL (Reverse Polish Lisp)</a>.&#160; It was a fun language and quite a jump from Basic. It was a simple rock/paper/scissors game.&#160; There were no laptops back then and paying attention in class was boring.&#160; Instead I found it more exciting to write programs on the calculator.&#160; Naturally I ending up writing a lot of applications for that calculator in high school. </p>
<p><strong>5. What languages have you used since you started programming?</strong>     <br />Basic, <a href="http://en.wikipedia.org/wiki/RPL_programming_language" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">RPL (Reverse Polish Lisp)</a>, C++, Cobol, Java, Javascript, Visual Basic, C#</p>
<p><strong>6. What was your first professional programming gig?</strong>     <br />I looked for my first job for about 2 months.&#160; With no CS degree or programming experience, it was hard to get my foot in the door.&#160; I eventually found a job at a small aviation repair company.&#160; I think they were looking for the cheapest developer they could find, but I was happy to get a chance to work on something and get some experience (and a paycheck).&#160; This ob was originally just suppose to be a 6 month stint, but they tried to keep me on longer. I might have stuck around, but I was eager to work with other developers.&#160; At this aviation shop I was the sole IT department running CAT 5 cable, building/maintaining PCs, creating a Database, setting up email, developing a client application in VB6 as a front end to the database, building a classic ASP web site, etc.&#160; I went to <a href="http://www.inin.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.inin.com');">Interactive Intelligence</a> after this job and have been there ever since (8.5 years and counting).</p>
<p><strong>7. If you knew then what you know now, would you have started programming?</strong>     <br />I was born to code, and I try to live life with no regrets.&#160; Everything that I have done in my life and the events that occurred have made me who I am today.&#160; If I changed one event in my past, I may not be where I am today or may not have met my wife.</p>
<p>However, I do love to program.&#160; Knowing what I know now, I wouldn’t have stopped developing and would have jumped right into Computer Science in college.</p>
<p><strong>8. If there is one thing you learned along the way that you would tell new developers, what would it be? </strong></p>
<ol>
<li>Get involved in the community.&#160; User groups may be over your head, but that’s good to learn from.&#160; Or user groups may be too basic for you, but that’s good to learn from too.&#160; Community involvement is a great way to network and help others.&#160; It also helps you share ideas and propose issues to your network of peers. </li>
<li>Start a blog.&#160; Even if you think you are a bad writer, you will get better.&#160; I am a terrible writer, but it is something I am working on.&#160; Blogs help you share knowledge, store knowledge for yourself, provide samples of your code for future employers, etc.&#160; There are many reasons to start a blog, but every professional developer should really consider getting something out there. </li>
<li>Use a tool like <a href="http://www.google.com/reader" onclick="javascript:pageTracker._trackPageview ('/outbound/www.google.com');">Google Reader</a> and subscribe to blogs.&#160; One of my interview questions is: “how do you say up to date with new technologies and industry trends?”&#160; Reading blogs is a great way to stay up to date, but manually checking dozens of web sites everyday is tedious.&#160; RSS makes things much easier because it only pulls updates.&#160; You can check your RSS feed many times a day, but it will check all of your blogs for updates and report it to you in one interface.&#160; Personally I am up to around 150 blogs that I follow.&#160; It does help to have <a href="http://www.moserware.com/2007/12/tip-organize-rss-feeds-by-tag-tiers.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.moserware.com');">a folder hierarchy</a> to help organize your blog feeds though.&#160; You can start by <a href="http://feeds.feedburner.com/DanRigsby" onclick="javascript:pageTracker._trackPageview ('/outbound/feeds.feedburner.com');">subscribing to this blog</a>. </li>
</ol>
<p><strong>9. <strong>What&#8217;s the most fun you&#8217;ve ever had &#8230; programming?</strong></strong>     <br />I have a lot “most fun” days.&#160; For the most part every day is a new “most fun” day.&#160; In particular I like days when I can code with others.&#160; Sitting in the back room or Ivory Tower solo programming is great, but it’s a lot of fun to program with others.</p>
<p><strong>10. Who are you calling out?</strong>     <br />I am going to hit up a few of my Indianapolis tweeps who blog:</p>
<ul>
<li><a href="http://www.aaronlerch.com/blog" onclick="javascript:pageTracker._trackPageview ('/outbound/www.aaronlerch.com');">Aaron Lerch</a> </li>
<li><a href="http://www.moserware.com" onclick="javascript:pageTracker._trackPageview ('/outbound/www.moserware.com');">Jeff Moser</a> </li>
<li><a href="http://ilikeellipses.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/ilikeellipses.com');">Mike Hall</a> </li>
<li><a href="http://cornucopia30.blogspot.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/cornucopia30.blogspot.com');">Chad Campbell</a> (not in Indy now, but he use to be) </li>
<li><a href="http://phacker.wordpress.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/phacker.wordpress.com');">Paul Hacker</a> </li>
<li><a href="http://manicprogrammer.com/cs/blogs/willeke/default.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/manicprogrammer.com');">Eric Willeke</a> </li>
</ul>
<p>&#160;</p>
</p>
</p>
</p>
</p>
<p><a href="http://www.thadguy.com/tag/memetics/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.thadguy.com');"><img title="read-silently" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="520" alt="read-silently" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/06/readsilently.png" width="470" border="0" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=ssg02I"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=ssg02I" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=JRPWLi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=JRPWLi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=mi8xMi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=mi8xMi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=AkvHai"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=AkvHai" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=nHuTKI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=nHuTKI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=RKi3bi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=RKi3bi" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/310737133" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/06/12/software-development-meme/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/06/12/software-development-meme/</feedburner:origLink></item>
		<item>
		<title>New Webcast: Creating Snippets in Visual Studio</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/308372740/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/06/09/new-webcast-creating-snippets-in-visual-studio/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 23:09:03 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[Visual Studio]]></category>

		<category><![CDATA[Webcast]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/index.php/2008/06/09/new-webcast-creating-snippets-in-visual-studio/</guid>
		<description><![CDATA[
I have a new 4 min 47 sec training webcast out over creating code snippets in Visual Studio 2005 and 2008.&#160; The video is available through JupiterMedia and can be viewed at http://www.internet.com/video/. Just look for the &#34;Developer Video&#34; titled &#34;Creating Snippets in Visual Studio&#34;.&#160; Direct link is:
http://www.internet.com/video/?bcpid=1431564240&#38;bclid=1433966034&#38;bctid=1589625246
]]></description>
			<content:encoded><![CDATA[</p>
<p>I have a new 4 min 47 sec training webcast out over creating code snippets in Visual Studio 2005 and 2008.&#160; The video is available through <a href="http://www.jupitermedia.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.jupitermedia.com');">JupiterMedia</a> and can be viewed at <a href="http://www.internet.com/video/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.internet.com');">http://www.internet.com/video/</a>. Just look for the &quot;Developer Video&quot; titled &quot;Creating Snippets in Visual Studio&quot;.&#160; Direct link is:</p>
<p><a href="http://www.internet.com/video/?bcpid=1431564240&amp;bclid=1433966034&amp;bctid=1589625246" title="http://www.internet.com/video/?bcpid=1431564240&amp;bclid=1433966034&amp;bctid=1589625246" onclick="javascript:pageTracker._trackPageview ('/outbound/www.internet.com');">http://www.internet.com/video/?bcpid=1431564240&amp;bclid=1433966034&amp;bctid=1589625246</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=Z9fufI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=Z9fufI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=D234Wi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=D234Wi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=d01Rwi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=d01Rwi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=5fkMYi"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=5fkMYi" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=0EvncI"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=0EvncI" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=qEWX6i"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=qEWX6i" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/308372740" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/06/09/new-webcast-creating-snippets-in-visual-studio/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/06/09/new-webcast-creating-snippets-in-visual-studio/</feedburner:origLink></item>
		<item>
		<title>REST Services and Metadata Endpoints in WCF</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/300605899/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/05/29/rest-services-and-metadata-endpoints-in-wcf/#comments</comments>
		<pubDate>Thu, 29 May 2008 13:21:15 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[REST]]></category>

		<category><![CDATA[Wcf]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/?p=231</guid>
		<description><![CDATA[As mentioned in a previous article, there is no defined a way to get metadata about REST based services using webHttpBinding.&#160; Since REST doesn&#8217;t use SOAP, there is no WSDL that defines the service and no built in way to generate metadata about it.&#160; REST operations return back POX or JSON or something else.&#160; 
You [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned in a <a href="http://www.danrigsby.com/blog/index.php/2008/05/27/wcf-metadata/">previous article</a>, there is no defined a way to get <a href="http://www.danrigsby.com/blog/index.php/2008/05/27/wcf-metadata/">metadata</a> about <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">REST</a> based services using <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.webhttpbinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">webHttpBinding</a>.&#160; Since REST doesn&#8217;t use <a href="http://en.wikipedia.org/wiki/Simple_Object_Access_Protocol" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">SOAP</a>, there is no <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">WSDL</a> that defines the service and no built in way to generate metadata about it.&#160; REST operations return back <a href="http://en.wikipedia.org/wiki/Plain_Old_XML" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">POX</a> or <a href="http://en.wikipedia.org/wiki/Json" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">JSON</a> or something else.&#160; </p>
<p>You can still create a <a href="http://msdn.microsoft.com/en-us/library/aa967390.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">mexHttpBinding</a> endpoint which can be used to represent the structure of the data that the REST service understands.&#160; You just cant really use this metadata to build a proxy client based on the REST interface. You don&#8217;t need any addition endpoints to expose the WSDL, having just a webHttpBinding endpoint is enough.&#160; You just need to enable httpGet on the serviceMetadata (see <a href="http://www.danrigsby.com/blog/index.php/2008/05/27/wcf-metadata/">here</a> for more detailed information on this):</p>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">&lt;</span><span style="color: #800000">serviceBehaviors</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">behavior</span> <span style="color: #ff0000">name</span><span style="color: #0000ff">=&quot;contactServiceBehavior&quot;</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">serviceMetadata</span> <span style="color: #ff0000">httpGetEnabled</span><span style="color: #0000ff">=&quot;true&quot;</span><span style="color: #0000ff">/&gt;</span>
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">behavior</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">serviceBehaviors</span><span style="color: #0000ff">&gt;</span></pre>
</div>
<p>One common tactic to give the REST service some kind of documentation, is to have a &quot;Documentation&quot; or &quot;Help&quot; method on your service that returns a an HTML page as a <a href="stream ">Stream</a> which describes how to work with the REST service (as seen in <a href="http://samples.netfx3.com/pictureservices/" onclick="javascript:pageTracker._trackPageview ('/outbound/samples.netfx3.com');">pictureservices</a>).&#160; This isn&#8217;t really metadata that can be consumed to generate a proxy class, but it is informative to other developers and consumers of your REST service.</p>
<h2>Example</h2>
<p>Lets look at an example of the &quot;Documentation&quot; method on a REST service.&#160; This example is based on a simple contact service that holds a collection of contacts.&#160; Some of the methods are AddContact, GetContact, UpdateContact, etc. The complete interface for the service is:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; padding-left: 4px; font-size: 8pt; border-top: gray 1px solid; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">using System.Collections.Generic;
using System.IO;
using System.ServiceModel;
using System.ServiceModel.Syndication;
using System.ServiceModel.Web;

namespace Rigsby.RestDocumentation
{
    [ServiceContract]
    public interface IContactService
    {
        [OperationContract]
        [WebGet(UriTemplate = &quot;help&quot;)]
        Stream GetDocumentation();

        [OperationContract]
        [WebGet(UriTemplate = &quot;contacts&quot;)]
        List<span style="color: #0000ff">&lt;</span><span style="color: #800000">Contact</span><span style="color: #0000ff">&gt;</span> GetAllContacts();

        [OperationContract]
        [WebGet(UriTemplate = &quot;contacts/feed?format={format}&quot;,
            BodyStyle = WebMessageBodyStyle.Bare)]
        [ServiceKnownType(typeof(Atom10FeedFormatter))]
        [ServiceKnownType(typeof(Rss20FeedFormatter))]
        SyndicationFeedFormatter GetContactsFeed(string format);

        [OperationContract]
        [WebGet(UriTemplate = &quot;contact/{contactId}&quot;)]
        Contact GetContact(string contactId);

        [OperationContract]
        [WebGet(UriTemplate = &quot;contact/name/{name}&quot;)]
        List<span style="color: #0000ff">&lt;</span><span style="color: #800000">Contact</span><span style="color: #0000ff">&gt;</span> GetContactByName(string name);

        [OperationContract]
        [WebGet(UriTemplate=&quot;contact/name/startswith/{startsWith}&quot;)]
        List<span style="color: #0000ff">&lt;</span><span style="color: #800000">Contact</span><span style="color: #0000ff">&gt;</span> GetContactsWhereNameStartsWith(string startsWith);

        [OperationContract]
        [WebGet(UriTemplate = &quot;contact/name/endsWith/{endsWith}&quot;)]
        List<span style="color: #0000ff">&lt;</span><span style="color: #800000">Contact</span><span style="color: #0000ff">&gt;</span> GetContactsWhereNameEndsWith(string endsWith);

        [OperationContract]
        [WebGet(UriTemplate = &quot;contact/name/contains/{contains}&quot;)]
        List<span style="color: #0000ff">&lt;</span><span style="color: #800000">Contact</span><span style="color: #0000ff">&gt;</span> GetContactsWhereNameContains(string contains);

        [OperationContract]
        [WebInvoke(Method = &quot;POST&quot;, UriTemplate = &quot;contact/{name}&quot;)]
        void AddContact(string name);

        [OperationContract(Name = &quot;AddFullContact&quot;)]
        [WebInvoke(Method = &quot;POST&quot;, UriTemplate = &quot;contact&quot;)]
        void AddContact(Contact contact);

        [OperationContract]
        [WebInvoke(Method=&quot;DELETE&quot;, UriTemplate = &quot;contact/{contactId}&quot;)]
        int DeleteContact(string contactId);

        [OperationContract]
        [WebInvoke(Method = &quot;PUT&quot;, UriTemplate = &quot;contact/{contactId}&quot;)]
        void UpdateContact(string contactId, Contact contact);
    }
}</pre>
</div>
<p>The operation to look at is &quot;GetDocumentation&quot;.&#160; This method returns a stream which will be the HTML of the documentation for the service.&#160; The UriTemplate we are using is just &quot;help&quot;, so the full path would just be something like &quot;http://localhost:8080/ContactService/help&quot;.</p>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">[OperationContract]
[WebGet(UriTemplate = <span style="color: #006080">&quot;help&quot;</span>)]
Stream GetDocumentation();</pre>
</div>
<div>&#160;</div>
<div>The implementation of this is pretty straight forward.&#160; We basically just create a new <a href="http://msdn.microsoft.com/en-us/library/system.io.streamwriter.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">StreamWriter</a>, write the contents of our HTML to it, set content type of the outgoing response to &quot;text/html&quot;, and return the stream:</div>
<div>&#160;</div>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">public</span> Stream GetDocumentation()
{
    MemoryStream stream = <span style="color: #0000ff">new</span> MemoryStream();

    StreamWriter writer = <span style="color: #0000ff">new</span> StreamWriter(stream, Encoding.UTF8);
    writer.Write(Properties.Resources.Documentation);
    writer.Flush();
    stream.Position = 0;

    WebOperationContext.Current.OutgoingResponse.ContentType = <span style="color: #006080">&quot;text/html&quot;</span>;

    <span style="color: #0000ff">return</span> stream;
}</pre>
</div>
<div>&#160;</div>
<div>When a user navigates to &quot;http://localhost:8080/ContactService/help&quot;, the following HTML page is displayed which documents how to use the REST interface:</div>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" border="0" alt="restdoc" src="http://www.danrigsby.com/blog/wp-content/uploads/2008/05/restdoc.gif" width="675" height="534" /></p>
<p>The HTML for this was manually hacked together, but you could write some process that looks at some custom attributes on the service to build this help file:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; padding-left: 4px; font-size: 8pt; border-top: gray 1px solid; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">&lt;!</span><span style="color: #800000">DOCTYPE</span> <span style="color: #ff0000">html</span> <span style="color: #ff0000">PUBLIC</span> <span style="color: #0000ff">&quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;</span> <span style="color: #0000ff">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">html</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;http://www.w3.org/1999/xhtml&quot;</span> <span style="color: #ff0000">xml:lang</span><span style="color: #0000ff">=&quot;en-US&quot;</span> <span style="color: #ff0000">lang</span><span style="color: #0000ff">=&quot;en-US&quot;</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span>Contact Service - Documentation<span style="color: #0000ff">&lt;/</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">meta</span> <span style="color: #ff0000">http-equiv</span><span style="color: #0000ff">=&quot;Content-Type&quot;</span> <span style="color: #ff0000">content</span><span style="color: #0000ff">=&quot;text/html; charset=utf-8&quot;</span> <span style="color: #0000ff">/&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">style</span> <span style="color: #ff0000">type</span><span style="color: #0000ff">=&quot;text/css&quot;</span><span style="color: #0000ff">&gt;</span>
        body {margin: 0px;padding: 0px;font-family: Calibri, Tahoma, Arial;}
        .banner {padding: 5px 5px 5px 15px;background-color: Gray;color: White;}
        .content {margin: 15px;}
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">style</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;banner&quot;</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">h1</span><span style="color: #0000ff">&gt;</span>Contact Service<span style="color: #0000ff">&lt;/</span><span style="color: #800000">h1</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;content&quot;</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">h2</span><span style="color: #0000ff">&gt;</span>Available Feeds<span style="color: #0000ff">&lt;/</span><span style="color: #800000">h2</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">ul</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /contacts/feed?format={format}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Returns a feed of all contacts as &quot;rss&quot; or &quot;atom&quot;<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ul</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">h2</span><span style="color: #0000ff">&gt;</span>Available Endpoints<span style="color: #0000ff">&lt;/</span><span style="color: #800000">h2</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;</span><span style="color: #800000">ul</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /help<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Displays the service documentation<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /contacts<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Returns all contacts<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /contact/{contactId}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Returns a contact by contactId<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /contact/name/{name}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Returns all contacts with the specified name<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /contact/name/startswith/{startswith}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Returns all contacts whose name starts with the specified string<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /contact/name/endsWith/{endsWith}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Returns all contacts whose name ends with the specified string<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>GET /contact/name/contains/{contains}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Returns all contacts whose name contains the specified string<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>

            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>POST /contact/{name}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Adds a new contact with the specified name (ignores POST data)<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>POST /contact<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Adds a new contact with the POST data<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>DELETE /contact/{contactId}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Deletes a contact by contactId<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span>PUT /contact/{contactId}<span style="color: #0000ff">&lt;/</span><span style="color: #800000">b</span><span style="color: #0000ff">&gt;</span> <span style="color: #ff0000">&amp;mdash;</span> Updates a contact by contactId<span style="color: #0000ff">&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>
        <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ul</span><span style="color: #0000ff">&gt;</span>
    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span>
<span style="color: #0000ff">&lt;/</span><span style="color: #800000">html</span><span style="color: #0000ff">&gt;</span></pre>
</div>
<p>You can download a complete sample of the code discussed in this article here: <a href="http://www.danrigsby.com/Files/Rigsby.RestDocumentation.zip" onclick="javascript:pageTracker._trackPageview ('/downloads/zip/rigsby.restdocumentation.zip');">http://www.danrigsby.com/Files/Rigsby.RestDocumentation.zip</a></p>
</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.danrigsby.com%2fblog%2findex.php%2f2008%2f05%2f29%2frest-services-and-metadata-endpoints-in-wcf%2f" onclick="javascript:pageTracker._trackPageview ('/outbound/www.dotnetkicks.com');"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.danrigsby.com%2fblog%2findex.php%2f2008%2f05%2f29%2frest-services-and-metadata-endpoints-in-wcf%2f&amp;bgcolor=FF9900" border="0" alt="kick it on DotNetKicks.com" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=W4cI4H"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=W4cI4H" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=7I6vXh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=7I6vXh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=dM0mih"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=dM0mih" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=G1paYh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=G1paYh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=Al9SQH"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=Al9SQH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=VkOqoh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=VkOqoh" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/300605899" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/05/29/rest-services-and-metadata-endpoints-in-wcf/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/05/29/rest-services-and-metadata-endpoints-in-wcf/</feedburner:origLink></item>
		<item>
		<title>JavaScriptSerializer Undeprecated in .NET 3.5 SP1</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/299845310/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/05/28/javascriptserializer-undeprecated-in-net-35-sp1/#comments</comments>
		<pubDate>Wed, 28 May 2008 13:29:33 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[.Net]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/?p=229</guid>
		<description><![CDATA[According to Scott Guthrie (see comments in this post) it appears that the JavaScriptSerializer will be undeprecated in .NET 3.5 SP1.&#160; In was deprecated in .Net 3.5 and the DataContractJsonSerializer replaced it.&#160; Each of these serializers serializes to Json and each have their pluses and minuses:

JavaScriptSerializer supports anonymous types.
JavaScriptSerializer works with plain strings so it [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://weblogs.asp.net/scottgu" onclick="javascript:pageTracker._trackPageview ('/outbound/weblogs.asp.net');">Scott Guthrie</a> (<a href="http://www.aaronlerch.com/blog/2008/05/27/first-thoughts-on-aspnet-mvc-preview-3/#comments" onclick="javascript:pageTracker._trackPageview ('/outbound/www.aaronlerch.com');">see comments in this post</a>) it appears that the <a href="http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">JavaScriptSerializer</a> will be undeprecated in .NET 3.5 SP1.&#160; In was deprecated in .Net 3.5 and the <a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">DataContractJsonSerializer</a> replaced it.&#160; Each of these serializers serializes to Json and each have their pluses and minuses:</p>
<ul>
<li>JavaScriptSerializer supports anonymous types.</li>
<li>JavaScriptSerializer works with plain strings so it can be easier to use.</li>
<li>DataContractJsonSerializer can serialize DateTimes into UTC format.&#160;&#160; Very important over the web!</li>
</ul>
<p>I guess the big question I have is, do we really need both? Isn&#8217;t there a way to combine these into one serializer? </p>
<p>What about the act of undeprecating a class?&#160; Do you think this is a good thing?</p>
<p><em>See these links for more information about the DataContractJsonSerializer:</em></p>
<ul>
<li><a href="http://www.west-wind.com/WebLog/posts/218001.aspx" title="http://www.west-wind.com/WebLog/posts/218001.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/www.west-wind.com');">http://www.west-wind.com/WebLog/posts/218001.aspx</a></li>
<li><a href="http://pietschsoft.com/post/2008/02/NET-35-JSON-Serialization-using-the-DataContractJsonSerializer.aspx" title="http://pietschsoft.com/post/2008/02/NET-35-JSON-Serialization-using-the-DataContractJsonSerializer.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/pietschsoft.com');">http://pietschsoft.com/post/2008/02/NET-35-JSON-Serialization-using-the-DataContractJsonSerializer.aspx</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=qwV9qH"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=qwV9qH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=a0eiFh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=a0eiFh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=O5WqKh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=O5WqKh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=k1EQ7h"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=k1EQ7h" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=wL2iTH"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=wL2iTH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=V1iSzh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=V1iSzh" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/299845310" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/05/28/javascriptserializer-undeprecated-in-net-35-sp1/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/05/28/javascriptserializer-undeprecated-in-net-35-sp1/</feedburner:origLink></item>
		<item>
		<title>WCF Metadata</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/299804083/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/05/27/wcf-metadata/#comments</comments>
		<pubDate>Tue, 27 May 2008 12:18:45 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[Wcf]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/?p=227</guid>
		<description><![CDATA[The WCF team has gone to great lengths to ensure that it doesn&#8217;t tie itself down to a single service architecture or naming. This can be best demonstrated by how WCF refers to its metadata. Most users will think of this metadata as WSDL. And in WCF today, it is WSDL. However, what will WSDL [...]]]></description>
			<content:encoded><![CDATA[<p>The WCF team has gone to great lengths to ensure that it doesn&#8217;t tie itself down to a single service architecture or naming. This can be best demonstrated by how WCF refers to its metadata. Most users will think of this metadata as <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">WSDL</a>. And in WCF today, it is WSDL. However, what will WSDL be in 5 years? What happens when something better comes along? Or what if we want some metadata for <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">REST</a> which doesn&#8217;t use <a href="http://en.wikipedia.org/wiki/Simple_Object_Access_Protocol" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">SOAP</a>? Instead, it is just called <a href="http://msdn.microsoft.com/en-us/library/ms730243.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">Metadata</a>.</p>
<p>So what is the this metadata?&#160; Metadata is basically to describe how to interact with the service&#8217;s endpoints.&#160; This includes metadata about:</p>
<ol>
<li>The operations a service can perform </li>
<li>The structure of the data types that the operations work with or return </li>
<li>Definitions of all the endpoints implemented by the service and the various options needed for each such as security </li>
</ol>
<p>By default service metadata is turned off.&#160; This has been a problem for some people because you have to manually configure the service to publish the metadata.&#160; This is by design because metadata can expose parts of your service you don&#8217;t want to expose.&#160; Many services out in the wild do not want to publish metadata at all.&#160; Personally, I am a bit torn about this.&#160; Part of me understands why they implemented it this way, but the more common use is to expose metadata always.&#160; It seems that the default should be metadata on, with the option to turn metadata off for the more rare occasions.&#160; However, the WCF team really wanted it to be &quot;secure by default&quot;, which means it needed to be turned off.&#160; This can throw off classic WebService developers because in ASMX you needed to <em>opt-out</em> of exposing metadata, while WCF requires<em> opt-in</em> of exposing metadata.</p>
<p>The metadata can be used to generate proxy classes with <a href="http://msdn.microsoft.com/en-us/library/aa347733.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">svcutil.exe</a>, &quot;<a href="http://msdn.microsoft.com/en-us/library/bb386382.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">Add Service Reference</a>&quot; in Visual Studio, <a href="http://msdn.microsoft.com/en-us/library/bb552364.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">wcftestclient.exe</a>, or any other program that can interpret the metadata and build proxies.&#160; This data can also by used to pull out specific information about a service such as its&#8217; endpoints, or simply just for reference information about the service.</p>
<h2>Exposing Metadata</h2>
<p>To expose metadata you need to turn on the serviceMetaData property in the service behavior that the service is implementing.&#160; This can be done declaratively through the xml config files, or programmatically directly in your code:</p>
<h3>Declaratively</h3>
<p>The minimum you need is to add the serviceMetaData node to the serviceBehavior being used by the service:</p>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;serviceBehaviors&gt;
  &lt;behavior name = <span style="color: #006080">&quot;MetadataBehavior&quot;</span>&gt;
    &lt;serviceMetadata /&gt;
  &lt;/behavior&gt;
&lt;/serviceBehaviors&gt;</pre>
</div>
<div>&#160;</div>
<div>In a full configuration file this may look like something like this:</div>
<div>&#160;</div>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;?xml version=<span style="color: #006080">&quot;1.0&quot;</span> encoding=<span style="color: #006080">&quot;utf-8&quot;</span> ?&gt;
&lt;configuration&gt;
  &lt;system.serviceModel&gt;
    &lt;behaviors&gt;
      &lt;serviceBehaviors&gt;
        &lt;behavior name = <span style="color: #006080">&quot;MetadataBehavior&quot;</span>&gt;
         <strong>&lt;serviceMetadata httpGetEnabled = <span style="color: #006080">&quot;true&quot;</span>/&gt;</strong>
        &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;
    &lt;services&gt;
      &lt;service name = <span style="color: #006080">&quot;MyService&quot;</span>
               behaviorConfiguration = <span style="color: #006080">&quot;MetadataBehavior&quot;</span>&gt;
        &lt;host&gt;
          &lt;baseAddresses&gt;
            &lt;add baseAddress =
                 <span style="color: #006080">&quot;http://localhost:8080/MyService&quot;</span>
                 <span style="color: #006080">&quot;net.tcp://localhost:9000/MyService&quot;</span>/&gt;
          &lt;/baseAddresses&gt;
        &lt;/host&gt;
        &lt;endpoint address = <span style="color: #006080">&quot;&quot;</span>
                  binding = <span style="color: #006080">&quot;wsHttpBinding&quot;</span>
                  contract = <span style="color: #006080">&quot;IMyService&quot;</span>/&gt;
        &lt;endpoint address = <span style="color: #006080">&quot;&quot;</span>
                  binding = <span style="color: #006080">&quot;netTcpBinding&quot;</span>
                  contract = <span style="color: #006080">&quot;IMyService&quot;</span>/&gt;
        &lt;endpoint address = <span style="color: #006080">&quot;net.tcp://localhost:9000/MyService/mex&quot;</span>
                  binding = <span style="color: #006080">&quot;mexTcpBinding&quot;</span>
                  contract = <span style="color: #006080">&quot;IMetadataExchange&quot;</span>/&gt;
      &lt;/service&gt;
    &lt;/services&gt;
  &lt;/system.serviceModel&gt;
&lt;/configuration&gt;</pre>
</div>
<h3>Programmatically</h3>
<p>Adding this in code is similar.&#160; You need to add a <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">ServiceMetadataBehavior</a> object to the behaviors of the <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.servicehost.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">serviceHost</a>:</p>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">ServiceHost host = <span style="color: #0000ff">new</span> ServiceHost(
    <span style="color: #0000ff">typeof</span>(MyService),
    <span style="color: #0000ff">new</span> Uri(<span style="color: #006080">&quot;http://localhost:8080/MyService&quot;</span>),
    <span style="color: #0000ff">new</span> Uri(<span style="color: #006080">&quot;net.tcp://localhost:9000/MyService&quot;</span>));

host.AddServiceEndpoint(
    <span style="color: #0000ff">typeof</span>(IMyService),
    <span style="color: #0000ff">new</span> WSHttpBinding(),
    <span style="color: #006080">&quot;&quot;</span>);
host.AddServiceEndpoint(
    <span style="color: #0000ff">typeof</span>(IMyService),
    <span style="color: #0000ff">new</span> NetTcpBinding(),
    <span style="color: #006080">&quot;&quot;</span>);
Binding mexBinding = MetadataExchangeBindings.CreateMexTcpBinding();
host.AddServiceEndpoint(
    <span style="color: #0000ff">typeof</span>(IMetadataExchange),
    mexBinding,
    <span style="color: #006080">&quot;net.tcp://localhost:9000/MyService/mex&quot;</span>);

ServiceMetadataBehavior metadataBehavior =
    <span style="color: #0000ff">new</span> ServiceMetadataBehavior();
metadataBehavior.HttpGetEnabled = <span style="color: #0000ff">true</span>;
host.Description.Behaviors.Add(metadataBehavior);</pre>
</div>
<p>&#160;</p>
<p>Enabling the serviceMetaData property is enough to expose metadata through all binding types except http and https.&#160; For these you have to specify &quot;HttpGetEnabled=true&quot; or &quot;HttpsGetEnabled=true&quot; depending on if you are using http or https.&#160; You must expose at least one endpoint for http or https and declare a base address or you will get a runtime exception with HttpGetEnabled or HttpsGetEnabled enabled.</p>
<p>Http and Https can expose metadata simply by appending &quot;?wsdl&quot; to the end of the base address.&#160; For any binding type, you need to specify a metadata binding endpoint to retrieve the metadata from.&#160; This is done by creating an endpoint that uses the <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">IMetadataExchange</a> interface, a corresponding &quot;mex&quot; binding for the transport (more on this later), and the address where the metadata published.&#160; You can also use an IMetadataExchange address for http and https as well, but normally the &quot;?wsdl&quot; site is enough.</p>
<p>There are a few properties of ServiceMetadata:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.externalmetadatalocation.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');"><strong>ExternalMetadataLocation</strong></a>: A Uri that contains the location of a WSDL file, which is returned to the user in response to WSDL and MEX requests instead of the auto-generated WSDL. When this attribute is not set, the default WSDL is returned. The default is an empty string. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.httpgetenabled.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');"><strong>HttpGetEnabled</strong></a>: A Boolean value that specifies whether to publish service metadata for retrieval using an HTTP/Get request. The default is false. If the httpGetUrl attribute is not specified, the address at which the metadata is published is the service address plus a &quot;?wsdl&quot;. For example, if the service address is &quot;http://localhost:8080/MyService&quot;, the HTTP/Get metadata address is &quot;http://localhost:8080/MyService?wsdl&quot;. If this property is false, or the address of the service is not based on HTTP or HTTPS, &#8220;?wsdl&#8221; is ignored. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.httpgeturl.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');"><strong>HttpGetUrl</strong></a>: A Uri that specifies the address at which the metadata is published for retrieval using an HTTP/Get request. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.httpsgetenabled.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');"><strong>HttpsGetEnabled</strong></a>: A Boolean value that specifies whether to publish service metadata for retrieval using an HTTPS/Get request. The default is false. If the httpsGetUrl attribute is not specified, the address at which the metadata is published is the service address plus a &quot;?wsdl&quot;. For example, if the service address is https://localhost:8080/MyService, the HTTP/Get metadata address is &quot;https://localhost:8080/MyService?wsdl&quot;. If this property is false, or the address of the service is not based on HTTP or HTTPS, &#8220;?wsdl&#8221; is ignored. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.servicemetadatabehavior.httpsgeturl.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');"><strong>HttpsGetUrl</strong></a>: A Uri that specifies the address at which the metadata is published for retrieval using an HTTPS/Get request. </li>
</ul>
<h2>Metadata Exchange Endpoint</h2>
<p>A metadata exchange endpoint is an endpoint that returns back the metadata about the service. You can have as many metadata exchange endpoints as you want. You could have one for each service endpoint, one that all endpoints share, or 100s that just return the same data.&#160; Usually one metadata endpoint is sufficient, but it is common to see one for each service endpoint as well. </p>
<p>Like all endpoints it is comprised of the ABCs: Address, Binding, and Contract:</p>
<h3>Address</h3>
<p>The address is just the Uri that the endpoint can be can found.&#160; In a metdata exchange endpoint this is commonly done by appending &quot;mex&quot; to the base address such as &quot;net.tcp://localhost/MyService/mex&quot;, but you can use whatever address you choose.</p>
<h3>Binding</h3>
<p>There are only 4 bindings that are defined to be used as a metadata endpoint:</p>
<ol>
<li><a href="http://msdn.microsoft.com/en-us/library/aa967390.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">mexHttpBinding</a>: Specifies the settings for a binding used for the WS-MetadataExchange (WS-MEX) message exchange over HTTP. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa967391.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">mexHttpsBinding</a>: Specifies the settings for a binding used for the WS-MetadataExchange (WS-MEX) message exchange over HTTPS. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa967280.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">mexNamedPipesBinding</a>: Specifies the settings for a binding used for the WS-MetadataExchange (WS-MEX) message exchange over named pipe. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/aa967279.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">mexTcpBinding</a>: Specifies the settings for a binding used for the WS-MetadataExchange (WS-MEX) message exchange over TCP </li>
</ol>
<p>You can use any of these in the configuration file to define metadata endpoints, such as:</p>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&lt;endpoint address = <span style="color: #006080">&quot;net.tcp://localhost:9000/MyService/mex&quot;</span>
    binding = <span style="color: #006080">&quot;mexTcpBinding&quot;</span>
    contract = <span style="color: #006080">&quot;IMetadataExchange&quot;</span>/&gt;</pre>
</div>
<p>In code however, these bindings must be created through the static <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.metadataexchangebindings.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">MetadataExchangeBindings</a> class.&#160; It has the following 4 methods:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.metadataexchangebindings.createmexhttpbinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">CreateMexHttpBinding</a>: Returns a <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.wshttpbinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">System.ServiceModel.WSHttpBinding</a> with security disabled. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.metadataexchangebindings.createmexhttpsbinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">CreateMexHttpsBinding</a>: Returns a <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.wshttpbinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">System.ServiceModel.WSHttpBinding</a> that supports transport-level security. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.metadataexchangebindings.createmexnamedpipebinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">CreateMexNamedPipeBinding</a>: Returns a <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.custombinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">System.ServiceModel.Channels.CustomBinding</a> with a <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.namedpipetransportbindingelement.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">System.ServiceModel.Channels.NamedPipeTransportBindingElement</a>. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.metadataexchangebindings.createmextcpbinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">CreateMexTcpBinding</a>: Returns a <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.custombinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">System.ServiceModel.Channels.CustomBinding</a> with a <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.channels.tcptransportbindingelement.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">System.ServiceModel.Channels.TcpTransportBindingElement</a>. </li>
</ul>
<p>You can use any of these methods in your code go generate the bindings for the corresponding transport, such as:</p>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">Binding mexBinding = MetadataExchangeBindings.CreateMexTcpBinding();
host.AddServiceEndpoint(
    <span style="color: #0000ff">typeof</span>(IMetadataExchange),
    mexBinding,
    <span style="color: #006080">&quot;net.tcp://localhost:9000/MyService/mex&quot;</span>);</pre>
</div>
<h3>Contract</h3>
<p>A contract is just an interface that the endpoint must follow. So, what is this <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">IMetadataExchange</a> interface?&#160; It only has 3 methods:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange.beginget.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">BeginGet</a>: Starts an asynchronous retrieval of metadata. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange.endget.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">EndGet</a>: Concludes the retrieval of metadata. </li>
<li><a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.imetadataexchange.get.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">Get</a>: Returns the service metadata </li>
</ul>
<p>Since BeginGet and EndGet are just an asynchronous version of Get, what does Get do?&#160; Well, as you may have guessed, it just returns the metadata for the service.</p>
<h2>REST and webHttpBinding</h2>
<p>So what about REST based services using <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.webhttpbinding.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">webHttpBinding</a>?&#160; No where is there defined a way to get metadata about it.&#160; Well, since it is REST, there is no WSDL that defines the service and no built in way to generate metadata about it.&#160; One common tactic is to have a &quot;Documentation&quot; method on your service that returns a stream of data that is an HTML page which describes how to work with the REST service.&#160; This isn&#8217;t really metadata that can be consumed to generate a proxy class, but it is informative to other developers and consumers of your REST services.</p>
</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.danrigsby.com%2fblog%2findex.php%2f2008%2f05%2f27%2fwcf-metadata%2f" onclick="javascript:pageTracker._trackPageview ('/outbound/www.dotnetkicks.com');"><img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.danrigsby.com%2fblog%2findex.php%2f2008%2f05%2f27%2fwcf-metadata%2f&amp;bgcolor=FF9900" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=ZjhCAH"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=ZjhCAH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=skDvoh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=skDvoh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=2zo81h"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=2zo81h" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=Hig27h"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=Hig27h" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=6VmHrH"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=6VmHrH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=DnzJch"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=DnzJch" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/299804083" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/05/27/wcf-metadata/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/05/27/wcf-metadata/</feedburner:origLink></item>
		<item>
		<title>Remove Icon from WPF Window</title>
		<link>http://feeds.feedburner.com/~r/DanRigsby/~3/299211382/</link>
		<comments>http://www.danrigsby.com/blog/index.php/2008/05/26/remove-icon-from-wpf-window/#comments</comments>
		<pubDate>Mon, 26 May 2008 17:07:55 +0000</pubDate>
		<dc:creator>Dan Rigsby</dc:creator>
		
		<category><![CDATA[Common Libraries]]></category>

		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.danrigsby.com/blog/index.php/2008/05/26/remove-icon-from-wpf-window/</guid>
		<description><![CDATA[In general, a window should always have an icon because it helps give context to the window.&#160; However, there are occasions when you may want a window with icon such as a custom tool window or some other dialog. In Windows Forms if you want a window without an icon, you could just simply set:
&#160;

this.ShowIcon [...]]]></description>
			<content:encoded><![CDATA[<div>In general, a window should always have an icon because it helps give context to the window.&#160; However, there are occasions when you may want a window with icon such as a custom tool window or some other dialog. In Windows Forms if you want a window without an icon, you could just simply set:</div>
<div>&#160;</div>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">this</span>.ShowIcon = <span style="color: #0000ff">false;</span></pre>
</div>
<div>&#160;</div>
<div>In WPF, there is no simple way to just remove the icon.&#160; If you try to just set the Icon to null, it will display the default windows icon.&#160; The only way to disable the icon is to use some interop code to remove the icon directly through the windows API:</div>
<div>&#160;</div>
<div>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">using</span> System;
<span style="color: #0000ff">using</span> System.Windows;
<span style="color: #0000ff">using</span> System.Windows.Interop;
<span style="color: #0000ff">using</span> System.Runtime.InteropServices;

<span style="color: #0000ff">public</span> <span style="color: #0000ff">partial</span> <span style="color: #0000ff">class</span> WindowWithoutIcon : Window
{
    [DllImport(<span style="color: #006080">&quot;user32.dll&quot;</span>)]
    <span style="color: #0000ff">static</span> <span style="color: #0000ff">extern</span> <span style="color: #0000ff">int</span> GetWindowLong(IntPtr hwnd, <span style="color: #0000ff">int</span> index);

    [DllImport(<span style="color: #006080">&quot;user32.dll&quot;</span>)]
    <span style="color: #0000ff">static</span> <span style="color: #0000ff">extern</span> <span style="color: #0000ff">int</span> SetWindowLong(IntPtr hwnd, <span style="color: #0000ff">int</span> index, <span style="color: #0000ff">int</span> newStyle);

    [DllImport(<span style="color: #006080">&quot;user32.dll&quot;</span>)]
    <span style="color: #0000ff">static</span> <span style="color: #0000ff">extern</span> <span style="color: #0000ff">bool</span> SetWindowPos(IntPtr hwnd, IntPtr hwndInsertAfter, <span style="color: #0000ff">int</span> x, <span style="color: #0000ff">int</span> y, <span style="color: #0000ff">int</span> width, <span style="color: #0000ff">int</span> height, <span style="color: #0000ff">uint</span> flags);

    [DllImport(<span style="color: #006080">&quot;user32.dll&quot;</span>)]
    <span style="color: #0000ff">static</span> <span style="color: #0000ff">extern</span> IntPtr SendMessage(IntPtr hwnd, <span style="color: #0000ff">uint</span> msg, IntPtr wParam, IntPtr lParam);

    <span style="color: #0000ff">const</span> <span style="color: #0000ff">int</span> GWL_EXSTYLE = -20;
    <span style="color: #0000ff">const</span> <span style="color: #0000ff">int</span> WS_EX_DLGMODALFRAME = 0&#215;0001;
    <span style="color: #0000ff">const</span> <span style="color: #0000ff">int</span> SWP_NOSIZE = 0&#215;0001;
    <span style="color: #0000ff">const</span> <span style="color: #0000ff">int</span> SWP_NOMOVE = 0&#215;0002;
    <span style="color: #0000ff">const</span> <span style="color: #0000ff">int</span> SWP_NOZORDER = 0&#215;0004;
    <span style="color: #0000ff">const</span> <span style="color: #0000ff">int</span> SWP_FRAMECHANGED = 0&#215;0020;
    <span style="color: #0000ff">const</span> <span style="color: #0000ff">uint</span> WM_SETICON = 0&#215;0080;

    <span style="color: #0000ff">public</span> MainWindow()
    {
        InitializeComponent();
    }

    <span style="color: #0000ff">protected</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">void</span> OnSourceInitialized(EventArgs e)
    {
        <span style="color: #0000ff">base</span>.OnSourceInitialized(e);

        <span style="color: #008000">// Get this window&#8217;s handle</span>
        IntPtr hwnd = <span style="color: #0000ff">new</span> WindowInteropHelper(<span style="color: #0000ff">this</span>).Handle;

        <span style="color: #008000">// Change the extended window style to not show a window icon</span>
        <span style="color: #0000ff">int</span> extendedStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
        SetWindowLong(hwnd, GWL_EXSTYLE, extendedStyle | WS_EX_DLGMODALFRAME);

        <span style="color: #008000">// Update the window&#8217;s non-client area to reflect the changes</span>
        SetWindowPos(hwnd, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
    }
}</pre>
</div>
<div>&#160;</div>
<div><em>Source derived from: </em><a href="http://blogs.msdn.com/wpfsdk/archive/2007/08/02/a-wpf-window-without-an-window-icon-the-thing-you-click-to-get-the-system-menu.aspx" title="http://blogs.msdn.com/wpfsdk/archive/2007/08/02/a-wpf-window-without-an-window-icon-the-thing-you-click-to-get-the-system-menu.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/blogs.msdn.com');"><em>http://blogs.msdn.com/wpfsdk/archive/2007/08/02/a-wpf-window-without-an-window-icon-the-thing-you-click-to-get-the-system-menu.aspx</em></a></div>
<div>&#160;</div>
<div></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/DanRigsby?a=51FcaH"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=51FcaH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=11zNPh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=11zNPh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=9yHDkh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=9yHDkh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=4TnNrh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=4TnNrh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=N8bsfH"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=N8bsfH" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/DanRigsby?a=NdL2Sh"><img src="http://feeds.feedburner.com/~f/DanRigsby?i=NdL2Sh" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/DanRigsby/~4/299211382" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.danrigsby.com/blog/index.php/2008/05/26/remove-icon-from-wpf-window/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.danrigsby.com/blog/index.php/2008/05/26/remove-icon-from-wpf-window/</feedburner:origLink></item>
	</channel>
</rss>
