<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Infovark Underground &#187; HTML</title>
	<atom:link href="http://underground.infovark.com/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://underground.infovark.com</link>
	<description>The Infovark technology blog</description>
	<lastBuildDate>Thu, 12 May 2011 16:32:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Introducing the SparkServer Project</title>
		<link>http://underground.infovark.com/2009/12/18/introducing-the-sparkserver-project/</link>
		<comments>http://underground.infovark.com/2009/12/18/introducing-the-sparkserver-project/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 15:27:17 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C# WebServer]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Spark View Engine]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=554</guid>
		<description><![CDATA[It&#8217;s less than two weeks since I began my experiment using the Spark View Engine with C# WebServer. Even though it&#8217;s put a kink in our development schedule, I&#8217;m confident it was the right move. It&#8217;ll save us a lot of time in the long run. After posting messages to the Spark project and C# [...]


Related posts:<ol><li><a href='http://underground.infovark.com/2009/12/09/using-spark-view-engine-with-c-webserver/' rel='bookmark' title='Using Spark View Engine with C# WebServer'>Using Spark View Engine with C# WebServer</a></li>
<li><a href='http://underground.infovark.com/2010/01/15/support-the-jquery-project/' rel='bookmark' title='Support the JQuery Project'>Support the JQuery Project</a></li>
<li><a href='http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/' rel='bookmark' title='Looking for an IIS Alternative'>Looking for an IIS Alternative</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s less than two weeks since I began my experiment <a href="http://underground.infovark.com/2009/12/09/using-spark-view-engine-with-c-webserver/">using the Spark View Engine with C# WebServer</a>. Even though it&#8217;s put a kink in our development schedule, I&#8217;m confident it was the right move. It&#8217;ll save us a lot of time in the long run.</p>
<p>After posting messages to the Spark project and C# WebServer project forums, I decided there was enough interest to make sharing my integration code worthwhile.</p>
<p>You can find it at: <a href="http://code.google.com/p/sparkserver/">http://code.google.com/p/sparkserver/</a></p>
<p>If you&#8217;d like to participate in the project, please let me know. Comments, suggestions, and <em>especially</em> fixes are always welcome! </p>


<p>Related posts:<ol><li><a href='http://underground.infovark.com/2009/12/09/using-spark-view-engine-with-c-webserver/' rel='bookmark' title='Using Spark View Engine with C# WebServer'>Using Spark View Engine with C# WebServer</a></li>
<li><a href='http://underground.infovark.com/2010/01/15/support-the-jquery-project/' rel='bookmark' title='Support the JQuery Project'>Support the JQuery Project</a></li>
<li><a href='http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/' rel='bookmark' title='Looking for an IIS Alternative'>Looking for an IIS Alternative</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/12/18/introducing-the-sparkserver-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better ways to Encode HTML in C#</title>
		<link>http://underground.infovark.com/2009/12/11/better-ways-to-encode-html-in-c/</link>
		<comments>http://underground.infovark.com/2009/12/11/better-ways-to-encode-html-in-c/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 14:30:26 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[URI]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=547</guid>
		<description><![CDATA[Microsoft provides lots of different ways to encode HTML and URIs, but their newest library, called AntiXSS, is the best of the bunch.


Related posts:<ol><li><a href='http://underground.infovark.com/2009/02/18/using-wcf-to-return-html/' rel='bookmark' title='Using WCF to return HTML'>Using WCF to return HTML</a></li>
<li><a href='http://underground.infovark.com/2009/01/14/jquery-turns-3/' rel='bookmark' title='JQuery Turns 3'>JQuery Turns 3</a></li>
<li><a href='http://underground.infovark.com/2010/12/30/how-to-format-the-xaml-hyperlink-navigateuri/' rel='bookmark' title='How to format the XAML Hyperlink NavigateUri'>How to format the XAML Hyperlink NavigateUri</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Our move from Windows Communication Foundation to C# WebServer once again raised the difficult question of <a href="http://en.wikipedia.org/wiki/HTML_encoding">HTML character encoding</a>. </p>
<p>Since we&#8217;re not using Microsoft IIS, we wanted to avoid a dependency on System.Web, which has the popular but flawed <code>HttpUtility.HtmlEncode()</code> method.</p>
<p>In my research, I discovered Rick Strahl&#8217;s post about <a href="http://www.west-wind.com/Weblog/posts/617930.aspx">Html and Uri String Encoding without System.Web</a>. He points out the problems and inconsistencies in the mainstream encoding methods available in the .NET framework, and ultimately decided to roll his own encoding method.</p>
<p>But in this StackOverflow question on <a href="http://stackoverflow.com/questions/1631819/htmlencode-in-c">HTML Encoding in C#</a>, several folks suggested using Microsoft&#8217;s <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">anti-cross-site scripting</a> library, <a href="http://www.codeplex.com/AntiXSS">AntiXSS</a>.</p>
<p>After spending some time working with the library, it seems like just the thing to solve the problem of web encoding.</p>
<p>The AntiXSS Library includes helpful methods for encoding HTML, URLs, JavaScript, and XML. It&#8217;s based on a secure <a href="http://en.wiktionary.org/wiki/whitelist">whitelist</a> model, so anything not allowed in the specifications is prohibited. </p>
<p>Microsoft has made the source of AntiXSS 3.1 available on Codeplex (http://antixss.codeplex.com/), but you can also get the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=051ee83c-5ccf-48ed-8463-02f56a6bfc09&#038;displaylang=en">official release of AntiXSS</a> direct from Microsoft. It includes a sample application and thorough documentation. </p>
<p>It&#8217;s <em>exactly</em> the solution I was looking for. </p>


<p>Related posts:<ol><li><a href='http://underground.infovark.com/2009/02/18/using-wcf-to-return-html/' rel='bookmark' title='Using WCF to return HTML'>Using WCF to return HTML</a></li>
<li><a href='http://underground.infovark.com/2009/01/14/jquery-turns-3/' rel='bookmark' title='JQuery Turns 3'>JQuery Turns 3</a></li>
<li><a href='http://underground.infovark.com/2010/12/30/how-to-format-the-xaml-hyperlink-navigateuri/' rel='bookmark' title='How to format the XAML Hyperlink NavigateUri'>How to format the XAML Hyperlink NavigateUri</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/12/11/better-ways-to-encode-html-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Spark View Engine with C# WebServer</title>
		<link>http://underground.infovark.com/2009/12/09/using-spark-view-engine-with-c-webserver/</link>
		<comments>http://underground.infovark.com/2009/12/09/using-spark-view-engine-with-c-webserver/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 21:40:26 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C# WebServer]]></category>
		<category><![CDATA[Spark View Engine]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=540</guid>
		<description><![CDATA[I mentioned that we were looking for an IIS alternative that we could embed within our Infovark client installation. After weighing the options, we decided to move forward with the C# WebServer. Instead of using one of the two rendering engines currently included in the WebServer project, though, we&#8217;ve decided to use the Spark View [...]


Related posts:<ol><li><a href='http://underground.infovark.com/2010/01/05/3-useful-visual-studio-tricks-for-spark-templates/' rel='bookmark' title='3 Useful Visual Studio Tricks for Spark Templates'>3 Useful Visual Studio Tricks for Spark Templates</a></li>
<li><a href='http://underground.infovark.com/2009/12/18/introducing-the-sparkserver-project/' rel='bookmark' title='Introducing the SparkServer Project'>Introducing the SparkServer Project</a></li>
<li><a href='http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/' rel='bookmark' title='Looking for an IIS Alternative'>Looking for an IIS Alternative</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I mentioned that we were <a href="http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/">looking for an IIS alternative</a> that we could embed within our Infovark client installation. </p>
<p>After weighing the options, we decided to move forward with the <a href="http://www.codeplex.com/webserver">C# WebServer</a>. Instead of using one of the two rendering engines currently included in the WebServer project, though, we&#8217;ve decided to use the <a href="http://sparkviewengine.com/">Spark View Engine</a> instead.</p>
<p>Spark has a clean template syntax that makes HTML tags stand out. It also has the most sensible design for creating master layout templates I&#8217;ve seen. I think it&#8217;ll be fairly straightforward to convert our existing XSLT templates into Spark syntax. </p>
<p>Integrating Spark with the C# WebServer will be a challenge, though. Much of the existing Spark documentation assumes you&#8217;ll be using the Spark.Web.Mvc classes. Since the C# WebServer project has its own lightweight <a href="http://en.wikipedia.org/wiki/Model_View_Controller">MVC</a> framework, we&#8217;ll need to build our own integration classes.</p>
<p>The C# WebServer project has a way to add alternative template engines, but the hooks provided don&#8217;t look like a clean fit with Spark. I think it&#8217;ll take some tinkering to get the two to work together seamlessly.</p>
<p>I&#8217;ll post some messages to the discussion boards at both open source projects. If you&#8217;re interested in helping out with the effort &#8212; or would be interested in the results of the project &#8212; leave a message in the comments or send an email to info@infovark.com.</p>


<p>Related posts:<ol><li><a href='http://underground.infovark.com/2010/01/05/3-useful-visual-studio-tricks-for-spark-templates/' rel='bookmark' title='3 Useful Visual Studio Tricks for Spark Templates'>3 Useful Visual Studio Tricks for Spark Templates</a></li>
<li><a href='http://underground.infovark.com/2009/12/18/introducing-the-sparkserver-project/' rel='bookmark' title='Introducing the SparkServer Project'>Introducing the SparkServer Project</a></li>
<li><a href='http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/' rel='bookmark' title='Looking for an IIS Alternative'>Looking for an IIS Alternative</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/12/09/using-spark-view-engine-with-c-webserver/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Looking for an IIS Alternative</title>
		<link>http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/</link>
		<comments>http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 17:43:14 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[RESTful]]></category>
		<category><![CDATA[web servers]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=531</guid>
		<description><![CDATA[One year ago it became clear that Infovark had outgrown the Windows Communication Foundation (WCF). We&#8217;d decided to use WCF because we wanted Infovark to provide web services, and we liked the fact that we could deploy WCF to client machines. Since WCF is built directly on top of HttpListener, a core part of the [...]


Related posts:<ol><li><a href='http://underground.infovark.com/2008/04/22/using-wcf-for-rest-part-1/' rel='bookmark' title='Using WCF for REST, Part 1'>Using WCF for REST, Part 1</a></li>
<li><a href='http://underground.infovark.com/2008/04/10/reviewrestful-webservices/' rel='bookmark' title='Review: Restful Web Services'>Review: Restful Web Services</a></li>
<li><a href='http://underground.infovark.com/2009/02/05/put-the-web-back-in-web-services/' rel='bookmark' title='Put the &#8220;Web&#8221; Back in Web Services'>Put the &#8220;Web&#8221; Back in Web Services</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One year ago it became clear that Infovark had outgrown the Windows Communication Foundation (WCF). </p>
<p>We&#8217;d decided to use WCF because we wanted Infovark to provide web services, and we liked the fact that we could deploy WCF to client machines. Since WCF is built directly on top of HttpListener, a core part of the Microsoft .NET Framework, we wouldn&#8217;t need to use System.Net or Microsoft IIS.</p>
<p>But we&#8217;ve <a href="http://underground.infovark.com/category/wcf/">struggled with WCF</a> for a variety of reasons. First, we wanted to use a REST model for our web services, and WCF&#8217;s support for REST architectures lags behind its SOAP support.</p>
<p>Second, there&#8217;s no easy way to <a href="http://underground.infovark.com/2009/02/18/using-wcf-to-return-html/">return HTML from WCF</a>. We tried transforming our XML with XSLT and returning the XHTML results as a Stream. This works, but the programming experience is frustrating.</p>
<p>Last, because of the previous two reasons, we were left with a website that was way too rigid and programmer-like. It didn&#8217;t feel like an organic website. The tool we&#8217;d picked was forcing us to compromise on our website design goals. </p>
<p>Infovark&#8217;s primary mission is to help human beings, not other computers. That means that the look and feel of the web interface should be our number one priority. Awesome web services are nice to have, but happy users are more important.</p>
<h4>Web server alternatives</h4>
<p>So for the past few months, we&#8217;ve been hunting for an alternative web server. We can&#8217;t use IIS because its footprint is too heavy. Most IT departments won&#8217;t allow us to install IIS on client machines.</p>
<p>We could use Apache. It has a nice embeddable version, but interacting with it via C# is tricky. We&#8217;d prefer something a little more Microsoft-native.</p>
<p>That basically leaves us with one commercial option and two open source options.</p>
<ol>
<li><a href="http://www.ultidev.com/products/Cassini/">UltiDev Cassini</a> is a commercial product that&#8217;s been around for some time. We&#8217;re sure it could do the job, but the licensing model is cost prohibitive.</li>
<li><a href="http://www.codeplex.com/webserver">C# WebServer</a> is an open source project on CodePlex. It&#8217;s been around for two years, but the pace of development seems slow.</li>
<li><a href="http://trac.caffeine-it.com/openrasta">Open Rasta</a> is the brain child of Sebastien Lambda, an open source framework for the development RESTful development of web sites and services. It&#8217;s been getting a lot of attention recently.</li>
<li><a href="http://code.google.com/p/kayak/">Kayak</a> is a promising open source project, but it hasn&#8217;t reached its first public release yet.</li>
</ol>
<p>(If you know of other web servers worth investigating, please let us know in the comments!)</p>
<h4>Making the switch</h4>
<p>More important than picking an alternative web hosting framework for Infovark is the <em>timing</em> of the switch. We don&#8217;t want to impede future development. </p>
<p>As a stopgap, we might try plugging in the <a href="http://dev.dejardin.org/">Spark View Engine</a> to replace our current XML-XSLT-XHTML rendering path. Who knows? If it improves our web development flow, we might be able to keep our WCF base after all. </p>


<p>Related posts:<ol><li><a href='http://underground.infovark.com/2008/04/22/using-wcf-for-rest-part-1/' rel='bookmark' title='Using WCF for REST, Part 1'>Using WCF for REST, Part 1</a></li>
<li><a href='http://underground.infovark.com/2008/04/10/reviewrestful-webservices/' rel='bookmark' title='Review: Restful Web Services'>Review: Restful Web Services</a></li>
<li><a href='http://underground.infovark.com/2009/02/05/put-the-web-back-in-web-services/' rel='bookmark' title='Put the &#8220;Web&#8221; Back in Web Services'>Put the &#8220;Web&#8221; Back in Web Services</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Times, They Are A-Changin&#8217;</title>
		<link>http://underground.infovark.com/2009/04/09/the-times-they-are-a-changin/</link>
		<comments>http://underground.infovark.com/2009/04/09/the-times-they-are-a-changin/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 08:33:04 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=406</guid>
		<description><![CDATA[Recently, I made a plea for the adoption of Universal Coordinated Time (UTC) in computer applications. It&#8217;s a sensible recommendation, and I stand behind it. The folks working on HTML 5 are proposing a &#60;time&#62; element for the new standard. This makes sense to me. It will help eliminate some of the objections people have [...]


Related posts:<ol><li><a href='http://underground.infovark.com/2009/01/08/digital-watches-are-a-pretty-neat-idea/' rel='bookmark' title='Digital Watches are a Pretty Neat Idea'>Digital Watches are a Pretty Neat Idea</a></li>
<li><a href='http://underground.infovark.com/2008/07/22/iso-date-validation-regex/' rel='bookmark' title='ISO Date Validation RegEx'>ISO Date Validation RegEx</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Recently, I made a <a href="http://underground.infovark.com/2009/01/08/digital-watches-are-a-pretty-neat-idea/">plea for the adoption of Universal Coordinated Time</a> (UTC) in computer applications. It&#8217;s a sensible recommendation, and I stand behind it.</p>
<p>The folks working on HTML 5 are proposing a <code>&lt;time&gt;</code> element for the new standard. This makes sense to me. It will help eliminate some of the objections people have raised to the <a href="http://microformats.org/wiki/datetime-design-pattern">datetime design pattern</a> proposed by the microformats team.</p>
<p>So, problem solved, right? We use UTC for time, and the usual calendar notation for dates. Neat.</p>
<p>Wait a minute. By &#8220;the usual&#8221; calendar notation, do we mean the modern Gregorian calendar, or&#8230;</p>
<h4>There&#8217;s always a catch</h4>
<p>Peter-Paul Koch, a.k.a. PPK, author of the <a href="http://www.quirksmode.org">quirksmode</a> blog, reminds us that <a href="http://www.quirksmode.org/blog/archives/2009/04/making_time_saf.html">calculating historical calendar dates is hard</a>. Really, really hard.</p>
<p>He provides an overview of the major calendar reforms in the Western world and points out that the reforms were adopted by different countries at different times. So forming a consistent timeline requires a knowledge of both <em>time</em> and <em>place</em>.</p>
<p>And many important historical dates <em>float</em>. The rules that determine when Easter occurs in the church calendar are complicated, and Orthodox and Catholic calendars disagreed for many years. In the medieval period, years were often numbered according to the local monarch&#8217;s reign. In Roman times, extra days were added to the official calendar by decree to prevent the seasons from drifting too far out of line.</p>
<p>If we want to make the <code>&lt;time&gt;</code> element safe for historical use, programmers would have to deal with this mess.</p>
<h4>Leave it to the historians</h4>
<p>As useful as having universal, consistent <code>&lt;time&gt;</code> element metadata would be, that&#8217;s just too hard. Frankly, I skimmed the last bits of PPK&#8217;s article myself, and I&#8217;m actually <em>interested</em> in the issue. Most working programmers won&#8217;t bother.</p>
<p>While it&#8217;d be nice to have trustworthy time data, we&#8217;re not likely to get it. The standard should reflect that. I vote for assigning a cutoff date for the <code>&lt;time&gt;</code> element. January 1, 1970 works for me.</p>


<p>Related posts:<ol><li><a href='http://underground.infovark.com/2009/01/08/digital-watches-are-a-pretty-neat-idea/' rel='bookmark' title='Digital Watches are a Pretty Neat Idea'>Digital Watches are a Pretty Neat Idea</a></li>
<li><a href='http://underground.infovark.com/2008/07/22/iso-date-validation-regex/' rel='bookmark' title='ISO Date Validation RegEx'>ISO Date Validation RegEx</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/04/09/the-times-they-are-a-changin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>REST: How to respond to an HTTP POST</title>
		<link>http://underground.infovark.com/2009/03/24/rest-how-to-respond-to-an-http-post/</link>
		<comments>http://underground.infovark.com/2009/03/24/rest-how-to-respond-to-an-http-post/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 13:54:29 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[RESTful]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=376</guid>
		<description><![CDATA[I ran into a problem yesterday. I&#8217;d sent a HTTP POST request to a collection of resources on our RESTful web service. Our server responded with an HTTP 201: Created status code and the URI of the new resource in the Location header. And then&#8230; nothing happened. This was not what I was expecting. I [...]


Related posts:<ol><li><a href='http://underground.infovark.com/2008/05/17/using-wcf-for-rest-part-2/' rel='bookmark' title='Using WCF for REST, Part 2'>Using WCF for REST, Part 2</a></li>
<li><a href='http://underground.infovark.com/2008/05/27/using-wcf-for-rest-part-3/' rel='bookmark' title='Using WCF for REST, Part 3'>Using WCF for REST, Part 3</a></li>
<li><a href='http://underground.infovark.com/2008/04/22/using-wcf-for-rest-part-1/' rel='bookmark' title='Using WCF for REST, Part 1'>Using WCF for REST, Part 1</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I ran into a problem yesterday. I&#8217;d sent a HTTP POST request to a collection of resources on our RESTful web service. Our server responded with an <code>HTTP 201: Created</code> status code and the URI of the new resource in the <code>Location</code> header.</p>
<p>And then&#8230; nothing happened.</p>
<p>This was not what I was expecting. I expected my web browser to follow up with a GET request to the URI I&#8217;d provided. But Firefox 3 wasn&#8217;t biting. A problem with Firefox? I checked in IE8 and Google Chrome and got the same behavior.</p>
<p>Had I misread the HTTP spec? Did I misunderstand the REST pattern? I grabbed for my worn copy of <a href="http://oreilly.com/catalog/9780596529260/">RESTful Web Services</a>. Nope. <code>HTTP 201</code> seemed to be the right status for this situation.</p>
<p>Had I blundered into some common error? I checked Stefan Tilkov&#8217;s useful list of <a href="http://www.infoq.com/articles/rest-anti-patterns">REST Antipatterns</a>. But I couldn&#8217;t find anything that quite matched my situation.</p>
<p>I started Googling, but couldn&#8217;t find much apart from this <a href="http://stackoverflow.com/questions/420103/what-is-the-correct-response-to-an-http-post-request">question about HTTP Post on Stack Overflow</a>. There were some cryptic responses (to which I&#8217;ve added my own answer now).</p>
<p>Eventually, I discovered what I needed to know from Ben Ramsey&#8217;s article on <a href="http://benramsey.com/archives/http-status-redirection/">HTTP redirection</a>. It&#8217;s part of his <a href="http://benramsey.com/tag/rfc2616/">series discussing RFC 2616</a>, which describes the <a href="http://www.ietf.org/rfc/rfc2616.txt">HTTP/1.1 protocol</a>.</p>
<p>The answer is that while web service clients will often &#8220;take the hint&#8221; provided by a <code>HTTP 201: Created</code> response, web browsers won&#8217;t. If you actually want a web browser to go somewhere else, you need to send a status code in the 3xx series. In this situation, the status code you want is <code>HTTP 303: See Other</code>.</p>
<p>Once I changed the status code returned by the server, all the web browsers followed up the response with a GET to the new URI.</p>


<p>Related posts:<ol><li><a href='http://underground.infovark.com/2008/05/17/using-wcf-for-rest-part-2/' rel='bookmark' title='Using WCF for REST, Part 2'>Using WCF for REST, Part 2</a></li>
<li><a href='http://underground.infovark.com/2008/05/27/using-wcf-for-rest-part-3/' rel='bookmark' title='Using WCF for REST, Part 3'>Using WCF for REST, Part 3</a></li>
<li><a href='http://underground.infovark.com/2008/04/22/using-wcf-for-rest-part-1/' rel='bookmark' title='Using WCF for REST, Part 1'>Using WCF for REST, Part 1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/03/24/rest-how-to-respond-to-an-http-post/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using WCF to return HTML</title>
		<link>http://underground.infovark.com/2009/02/18/using-wcf-to-return-html/</link>
		<comments>http://underground.infovark.com/2009/02/18/using-wcf-to-return-html/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 15:28:22 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=332</guid>
		<description><![CDATA[I just answered a WCF question on StackOverflow, and decided it was worth cross-posting here as well. The question was: What is the best / most flexible way to have WCF output XHTML? Here&#8217;s how we do it at Infovark. While I&#8217;m not sure that our approach is the best way, it does the job. [...]


Related posts:<ol><li><a href='http://underground.infovark.com/2009/12/11/better-ways-to-encode-html-in-c/' rel='bookmark' title='Better ways to Encode HTML in C#'>Better ways to Encode HTML in C#</a></li>
<li><a href='http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/' rel='bookmark' title='Looking for an IIS Alternative'>Looking for an IIS Alternative</a></li>
<li><a href='http://underground.infovark.com/2008/04/09/wcf-bad-request/' rel='bookmark' title='WCF Bad Request'>WCF Bad Request</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I just answered a <a href="http://en.wikipedia.org/wiki/Windows_Communication_Foundation">WCF</a> question on <a href="http://www.stackoverflow.com">StackOverflow</a>, and decided it was worth cross-posting here as well. </p>
<p>The question was: <a href="http://stackoverflow.com/questions/558515/what-is-the-best-most-flexible-way-to-have-wcf-output-xhtml">What is the best / most flexible way to have WCF output XHTML?</a></p>
<p>Here&#8217;s how we do it at Infovark. While I&#8217;m not sure that our approach is the <em>best</em> way, it does the job.</p>
<p>Our approach is to use the DataContractSerilizer to generate XML, then apply a Complied XSLT transform and return the result stream, which should now contain XHTML. Here&#8217;s a simplified version of our code:</p>
<div class="geshi no csharp">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">public</span> Stream GetItemAsHtml<span class="br0">&#40;</span><span class="kw4">string</span> id<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Item obj <span class="sy0">=</span> GetItem<span class="br0">&#40;</span>objectId<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Stream xml <span class="sy0">=</span> GetXmlStream<span class="br0">&#40;</span>obj<span class="br0">&#41;</span>; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> TransformXmlStream<span class="br0">&#40;</span>xml, defaultTransform<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw1">static</span> Stream GetXmlStream<span class="br0">&#40;</span>IXmlSerializable item<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; MemoryStream stream <span class="sy0">=</span> <span class="kw3">new</span> MemoryStream<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">using</span> <span class="br0">&#40;</span>XmlWriter writer <span class="sy0">=</span> XmlWriter.<span class="me1">Create</span><span class="br0">&#40;</span>stream, <span class="kw3">new</span> XmlWriterSettings <span class="br0">&#123;</span> Encoding <span class="sy0">=</span> Encoding.<span class="me1">UTF8</span> <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>writer <span class="sy0">!=</span> <span class="kw1">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DataContractSerializer dcs <span class="sy0">=</span> <span class="kw3">new</span> DataContractSerializer<span class="br0">&#40;</span>item.<span class="me1">GetType</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dcs.<span class="me1">WriteObject</span><span class="br0">&#40;</span>writer, item<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer.<span class="me1">Flush</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer.<span class="me1">Close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; stream.<span class="me1">Seek</span><span class="br0">&#40;</span><span class="nu0">0</span>, SeekOrigin.<span class="me1">Begin</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> stream;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw1">static</span> Stream TransformXmlStream<span class="br0">&#40;</span>Stream xml, <span class="kw4">string</span> xsltFile<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; XmlReader reader <span class="sy0">=</span> XmlReader.<span class="me1">Create</span><span class="br0">&#40;</span>xml<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; XslCompiledTransform trans <span class="sy0">=</span> <span class="kw3">new</span> XslCompiledTransform<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; trans.<span class="me1">Load</span><span class="br0">&#40;</span>xsltFile<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; MemoryStream stream <span class="sy0">=</span> <span class="kw3">new</span> MemoryStream<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">using</span> <span class="br0">&#40;</span>XmlWriter writer <span class="sy0">=</span> XmlWriter.<span class="me1">Create</span><span class="br0">&#40;</span>stream, trans.<span class="me1">OutputSettings</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>writer <span class="sy0">!=</span> <span class="kw1">null</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trans.<span class="me1">Transform</span><span class="br0">&#40;</span>reader, writer<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer.<span class="me1">Flush</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; writer.<span class="me1">Close</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; stream.<span class="me1">Seek</span><span class="br0">&#40;</span><span class="nu0">0</span>, SeekOrigin.<span class="me1">Begin</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> stream;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>It works for us, but if you&#8217;ve got other, better ideas, please let me know! </p>


<p>Related posts:<ol><li><a href='http://underground.infovark.com/2009/12/11/better-ways-to-encode-html-in-c/' rel='bookmark' title='Better ways to Encode HTML in C#'>Better ways to Encode HTML in C#</a></li>
<li><a href='http://underground.infovark.com/2009/12/01/looking-for-an-iis-alternative/' rel='bookmark' title='Looking for an IIS Alternative'>Looking for an IIS Alternative</a></li>
<li><a href='http://underground.infovark.com/2008/04/09/wcf-bad-request/' rel='bookmark' title='WCF Bad Request'>WCF Bad Request</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/02/18/using-wcf-to-return-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microformats Introduction</title>
		<link>http://underground.infovark.com/2009/02/03/microformats-introduction/</link>
		<comments>http://underground.infovark.com/2009/02/03/microformats-introduction/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 16:53:37 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[microformats]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=212</guid>
		<description><![CDATA[I&#8217;m on record as being skeptical of the semantic web. Or rather, I&#8217;m skeptical of much of the marketing hype around the semantic web. That&#8217;s not to say that semantic technologies won&#8217;t be useful. I still believe that both Resource Description Framework (RDF) and the Web Ontology Language (OWL) are too complicated to gain widespread [...]


<i>No related posts.</i>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m on record as being <a href="http://www.infovark.com/2008/01/21/jabberwocky/">skeptical of the semantic web</a>. Or rather, I&#8217;m skeptical of much of the marketing hype around the semantic web. That&#8217;s not to say that semantic technologies won&#8217;t be useful.</p>
<p>I still believe that both <a href="http://en.wikipedia.org/wiki/Resource_Description_Framework">Resource Description Framework (RDF)</a> and the <a href="http://en.wikipedia.org/wiki/Web_Ontology_Language">Web Ontology Language (OWL)</a> are too complicated to gain widespread adoption. But maybe we don&#8217;t need their academic rigor. <a href="http://en.wikipedia.org/wiki/Microformats">Microformats</a> offer a way to get some of the benefits of the semantic web using plain ol&#8217; HTML. </p>
<p>What are microformats? How do they work? Emily Lewis wrote a great series of blog posts <a href="http://www.ablognotlimited.com/articles/getting-semantic-with-microformats-introduction/">introducing microformats</a>. You can also go direct to the source, the microformats homepage, at <a href="http://microformats.org">microformats.org</a>.</p>
<h4>An example</h4>
<p>Here&#8217;s an example of our company address in <a href="http://microformats.org/wiki/hCard">hCard</a> format.</p>
<div id="infovark_vcard" class="vcard">
 <a class="url fn n" href="http://www.infovark.com"> <span class="given-name">Infovark</span><br />
</a></p>
<div class="org">Infovark, Inc.</div>
<p> <a class="email" href="mailto:info@infovark.com">info@infovark.com</a></p>
<div class="adr">
<div class="street-address">10104 Bushman Dr.</div>
<p>  <span class="locality">Oakton</span>,  <span class="region">VA</span>,  <span class="postal-code">22124</span><br />
  <span class="country-name">USA</span>
 </div>
<div class="tel">800-833-9796</div>
</div>
<p>The address above is marked up in such a way that (some) web browsers can identify it as a street address. But it&#8217;s nothing more than ordinary HTML. Here&#8217;s what the code looks like:</p>
<div class="geshi no xml">
<ol>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;div</span> <span class="re0">id</span>=<span class="st0">&quot;infovark_vcard&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;vcard&quot;</span><span class="re2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc3"><span class="re1">&lt;a</span> <span class="re0">class</span>=<span class="st0">&quot;url fn n&quot;</span> <span class="re0">href</span>=<span class="st0">&quot;http://www.infovark.com&quot;</span><span class="re2">&gt;</span></span> &nbsp;<span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;given-name&quot;</span><span class="re2">&gt;</span></span>Infovark<span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;additional-name&quot;</span><span class="re2">&gt;</span></span><span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;family-name&quot;</span><span class="re2">&gt;</span></span><span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;/a<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc3"><span class="re1">&lt;div</span> <span class="re0">class</span>=<span class="st0">&quot;org&quot;</span><span class="re2">&gt;</span></span>Infovark<span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc3"><span class="re1">&lt;a</span> <span class="re0">class</span>=<span class="st0">&quot;email&quot;</span> <span class="re0">href</span>=<span class="st0">&quot;mailto:info@infovark.com&quot;</span><span class="re2">&gt;</span></span>info@infovark.com<span class="sc3"><span class="re1">&lt;/a<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc3"><span class="re1">&lt;div</span> <span class="re0">class</span>=<span class="st0">&quot;adr&quot;</span><span class="re2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;div</span> <span class="re0">class</span>=<span class="st0">&quot;street-address&quot;</span><span class="re2">&gt;</span></span>10104 Bushman Dr.<span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;locality&quot;</span><span class="re2">&gt;</span></span>Oakton<span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;region&quot;</span><span class="re2">&gt;</span></span>VA<span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;postal-code&quot;</span><span class="re2">&gt;</span></span>22124<span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc3"><span class="re1">&lt;span</span> <span class="re0">class</span>=<span class="st0">&quot;country-name&quot;</span><span class="re2">&gt;</span></span>USA<span class="sc3"><span class="re1">&lt;/span<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc3"><span class="re1">&lt;div</span> <span class="re0">class</span>=<span class="st0">&quot;tel&quot;</span><span class="re2">&gt;</span></span>800-833-9796<span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc3"><span class="re1">&lt;/div<span class="re2">&gt;</span></span></span></div>
</li>
</ol>
</div>
<p>It&#8217;s simple enough that it just might deliver where RDF and OWL fail, becoming part of every web developer&#8217;s toolkit.</p>
<h4>Get started</h4>
<p>You can experiment by creating your own hCards using the <a href="http://microformats.org/code/hcard/creator">hCard creator</a>. </p>
<p>And if you&#8217;re using <a href="http://www.firefox.com">Mozilla Firefox</a>, you can download the <a href="https://addons.mozilla.org/en-US/firefox/addon/4106">Operator</a> add-in to see &#8212; and use &#8212; microformatted data embedded in ordinary web pages.</p>
<p><em>Hat tip: <a href="http://ajaxian.com">Ajaxian</a> for <a href="http://ajaxian.com/archives/getting-semantic-with-microformats-series-by-emily-lewis">Getting Semantic with Mircoformats</a></em></p>


<p><i>No related posts.</i></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/02/03/microformats-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoshop Sirens</title>
		<link>http://underground.infovark.com/2009/01/28/photoshop-sirens/</link>
		<comments>http://underground.infovark.com/2009/01/28/photoshop-sirens/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 01:10:51 +0000</pubDate>
		<dc:creator>Dean</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://underground.infovark.com/?p=303</guid>
		<description><![CDATA[I&#8217;m staring at a gorgeous visual right now. It&#8217;s an image of how the Infovark UI might look.  I can imagine myself clicking on that tab, and navigating off to a world of beautifuly laid out, useful information&#8230; I really want to see this go into production. I really do&#8230; But it won&#8217;t. Our designer used [...]


<i>No related posts.</i>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m staring at a gorgeous visual right now. It&#8217;s an image of how the Infovark UI might look.  I can imagine myself clicking on that tab, and navigating off to a world of beautifuly laid out, useful information&#8230;</p>
<p>I really want to see this go into production. I really do&#8230;</p>
<p>But it won&#8217;t. Our designer used Photoshop.</p>
<p>There&#8217;s nothing wrong with Photoshop, of course. Nor Gimp, nor Paint.Net, nor any other image editing tool you could mention. And there&#8217;s nothing wrong with our designer, either. She really knows her stuff. But I can&#8217;t help but feel that perhaps you shouldn&#8217;t let your designer touch an image editing tool when she&#8217;s working on a web design.</p>
<h4>The web is visually limited</h4>
<p>When you open an image editing tool, you&#8217;re presented with a blank canvas. And the first instinct of any artist or designer is to <em>fill that canvas</em>.</p>
<p>Web pages aren&#8217;t canvas. On canvas, or on paper, it&#8217;s just as easy to paint one corner as another. This isn&#8217;t true of the web. With a web page, one corner is <em>much</em> easier to reach than all the others. In languages written left to right, it&#8217;s the upper left hand corner.</p>
<p>Not all sides of the image are equally easy to reach, either. The top and left edges of your canvas are much, much easier to paint than the right or bottom edge.</p>
<p>It&#8217;s as if the upper left corner has its own gravity, and draws all other page elements toward it. Like a black hole, it <em>warps your grid</em>.</p>
<p><img class="aligncenter size-full wp-image-306" title="black_hole_spiral" src="http://underground.infovark.com/wp-content/uploads/2009/01/black_hole_spiral.jpg" alt="black_hole_spiral" width="360" height="261" /></p>
<p>It is many times harder to place elements in the bottom right corner of a page than the upper left. You&#8217;re fighting the pull of gravity the whole way. You&#8217;ll have to build on top of block elements like <code>DIV</code> to get there. And beware of the CSS <code>float</code> property. As its name suggests, it isn&#8217;t supported by anything. It can wreak havoc on your layout, setting off a cascade of unwanted effects.</p>
<p>The web also suffers from typographic poverty. In an image editing tool, your designer will have access to hundreds &#8212; perhaps thousands &#8212; of fonts. They can be used to create images freely. But all but a handful of these fonts can be used on the web. Most designers know what fonts are actually available for use. You can cheat in certain cases, and use images instead of text for certain headers and buttons, but many of the effects you&#8217;d like to achieve with typography are simply not possible today.</p>
<p>Your web canvas won&#8217;t take all kinds of paint, either, unlike an ordinary image file. Not all browsers support transparency in images, for example. Placing gradients and shadows can be tricky.</p>
<h4>The web is in motion</h4>
<p>But the biggest challenge can be the dynamic nature of a web page. Looking at a design, it can be hard to imagine the effect a blinking, spinning animated widget will have on your audience. It&#8217;s also hard to visualize what rollovers or pop-ups might do to the overall feel of the page.</p>
<p>Unlike paper or canvas, a web page can be stretched and scrolled. What does that do to the positioning of its elements? What happens when a user adjusts the font size in the browser, but embedded gifs and jpgs remain the same size?</p>
<p>But the biggest drawback to having your designer work in Photoshop is that to the layman, the web site looks <em>almost finished</em>. They&#8217;re <em>pretty</em>, these Photoshop Sirens, and they sing! They will draw you in&#8230;</p>
<p>Only the lonely code monkey hacking away at HTML, CSS and JavaScript knows that a screenshot is as far away from a working web page as a screenplay is from a feature film.</p>


<p><i>No related posts.</i></p>]]></content:encoded>
			<wfw:commentRss>http://underground.infovark.com/2009/01/28/photoshop-sirens/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

