<?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>NorthHorizon &#187; Browser</title>
	<atom:link href="http://northhorizon.net/tag/browser/feed/" rel="self" type="application/rss+xml" />
	<link>http://northhorizon.net</link>
	<description></description>
	<lastBuildDate>Sun, 29 Aug 2010 21:19:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>W3C Validation and the Web</title>
		<link>http://northhorizon.net/2009/w3c-validation-and-the-web/</link>
		<comments>http://northhorizon.net/2009/w3c-validation-and-the-web/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 14:00:57 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Coding Horror]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[W3C Validation]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://northhorizon.net/?p=98</guid>
		<description><![CDATA[I try to keep up on several blogs, one of which is Jeff Atwood&#8217;s Coding Horror. Recently, he chose the topic of W3 Validation and its necessity, or lack thereof. I also seem to have made a few statements on a similar topic, so perhaps my view is nothing short of expected. What is strange, [...]]]></description>
			<content:encoded><![CDATA[<p>I try to keep up on several blogs, one of which is Jeff Atwood&#8217;s <a href="http://codinghorror.com">Coding Horror</a>. Recently, he chose the topic of W3 Validation and its necessity, or lack thereof. I also seem to have made a <a href="http://northhorizon.net/2009/browser-compatibility-and-the-sanity-of-web-developers/">few statements</a> on a similar topic, so perhaps my view is nothing short of expected. What <em>is</em> strange, however, is Jeff&#8217;s point of view, considering he and I are kindred spirits in the world of .NET and C#.<span id="more-98"></span></p>
<p>Jeff&#8217;s argument is pretty simple:</p>
<ul>
<li>The web is a forgiving place.</li>
<li>Many big-name websites don&#8217;t pass validation.</li>
<li>James Bennett doesn&#8217;t like XHTML.</li>
<li>CSS isn&#8217;t as intuitive as HTML-embedded properties.</li>
<li>Validity is relative to your standards.</li>
</ul>
<p>Since Jeff &#8220;vehemently agrees&#8221; with Mr. Bennett, I decided to investigate <a href="http://www.b-list.org/weblog/2008/jun/18/html/">his article</a> as well, to try and understand where Atwood was coming from. Benett&#8217;s argument is even more basic:</p>
<ul>
<li>No real advantages.</li>
<li>Markup errors are fatal.</li>
<li>There is some CSS/DOM incompatibility between HTML 4.01 and XHTML.</li>
</ul>
<p>The majority of these points, are, in my opinion, rooted in ignorance and xenophobia, both of which are disastrously fatal in our industry, <em>especially</em> on the Web. It is true the Web is very forgiving, but only because it must be so. HTML is a novel language, in the sense that you don&#8217;t move from line to line, from procedure to procedure, but rather declare the structure of how something looks and let the renderer (IE, Firefox, Safari) choose the best way to view it. A good example is when Firefox switched from an iterative to a recursive implementation in its third version and also reimplemented its graphics engine. Because of the declarative nature of HTML, websites weren&#8217;t adversely impacted. However, like all new things, HTML has its quirks. Namely, it&#8217;s not very easy for computers to understand. In fact, sometimes it&#8217;s not all that easy for even humans to understand &#8211; maybe a sort of inverted Turing test.</p>
<p>Like all the triumphs in Computer Science, someone identified the problems that exist in HTML and created a far more flexible and extensible language called XML. XML is now one of the best containers for information because of its well-designed and understandable structure and its infinite flexibility. While that&#8217;s great for data storage, what about the Web? Well, that&#8217;s where XHTML 1.0 came in, as a statically defined language like HTML, but a machine-understandable and consistent language, like XML. XHTML, is, at its very essence, the best of both worlds.</p>
<p>I think Atwood and Bennett had a similar reaction to XHTML <a href="http://northhorizon.net/2009/browser-compatibility-and-the-sanity-of-web-developers/">as I did</a>:</p>
<blockquote><p>Back when XHTML went 1.0, I was somewhat surprised to see that they had actually removed elements and attributes from the specification. Usually, moving to a new product means that you get more, not less.</p></blockquote>
<p>The difference here is that they refused, either consciously or unconsciously to adapt to and understand where the Web was &#8211; and still is &#8211; going. The W3C is going for a very specific separation of concerns for websites. XHTML is designed to be the static structure of a website. It contains data (text and such), and some hints on how to present it (whether it be in paragraphs, tabular, or a list), but nothing else. This is where CSS comes in. CSS decorates the XHTML, quantifying distances, sizes, backgrounds, and organization. Finally, JavaScript gives the client a smooth feel, dynamically altering the web page to best suit the client, and, as of late, retrieve data on the fly through AJAX and JSON. This is why HTML attributes are almost all deprecated in XHTML &#8211; the static structure doesn&#8217;t care how wide things are or how tall they are. One of the best examples that I can think of to demonstrate the division of power between XHTML and CSS is <a href="http://www.csszengarden.com/">CSS Zen Garden</a>. The opening page is modest enough, but choose one of the designs on the right sidebar and the entire layout changes. The only difference between the default and new design is a new CSS style sheet. You&#8217;ll notice it has all the same text, all the same navigation, but a completely different look. Why is this useful or important? Well, as a form of broadcast media, it is salient to shape the way your website looks based on the viewer. For instance, if you go to a website on an web-enabled cellphone, I&#8217;d want to strip out as many ancillary graphics as possible and conserve as much width as possible. If you&#8217;re vision impaired, I want to be able to deliver to you a web page that a TTY device can easily understand. Or, perhaps, you&#8217;re a search engine and I want to get straight to the point so you can index better. This should all be easily accomplished by specifying the use and intention of each style sheet and allowing the user to choose the one that best suits their purpose.</p>
<p>Of course, someone always brings up the fact that many name-brand websites aren&#8217;t valid at all. I&#8217;d also like to point out that many big-name trading firms are going bankrupt. Just because they don&#8217;t care doesn&#8217;t mean you shouldn&#8217;t. The argument itself is infantile. I&#8217;m not trying to inflate my ego any (trust me, that&#8217;d be a bad idea), but I find writing XHTML 1.1 (which is by far the strictest) to be very easy. When Marlene and I drew up the static format for this website (that is, before we plugged in all the WordPress stuff), I had about three validation errors, all of which were quelled very easily. Personally, I was a little disappointed I had <em>any</em>, but I suppose perfection was never a trait I had.</p>
<p>Jeff also wonders whether CSS validation is possible. I&#8217;m not entirely sure why he didn&#8217;t bother to <a href="http://www.google.com/search?hl=en&amp;client=firefox-a&amp;rls=org.mozilla%3Aen-US%3Aofficial&amp;hs=zyV&amp;newwindow=1&amp;q=css+validation&amp;btnG=Search">check Google</a>. Of course CSS validation exists, and I&#8217;m proud to say this website&#8217;s CSS is valid as well.</p>
<p>It&#8217;s unfortunate that XHTML markup errors are indeed fatal (and the errors aren&#8217;t always very helpful), but as a C# developer, I&#8217;m used to having compiled code. If I messed up and miscommunicated with the machine (again, perfection is not one of my virtues), I want the machine to tell me that it doesn&#8217;t understand, rather than acting like my girlfriend, misinterpreting what I said, and summarily stating that I don&#8217;t love her anymore. Obviously it&#8217;s simply untrue; I will always love my computer. Girlfriends are a bit different.</p>
<p>So, perhaps the most important question is, why do we need standards? The need for validation clearly hinges upon the need for standards; without validation, how can one tell if standards are being upheld? And without standards, the Internet would be far more segmented than it is already. Jeff is right that most people don&#8217;t understand the W3 Valid &#8220;stickers&#8221; some webmasters (like myself) have on their websites in various locations. This doesn&#8217;t really bother me, though. Most people don&#8217;t notice half the validations on many of the products they use everyday. On the inside of the battery cover of your cellphone, there exist a multitude of symbols, each representing a different standards body that approved this device to work with the network. Yet millions of people blithely continue on, blissfully ignorant of the years of effort that go into making such a device. Such is the thankless life of an engineer. No one notices when you make amazing accomplishments (and a W3C valid website is hardly a major feat), but everyone complains when the slightest flaw presents itself.</p>
<p>I suppose we just learn to deal with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://northhorizon.net/2009/w3c-validation-and-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser Compatibility and the Sanity of Web Developers</title>
		<link>http://northhorizon.net/2009/browser-compatibility-and-the-sanity-of-web-developers/</link>
		<comments>http://northhorizon.net/2009/browser-compatibility-and-the-sanity-of-web-developers/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 16:47:31 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS floats]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://northhorizon.net/?p=47</guid>
		<description><![CDATA[Since I&#8217;ve decided to get this blog rolling, one of my primary objectives was to ensure a consistent, high quality experience for any platform visitors come from. Obviously, it&#8217;s impossible to test the myriad of browsers out there, but I think it&#8217;s useful to at least test on the top three engines, namely Trident (Internet [...]]]></description>
			<content:encoded><![CDATA[<p>Since I&#8217;ve decided to get this blog rolling, one of my primary objectives was to ensure a consistent, high quality experience for any platform visitors come from. Obviously, it&#8217;s impossible to test the myriad of browsers out there, but I think it&#8217;s useful to at least test on the top three engines, namely Trident (Internet Explorer), Gecko (Firefox), and WebKit (Safari / Chrome). I also test on Opera, even though it has <a href="http://arstechnica.com/microsoft/news/2009/02/january-2009.ars">little market share</a>. Hopefully I&#8217;ll get my traffic statistics going again soon, so  I can prove more definitively that sixty something percent of the ten people who come here use Firefox anyway.</p>
<p>So that leave three or so of you guys using IE. Well, I hate to break it to you, but your browser sucks. It really does. Web developers everywhere have been rejecting Microsoft&#8217;s browser for some time now, which has given rise to the healthy market share Firefox has had.</p>
<p>How does this affect you and me, you may be wondering. Well, let&#8217;s do a case study on the site you&#8217;re looking at right now, since I&#8217;m fixing it up anyway.<span id="more-47"></span> For those of you not using a W3C compliant browser (read: IE), the website is supposed to have some blocks of color of varying height below each of the navigation links, which highlight to orange and a main body text that wraps around the sidebar on the right.</p>
<div id="attachment_59" class="wp-caption aligncenter" style="width: 160px"><a href="http://northhorizon.net/wp-content/uploads/2009/02/northhorizon-ff.png"><img class="size-thumbnail wp-image-59" title="northhorizon-ff" src="http://northhorizon.net/wp-content/uploads/2009/02/northhorizon-ff-150x150.png" alt="northhorizon-ff" width="150" height="150" /></a><p class="wp-caption-text">My post about hashing as seen in Firefox.</p></div>
<p>Beautiful. Everything looks just like it should in Firefox, Safari, Chrome, and Opera. But what happens when we look at it in IE?</p>
<div id="attachment_61" class="wp-caption aligncenter" style="width: 160px"><a href="http://northhorizon.net/wp-content/uploads/2009/02/northhorizon-ie7.png"><img class="size-thumbnail wp-image-61" title="northhorizon-ie7" src="http://northhorizon.net/wp-content/uploads/2009/02/northhorizon-ie7-150x150.png" alt="northhorizon-ie7" width="150" height="150" /></a><p class="wp-caption-text">The same post as seen by Internet Explorer 7</p></div>
<p>Oh wow. Not what I was going for at all. This is quite common for web developers to experience: write a website and make it perfect for the W3C compliant browsers and then try and get it to work in IE, because in all honesty, IE makes very little sense in terms of expected results. On another project, I instructed the browser to move an object 6 pixels left and 10 pixels down. Firefox was happy to oblige, but IE only moved it 3 pixels left and 8 pixels down.</p>
<p>So what&#8217;s going on here at the root, so we can fix it? Well, if you inspect my CSS, you&#8217;ll find this tidbit:</p>
<pre lang="css">#sidebar {
	float: right;
	width: 250px;
	list-style: none outside;
	background: white;
	margin: 0 0 0 10px;
	padding: 5px;
	padding-left: 20px;
}</pre>
<p>Most notably, I&#8217;m using CSS floats to put the Sidebar on the right. By doing so, I&#8217;m instructing the browser to make some space for it and to wrap text around it. IE obviously doesn&#8217;t care about my floated <code>div</code>, so it just disregards the instruction. That leaves me in a precarious position. Should I abandon my floats, which lead to nicer, cleaner XHTML in favor of tables because of one non-compliant browser? Of course not! Instead I have a little function that tells me what browser you&#8217;re using called <a href="http://us3.php.net/manual/en/function.get-browser.php"><code>get_browser()</code></a>. The code looks like this:</p>
<pre lang="php">$browscap = get_browser();
define('IE', ($browscap-&gt;browser == 'IE'));</pre>
<div id="attachment_64" class="wp-caption alignright" style="width: 160px"><a href="http://northhorizon.net/wp-content/uploads/2009/02/northhorizon-ie7-fixed.png"><img class="size-thumbnail wp-image-64" title="northhorizon-ie7-fixed" src="http://northhorizon.net/wp-content/uploads/2009/02/northhorizon-ie7-fixed-150x150.png" alt="northhorizon-ie7-fixed" width="150" height="150" /></a><p class="wp-caption-text">The same post in Internet Explorer 7 with my fixes.</p></div>
<p>This gives me a global constant, <code>IE</code> that allows me to change how the website looks if you&#8217;re running IE. With this in mind, I actually insert in a table in the middle of the page to force the sidebar to stay on the right. Problem solved.</p>
<p>As I was doing all this, I wondered if IE8 would give me any relief. I was somewhat surprised to find that it does, in fact, respect floating <code>div</code>s, and even respects the :after pseudo classes that allow me to add those blocks under the navigation links. Just not the hovering. <em>Sigh</em>. Anyway, all I needed to do was modify my IE code to check the major version number of the browser to say that IE8+ was <span style="text-decoration: line-through;">really</span> mostly W3C compliant.</p>
<pre lang="php">$browscap = get_browser();
define('IE', ($browscap-&gt;browser == 'IE' &amp;&amp; $browscap-&gt;majorver &lt; 8));</pre>
<p>So why is IE this way fundamentally? I don&#8217;t have any real code or facts to base these assumptions on, but my speculation is based on working with both XHTML and CSS as well as C# / WinForms / WPF. I assert to you that Microsoft has misunderstood the Web since its inception. With things like <a href="http://en.wikipedia.org/wiki/ActiveX">ActiveX</a> (now, thankfully, deprecated) it seems like Microsoft has always wanted to bring Windows to the web &#8211; literally. In Windows Forms (the battleship gray programs we all used to know), each visual element is a very unique item. Buttons don&#8217;t behave very much like Panels which don&#8217;t behave very much like CheckBoxes. It follows that you can&#8217;t really apply properties that relate to a Button to a Panel. Sensible enough. Unlees you&#8217;re dealing with XHTML and CSS. Back when XHTML went 1.0, I was somewhat surprised to see that they had actually <em>removed</em> elements and attributes from the specification. Usually, moving to a new product means that you get <em>more</em>, not less. It took some time, but I eventually realized that the Web isn&#8217;t like WinForms at all. Each element on the web (with the exception of form controls like ComboBoxes and CheckBoxes) is really the same. Almost everything can be broken down into a div or a span, and really if you change the display attribute on them, you end up with one amorphous panel.</p>
<p>This is the fundamental difference between IE and the W3C triad. Microsoft insists that floats and hovers really shouldn&#8217;t apply to things like divs, because they come from two seperate branches in the object tree. Really, until Microsoft realizes this, throws the existing codebase out, and tries again, IE will never be able to keep up with the rest. It&#8217;s a matter of understanding the nature of the Web and using an appropriate architecture to interpret it.</p>
]]></content:encoded>
			<wfw:commentRss>http://northhorizon.net/2009/browser-compatibility-and-the-sanity-of-web-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
