<?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>Whimsical.Nu &#187; Frontend Friday</title>
	<atom:link href="http://whimsical.nu/geek/frontend-friday/feed/" rel="self" type="application/rss+xml" />
	<link>http://whimsical.nu</link>
	<description>A whimsical blog by a whimsical girl with five different psyches: girl, geek, reader, writer, and gamer</description>
	<lastBuildDate>Wed, 16 May 2012 18:07:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>FF: CSS Optimization Tips</title>
		<link>http://whimsical.nu/2008/09/12/ff-css-optimization-tips/</link>
		<comments>http://whimsical.nu/2008/09/12/ff-css-optimization-tips/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 05:00:10 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[alphaimageloader filter]]></category>
		<category><![CDATA[cascading stylesheets]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[website optimization]]></category>
		<category><![CDATA[website performance]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=281</guid>
		<description><![CDATA[A lot can be gained in terms of website performance by the wise use of cascading stylesheets and styles on the website, and these are relatively easy things to accomplish. They revolve around styles and stylesheet placement. Stylesheets at the top One important rule is placing stylesheets at the top, within the HEAD tags. While most browsers will load all styles eventually regardless of placement on the page, putting styles in the HEAD helps the page load progressively, giving users visual feedback that hey, something is loading. One of the worst things that could happen if your styles aren&#8217;t in...]]></description>
			<content:encoded><![CDATA[<p><em>A lot can be gained in terms of website performance by the wise use of cascading stylesheets and styles on the website</em>, and these are relatively easy things to accomplish. They revolve around styles and stylesheet placement.</p>
<h4>Stylesheets at the top</h4>
<p>One important rule is placing stylesheets at the top, within the <code>HEAD</code> tags. While most browsers will load all styles eventually regardless of placement on the page, <em>putting styles in the <code>HEAD</code> helps the page load progressively, giving users visual feedback</em> that hey, something is loading. One of the worst things that could happen if your styles aren&#8217;t in the <code>&lt;head&gt;</code> tag is that the page does load&#8211;but there are <a href="http://www.bluerobot.com/web/css/fouc.asp/">no styles attached to your <acronym title="HyperText Markup Language">HTML</acronym> elements</a>, and then the page flickers to include the styles. It&#8217;s like going out without your clothes on, and then going back in to put them on.</p>
<h4>Externalizing stylesheets</h4>
<p>Styles can be included in the page source code itself in two ways: either within <code>&lt;style&gt;...&lt;/style&gt;</code> tags, or within the <code>style</code> attribute of an <acronym title="HyperText Markup Language">HTML</acronym> element. These are the &#8220;easiest&#8221; to do, however, <em>it&#8217;s better if you put style rules in an external <code>.css</code> file</em>, for a number of reasons:</p>
<ol>
<li><em><acronym title="Cascading Style Sheets">CSS</acronym> files can be cached for users, and subsequent returns to your page serves the <acronym title="Cascading Style Sheets">CSS</acronym> from the user&#8217;s cache instead of asking your server for a copy for download.</em> Your page file size is smaller since it doesn&#8217;t have style rules associated with it, and the external stylesheet itself isn&#8217;t downloaded on subsequent visits if it&#8217;s stored in the visitor&#8217;s cache.</li>
<li><em>Other pages on your website can reuse this same external stylesheet.</em> The optimization gains to this obviously means that all your pages will have a smaller size since there aren&#8217;t any styles on the source code itself. The <em>development</em> gains, however, are even better: one change in one file can update all your styles for your pages.</li>
</ol>
<p>If your website uses a lot of inline styles, it may be quite a challenge to move them out to external stylesheets. It will usually mean a lot of editing and updating of files, the complexity of which depends on how fragmented your styles are.</p>
<h4>Linking stylesheets instead of importing</h4>
<p>There are two ways of including external stylesheets: via the use of the <code>&lt;link&gt;</code> tag, or <code>@import</code>. The former links your stylesheet to your page, and the latter imports one stylesheet into another. The two ways look like below:</p>
<pre><code>&lt;link href="styles.css" type="text/css"&gt;
&lt;style type="text/css"&gt;@import url("styles.css");&lt;/style&gt;</code></pre>
<p><code>@import</code> can be used to hide styles from earlier browsers, but <em>in Internet Explorer, it behaves the same as using <code>&lt;link&gt;</code> at the bottom of the page</em>&#8211;which pretty much negates the above best practices I&#8217;ve talked about.</p>
<h4><acronym title="Cascading Style Sheets">CSS</acronym> expressions are evil</h4>
<p>Okay, so Internet Explorer is quirky. Sometimes <acronym title="Cascading Style Sheets">CSS</acronym> expressions seem to be the only way to fix it&#8211;I&#8217;ve seen a couple of <acronym title="Internet Explorer">IE</acronym> fixes/hacks that require <acronym title="Cascading Style Sheets">CSS</acronym> expressions. They look similar to:</p>
<pre><code>width:expression(document.body.clientWidth &gt; 799? "800px": "auto" );</code></pre>
<p><em>Unfortunately, they&#8217;re run pretty much every time the user interacts with the page: they&#8217;re run on page render, on browser resize, on page scroll, or even if the mouse moves over the page.</em> If one needs to dynamically set styles, use JavaScript. If you really, really need to use an expression, use one that, in the end, overrides the style declaration so that it&#8217;s only run once.</p>
<h4><acronym title="Internet Explorer">IE</acronym> filters are also evil</h4>
<p>The most frequent use nowadays of <a href="http://www.ssi-developer.net/css/visual-filters.shtml"><acronym title="Internet Explorer">IE</acronym> <acronym title="Cascading Style Sheets">CSS</acronym> filters</a> are to fix <acronym title="Portable Network Graphics">PNG</acronym> images in Internet Explorer 6 via the <a href="http://msdn.microsoft.com/en-us/library/ms532969.aspx">AlphaImageLoader filter</a>:</p>
<pre><code>&lt;div style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='pngimage.png',sizingMethod='scale');"&gt;&lt;/div&gt;</code></pre>
<p><em>However, this filter stops rendering and freezes the browser while the image is being downloaded</em>, and since it&#8217;s done per element and not per image, each time this element shows up in the browser, you&#8217;ll get a bit of a freeze. It&#8217;s better to gracefully degrade to using PNG8 which works fine in <acronym title="Internet Explorer 6">IE6</acronym>. If there&#8217;s no way out of using the AlphaImageLoader filter, user the underscore hack (<code>_filter</code>) or other <acronym title="Internet Explorer 6">IE6</acronym>-only hacks to keep the style rule limited to <acronym title="Internet Explorer 6">IE6</acronym> users.</p>
<p>Good luck with optimizing your stylesheets! You can take a look at the other posts in this optimization series below:</p>
<ol>
<li><a href="http://scripts.indisguise.org/2008/08/29/ff-website-optimization/">Website Optimization</a></li>
<li><a href="http://scripts.indisguise.org/2008/09/05/ff-minimizing-http-requests/">Minimizing <acronym title="HyperText Transfer Protocol">HTTP</acronym> Requests</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/09/12/ff-css-optimization-tips/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FF: Minimizing HTTP Requests</title>
		<link>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/</link>
		<comments>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 04:00:10 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css sprites]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[http requests]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[website optimization]]></category>
		<category><![CDATA[website performance]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=273</guid>
		<description><![CDATA[As I mentioned last week, I&#8217;ll be talking about a few of my favorite techniques for making websites load faster&#8211;the rules and practices that I find interesting and intriguing as a web developer obsessed with a dash of challenge. ;) One of the best ways to speed up website performance is by reducing the number of HTTP requests the website makes &#8212; it&#8217;s the first rule in YDN&#8217;s Best Practices for Speeding up your Web Site and YSlow, which is arranged according to what technique would have the most impact on your page&#8217;s performance. This rule can be quite tedious...]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://scripts.indisguise.org/2008/08/29/ff-website-optimization/">I mentioned last week</a>, I&#8217;ll be talking about a few of my favorite techniques for making websites load faster&#8211;the rules and practices that I find interesting and intriguing as a web developer obsessed with a dash of challenge. ;)</p>
<p><strong>One of the best ways to speed up website performance is by reducing the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests the website makes</strong> &#8212; it&#8217;s the first rule in <a href="http://developer.yahoo.com/performance/rules.html">YDN&#8217;s Best Practices for Speeding up your Web Site</a> and <a href="http://developer.yahoo.com/yslow/">YSlow</a>, which is arranged according to what technique would have the most impact on your page&#8217;s performance. This rule can be quite tedious to do when optimizing a current website/layout, so the best case, really, is to start a project with this in mind.</p>
<p>The article explains it well, so I&#8217;ll just quote them (italics mine):</p>
<blockquote><p>80% of the end-user response time is spent on the front-end. <em>Most of this time is tied up in downloading all the components in the page</em>: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests required to render the page. This is the key to faster pages.</p></blockquote>
<p>The use of <a href="http://alistapart.com/articles/sprites"><acronym title="Cascading Style Sheets">CSS</acronym> sprites</a> has been around for quite a while now, and is the best way to reduce the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests to your server. A <acronym title="Cascading Style Sheets">CSS</acronym> sprite is basically multiple images combined into one single, larger image, which is then positioned into your <acronym title="HyperText Markup Language">HTML</acronym> elements via <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
<p>Can you imagine the conversation between the browser and the server for either case?</p>
<blockquote><p><em>Browser:</em> Give me the background for the Index menu item.<br />
<em>Server:</em> Here you go, it will take around 1 second.<br />
<em>Browser:</em> While I&#8217;m getting that, can you also get me the background for the Blog menu item?<br />
<em>Server:</em> Here it is, another second for that.<br />
<em>Browser:</em> And let&#8217;s not forget the background for the About menu item, too.<br />
<em>Server:</em> Of course, here you go, you&#8217;ll get it in a second.<br />
&#8230;</p></blockquote>
<p>As opposed to when you use a <acronym title="Cascading Style Sheets">CSS</acronym> sprite for your menu items:</p>
<blockquote><p><em>Browser:</em> Give me the background image for the navigation menu items.<br />
<em>Server:</em> Here you go, it will take a bit less than 2 seconds.</p></blockquote>
<p>Short and sweet.</p>
<p>Note, however, that <em>if your visitors are predominantly dialup users, this might not be a good rule for you to follow</em> &#8212; mostly because you really can&#8217;t stuff any more data into that pipe than that pipe can handle. It <em>will</em> take longer for them to download the image, which will affect their perception of the website, as opposed to an image that gets downloaded faster and shows up on their browser faster. Remember those old-school rules about slicing header images? That&#8217;s basically rooted in that scenario: dialup can only download so much, so give them a couple <em>parts</em> of the header to download and see immediately. What’s best for your website depends on your target visitors.</p>
<p>There are a couple of <acronym title="Cascading Style Sheets">CSS</acronym> sprite tutorials and generators around:</p>
<ul>
<li><a href="http://www.csssprites.com/"><acronym title="Cascading Style Sheets">CSS</acronym> Sprites Generator</a> &#8211; a simple generator, giving the sprites in <acronym title="Portable Network Graphics">PNG</acronym> and <acronym title="Graphics Interchange Format">GIF</acronym> and giving background positions for each image</li>
<li><a href="http://spritegen.website-performance.org/">Website Performance&#8217;s <acronym title="Cascading Style Sheets">CSS</acronym> Sprite Generator</a> &#8211; contains a lot more extra configuration options for sprite generation if you want finer control, allows you to choose what image format to generate</li>
<li><a href="http://www.alistapart.com/articles/sprites">A List Apart&#8217;s <em><acronym title="Cascading Style Sheets">CSS</acronym> Sprites: Image Slicing&#8217;s Kiss of Death</em> article</a></li>
<li><a href="http://css-tricks.com/css-sprites-what-they-are-why-theyre-cool-and-how-to-use-them/"><acronym title="Cascading Style Sheets">CSS</acronym> Sprites: What They Are, Why They&#8217;re Cool, and How To Use Them</a></li>
<li><a href="http://stylemeltdown.com/2007/10/22/image-sprite-navigation-with-css/">Image Sprite Navigation With <acronym title="Cascading Style Sheets">CSS</acronym></a></li>
</ul>
<p>&#8230;to name a few. If you&#8217;re just getting started with spriting, I&#8217;d suggest you create your sprite manually in your preferred image editing application before trying one of the generators and work on something simple like navigation or lists with icons for the first few times. This should give you a better grasp of what happens with a sprite.</p>
<p>Something to keep in mind: <em>sprites will add complexity to maintaining your design.</em> Adding another image to an existing sprite, updating your <acronym title="Cascading Style Sheets">CSS</acronym> code to reflect that (and possibly impacting current <acronym title="Cascading Style Sheets">CSS</acronym> rules on other images using that same sprite) is slightly more time-consuming than just uploading a new image and a new <acronym title="Cascading Style Sheets">CSS</acronym> rule to use that single image. And of course, the more images on a single sprite, the more difficult it is to keep that image and the accompanying <acronym title="Cascading Style Sheets">CSS</acronym> rules maintainable. One of the ways to combat this is to organize sprites according to use. As opposed to one &uuml;ber-sprite containing everything and the dust on the coffee table, a sprite for navigation and a sprite for list items separately is easier to maintain and organize.</p>
<p>Good luck with minimizing your <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests!</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FF: Website optimization</title>
		<link>http://whimsical.nu/2008/08/29/ff-website-optimization/</link>
		<comments>http://whimsical.nu/2008/08/29/ff-website-optimization/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 04:00:15 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[website optimization]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=226</guid>
		<description><![CDATA[One of the things I&#8217;ve realized when I started working for Yahoo! is the importance and &#8220;interesting-ness&#8221; of website performance optimization. In an industry where things can get repetitive (how many &#60;p&#62; tags can you code in one day?), the challenges brought about by ensuring a website is properly optimized in terms of performance and page load is welcome and quite engrossing. With high-speed Internet, a lot of times we tend to forget about the size of the files we put up on the Internet on our websites, much less worry about how long someone takes to load our website....]]></description>
			<content:encoded><![CDATA[<p>One of the things I&#8217;ve realized when I started working for Yahoo! is the importance and &#8220;interesting-ness&#8221; of website performance optimization. In an industry where things can get repetitive (how many <code>&lt;p&gt;</code> tags can you code in one day?), the challenges brought about by ensuring a website is properly optimized in terms of performance and page load is welcome and quite engrossing.</p>
<p><em>With high-speed Internet, a lot of times we tend to forget about the size of the files we put up on the Internet on our websites, much less worry about how long someone takes to load our website.</em> It&#8217;s easy to forget, but when you&#8217;re on a crappy dialup or using your mobile phone as a model (er, like me while transitioning houses!), or you&#8217;re, say, a trouble-checker for one of the <a href="http://thefanlistings.org/">fanlisting</a> <a href="http://animefanlistings.org/">networks</a> out there, the wait for websites to load can take its toll, and feel painful on the pocket.</p>
<p>Two reasons why optimizing websites &#8212; even if you&#8217;re not Yahoo! &#8212; are:</p>
<ol>
<li> <em>You keep visitors longer</em>, because the wait time is less, and people like things faster than you can chug them out. It&#8217;s all about instant gratification these days. </li>
<li> <em>You save on bandwidth!</em> Something smaller by even 10kb can mean megs or gigs of bandwidth savings in the long run. If you pay for hosting and you have a fairly popular website, this is a big deal. </li>
</ol>
<p>A lot of this work is done on the frontend side of things. <em>After all, once the server has cobbled together the page, the bulk of serving the page code and objects rely on the user&#8217;s connection.</em> The <acronym title="HyperText Markup Language">HTML</acronym> code is just one part of what&#8217;s served out to people, but images, stylesheets and other media are downloaded all after the source is available. And these are the things that users see and perceive. The image below shows around a third of Firebug&#8217;s Network tab on one of my websites:</p>
<p><a href="http://whimsical.nu/wp-content/uploads/2008/08/firebug_network1.png"><img src="http://whimsical.nu/wp-content/uploads/2008/08/firebug_network1.png" alt="" title="Seasonal Plume under Firebug\&#039;s Network panel" width="500" height="295" class="alignnone size-full wp-image-268" /></a></p>
<p><em>Building and serving out the page takes up only 715ms. But the rest of the objects on the page are then loaded, and I end up with a 4.08-second load time.</em> That isn&#8217;t so bad, but all the rest of the objects on that page form the bulk of the load time that users have to endure. If we save a few milliseconds from each object, overall we can get a snappier load time for the whole page.</p>
<p>In <a href="http://www.websiteoptimization.com/speed/tweak/psychology-web-performance/">The Psychology of Web Performance</a>, Andrew King highlight a few interesting results of bloated load times, in case you&#8217;re still not convinced:</p>
<ul>
<li>
<blockquote>Google found that moving from a 10-result page loading in 0.4 seconds to a 30-result page loading in 0.9 seconds decreased traffic and ad revenues by 20% (Linden 2006).</p></blockquote>
</li>
<li>
<blockquote>Tests at Amazon revealed similar results: every 100 ms increase in load time of Amazon.com decreased sales by 1% (Kohavi and Longbotham 2007).</p></blockquote>
</ul>
<p>Over the next Frontend Fridays, I&#8217;ll talk a little more about some ways to optimize frontend performance. I&#8217;ll mostly be going through <a href="http://developer.yahoo.com/performance/">the rules Yahoo! has published</a>, but I will probably cherry-pick and talk about the ones I like most, the ones I like doing. Stay tuned :)</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/08/29/ff-website-optimization/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FF: Another look at skinning websites</title>
		<link>http://whimsical.nu/2008/08/22/ff-another-look-at-skinning-websites/</link>
		<comments>http://whimsical.nu/2008/08/22/ff-another-look-at-skinning-websites/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 04:00:31 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[branding]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[website themes]]></category>
		<category><![CDATA[website-skinning]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=258</guid>
		<description><![CDATA[I&#8217;ve always liked themes and website skins, the type where visitors can change the look of a website using a switcher. I even made a script for it. I think they&#8217;re a fabulous tool for making a website interactive, and giving users the power of choosing how they want to experience the website in question. This is most useful and prevalent in forums and boards, where users are many and varied: some prefer reading in dark environments, and some prefer lighter ones. But of late I&#8217;ve been thinking that theming and skinning websites isn&#8217;t all that great, especially viewed in...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always liked themes and website skins, the type where visitors can change the look of a website using a switcher. <a href="http://scripts.indisguise.org/siteskin/">I even made a script for it.</a> I think they&#8217;re a fabulous tool for making a website interactive, and giving users the power of choosing how they want to experience the website in question. This is most useful and prevalent in forums and boards, where users are many and varied: some prefer reading in dark environments, and some prefer lighter ones.</p>
<p><strong>But of late I&#8217;ve been thinking that theming and skinning websites isn&#8217;t all that great,</strong> especially viewed in certain conditions. To clarify: I&#8217;m talking about a theme or skin being <em>more</em> than a color-only difference between themes/skins.</p>
<p><em>I realized that one of the drawbacks for me is the false sense of &#8220;interactivity&#8221; in the website.</em> Understand, the websites I&#8217;ve skinned are all smallish fansites and fanlistings, containing minimal updates. Skinning has become one of the most popular &#8220;interactive&#8221; features of a fanlisting. Unfortunately, it&#8217;s lulled me into feeling that it&#8217;s &#8220;enough&#8221;. Which is a bad place to be for anyone who owns a website. More content and other forms of interactivity should be the focus; there are plenty of other ways to do that.</p>
<p><em>It&#8217;s lulled me into keeping old layouts around.</em> I&#8217;m ashamed to say a couple of them are half-assed layouts that are there because the more skins there are, the nicer the website is! And, why skin a website when you only have two skins? So keep them all and give the users choice. Uhm, wrong tactic there. Skin retirement should be done semi-regularly, to keep layouts fresh and up-to-date.</p>
<p><em>I also can&#8217;t help but feel that there <strong>has</strong> to be some brand dilution there somewhere,</em> unless skinning is carefully managed, of course. You have a subset of users using one skin, another subset using another, and unless these skins are quite similar (like the really nifty Day/Night skins I&#8217;ve seen crop up recently) the users of skin 1 will tend to approach the website differently from users of skin 2. Websites who&#8217;ll have these problems will probably be few and far between, but I can&#8217;t help but feel that this is a valid concern.</p>
<p>I certainly feel that skinning is one aspect of website interactivity that one should take a look at when planning a website, but shouldn&#8217;t be taken lightly. It adds a bit more complexity to managing the website and the users of the website, but when done well, it&#8217;s a fun feature for visitors. I still can&#8217;t get over the Day/Night skins some websites use; if it would work for one of my websites, I&#8217;m soooo there! ;)</p>
<p>But for now, I&#8217;m steering clear of skinning until I&#8217;ve real reason to use it.</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/08/22/ff-another-look-at-skinning-websites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: Too much AJAX</title>
		<link>http://whimsical.nu/2008/08/08/frontend-friday-too-much-ajax/</link>
		<comments>http://whimsical.nu/2008/08/08/frontend-friday-too-much-ajax/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 06:00:00 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[graceful degradation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=247</guid>
		<description><![CDATA[Alex asked in last week&#8217;s Frontend Friday: I just wanted to know how you decide how much AJAX is too much AJAX? You don’t seem to use much (if any) on this website. It&#8217;s a good question, but the answer isn&#8217;t too straightforward: it will always depend on a large number of factors. For me, an indication of a developer/team getting too AJAX-happy would be when the site becomes unusable when JavaScript is turned off or isn&#8217;t working. For example, a website that loads all (or most) of its content via AJAX, therefore rendering the page content-less without JavaScript; or...]]></description>
			<content:encoded><![CDATA[<p>Alex <a href="http://scripts.indisguise.org/2008/08/01/frontend-friday-got-questions/#comment-52346">asked in last week&#8217;s Frontend Friday</a>:</p>
<blockquote><p>I just wanted to know how you decide how much <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> is too much <acronym title="Asynchronous JavaScript and XML">AJAX</acronym>? You don’t seem to use much (if any) on this website.</p></blockquote>
<p>It&#8217;s a good question, but the answer isn&#8217;t too straightforward: it will always depend on a large number of factors. For me, <em>an indication of a developer/team getting too <acronym title="Asynchronous JavaScript and XML">AJAX</acronym>-happy would be when the site becomes unusable when JavaScript is turned off or isn&#8217;t working.</em> For example,</p>
<ol>
<li>a website that loads all (or most) of its content via <acronym title="Asynchronous JavaScript and XML">AJAX</acronym>, therefore rendering the page content-less without JavaScript; or </li>
<li>a website whose navigation is inaccessible without JavaScript.</li>
</ol>
<p>JavaScript should enhance websites and applications, no doubt about that. Most, if not all, of the well-loved web apps of today are due to the snazzy-ness of <acronym title="Asynchronous JavaScript and XML">AJAX</acronym>. But we can&#8217;t always rely on JavaScript being present: even if users have it turned on, spotty connections and unexpected data returns can result in JavaScript being pretty much nonexistent. Progressive enhancement and/or graceful degradation should be important when working with JavaScript&#8211;whether or not you&#8217;re doing asynchronous calls or not.</p>
<p><em>However, like I said, the answer isn&#8217;t straightforward. Some applications really do rely on the existence of JavaScript, and for good reasons.</em> Graceful degradation can be prohibitively difficult when you&#8217;re dealing with some specialized web applications, like mail: <a href="http://mail.yahoo.com">Yahoo! Mail</a> and <a href="http://mail.google.com">GMail</a> come to mind. User interactions with both of these are so fine-tuned and uses a lot of convoluted interlocking parts, and degrading gracefully would be a pain. That&#8217;s why both apps have a no-JavaScript version as well (Mail Classic and Basic <acronym title="HyperText Markup Language">HTML</acronym> view, respectively).</p>
<p>As for the second part of the question&#8211;no, Indiscripts doesn&#8217;t use any <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> :) Mostly because I don&#8217;t see a need for it, or the &#8220;need&#8221; to use <acronym title="Asynchronous JavaScript and XML">AJAX</acronym> is lower than the time I have budgeted for designing and coding up my tech blog ;)</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/08/08/frontend-friday-too-much-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: Got questions?</title>
		<link>http://whimsical.nu/2008/08/01/frontend-friday-got-questions/</link>
		<comments>http://whimsical.nu/2008/08/01/frontend-friday-got-questions/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 07:03:13 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[free for all]]></category>
		<category><![CDATA[questions]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=242</guid>
		<description><![CDATA[For this week, I&#8217;m doing a free-for-all: if you have something you&#8217;re curious about in terms of HTML, CSS and JavaScript, post your question in the comments and I&#8217;ll cover your question in future Frontend Fridays. Nothing is &#8220;too simple&#8221;, so feel free to post questions (please try to keep clear of Enthusiast-only questions though! ;) ). The reason for this (rather abrupt) post is that due to my rather freaky schedule this week (I&#8217;m moving by end of the month, and we&#8217;re hopefully signing a tenancy agreement this coming Monday, finally), I wasn&#8217;t able to prepare for this week&#8217;s...]]></description>
			<content:encoded><![CDATA[<p>For this week, I&#8217;m doing a free-for-all: <em>if you have something you&#8217;re curious about in terms of <acronym title="HyperText Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym> and JavaScript, post your question in the comments and I&#8217;ll cover your question in future Frontend Fridays.</em> Nothing is &#8220;too simple&#8221;, so feel free to post questions (please try to keep clear of Enthusiast-only questions though! ;) ).</p>
<p>The reason for this (rather abrupt) post is that due to my rather freaky schedule this week (I&#8217;m moving by end of the month, and we&#8217;re hopefully signing a tenancy agreement this coming Monday, <em>finally</em>), I wasn&#8217;t able to prepare for this week&#8217;s Frontend Friday. I had a draft in the works but unfortunately, it needs more research than I have time for this week.</p>
<p>Let me know in the comments! :)</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/08/01/frontend-friday-got-questions/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>FF: Hidden data in Jpegs</title>
		<link>http://whimsical.nu/2008/07/25/ff-hidden-data-in-jpegs/</link>
		<comments>http://whimsical.nu/2008/07/25/ff-hidden-data-in-jpegs/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 00:00:52 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jhead]]></category>
		<category><![CDATA[jpegs]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=228</guid>
		<description><![CDATA[We all know about EXIF data in photos we take with our digital cameras, which is one type of metadata that can be present in images. This metadata provides additional information about the picture, and for photos taken with digital cameras it can include the make of the camera, shutter speed, aperture, and various other information. There are other formats like IPTC and XMP. This metadata provides good information, but how important is that information when porting images on the web? Metadata is information enclosed in the file, hence any metadata adds to the file&#8217;s total size. This is good,...]]></description>
			<content:encoded><![CDATA[<p>We all know about EXIF data in photos we take with our digital cameras, which is one type of metadata that can be present in images. This metadata provides additional information about the picture, and for photos taken with digital cameras it can include the make of the camera, shutter speed, aperture, and various other information. There are other formats like IPTC and XMP.</p>
<p><em>This metadata provides good information, but how important is that information when porting images on the web?</em> Metadata is information enclosed in the file, hence any metadata adds to the file&#8217;s total size. This is good, except when we&#8217;re talking about, say, a preview/thumbnail metadata of a thumbnail image for your photo gallery. Redundant much?</p>
<p>I actually have been hit by this quirk&#8211;I kept wondering why my newly installed Photoshop kept giving me 100&#215;100 jpegs that were 100kb in size! (Yes, I was making <a href="http://livejournal.com/">Livejournal icons</a>.) I found out (after a week or so of confusion whenever I&#8217;d try) that I was including previews in my saved files because of a default setting. <strong>I got my 100&#215;100 jpegs down to 39kb, from 100kb+. That potentially saves me ~61kbs of bandwidth per image fetch!</strong></p>
<p>Stripping this metadata can be done via several methods. One is via the use of <a href="http://www.irfanview.com/">IrfanView</a>, which I&#8217;ve heard around, but as it&#8217;s Windows-only I haven&#8217;t tried it out. I also found <a href="http://www.sentex.ca/~mwandel/jhead/">jhead</a>, which is a free, open source program that runs on multiple platforms. It&#8217;s all command-line though, so if you like <acronym title="Graphical User Interface">GUI</acronym>, you might better stick with the former.</p>
<p>I did try out <em>jhead</em>, and I&#8217;m quite satisfied. It&#8217;s a quick, no-nonsense program which <a href="http://www.sentex.ca/~mwandel/jhead/usage.html">has a lot of capabilities</a>, but it also does the job I want quickly: remove all metadata.</p>
<p>To use <em>jhead</em>, you should download <a href="http://www.sentex.ca/~mwandel/jhead/">an appropriate release from the website</a>, save it somewhere, then open up Terminal (or the Command Prompt) and change the directory to where you downloaded <em>jhead</em>. If you&#8217;re using Linux/Unix/OSX, remember to set the executable bit if you downloaded the pre-built executable files by typing <code>chmod +x jhead</code> at the prompt.</p>
<p>For my case, I did a test with <a href="http://seasonalplume.net/wp-content/themes/greenpattern/i/pattern.jpg">a background pattern I&#8217;m using at Seasonal Plume</a>:</p>
<pre><code> $ ./jhead -purejpg stripped.jpg
Modified: stripped.jpg</code></pre>
<p>And that resulted in an image that was 8kbs smaller.</p>
<p><a href="http://whimsical.nu/wp-content/uploads/2008/07/jhead_result1.png"><img src="http://whimsical.nu/wp-content/uploads/2008/07/jhead_result1.png" alt="" title="jhead jpeg only result" width="500" height="224" class="alignnone size-full wp-image-230" /></a></p>
<p>This is a quick, painless way to help you save on bandwidth costs and have your websites load faster. I&#8217;ve recently gone through a Site Integrity Seminar at work and this is one of the things that I came away with that&#8217;s easily done to speed website performance. Given the fact that I did encounter this problem not too long ago, I hope this week&#8217;s Frontend Friday was helpful ;) and that you can use it for your own websites.</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/07/25/ff-hidden-data-in-jpegs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: What do you do?</title>
		<link>http://whimsical.nu/2008/07/18/frontend-friday-what-do-you-do/</link>
		<comments>http://whimsical.nu/2008/07/18/frontend-friday-what-do-you-do/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 02:15:01 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[definition]]></category>
		<category><![CDATA[tasks]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=207</guid>
		<description><![CDATA[This is something that I&#8217;ve been wondering about for quite a while now: What constitutes &#8220;web development&#8221;, and what exactly are we called? The definition for this, ah, way of life/subset of tasks seems to differ from culture to culture, even from person to person. I&#8217;ve come across the following, all on the subject of &#8220;web development&#8221;: everything to do with how information is presented to the user; built up of HTML, CSS, images (spriting etc), and presentational JavaScript; or everything that&#8217;s rendered client-side, which is all HTML, CSS, images, and all JavaScript, or everything to do with how and...]]></description>
			<content:encoded><![CDATA[<p>This is something that I&#8217;ve been wondering about for quite a while now: <em>What constitutes &#8220;web development&#8221;, and what exactly are we called?</em> The definition for this, ah, way of life/subset of tasks seems to differ from culture to culture, even from person to person.</p>
<p>I&#8217;ve come across the following, all on the subject of &#8220;web development&#8221;:</p>
<ol>
<li> everything to do with <em>how</em> information is presented to the user; built up of <acronym title="HyperText Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, images (spriting etc), and presentational JavaScript; or </li>
<li> everything that&#8217;s rendered client-side, which is all <acronym title="HyperText Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, images, and all JavaScript, or </li>
<li> everything to do with <em>how and what</em> information is presented to the user; build up of <acronym title="HyperText Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, images, JavaScript, and <acronym title="Pre-Hypertext Processing">PHP</acronym> that&#8217;s served to a browser </li>
<li> everything that has to do with the web: <acronym title="HyperText Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheets">CSS</acronym>, images, JavaScript, <acronym title="Pre-Hypertext Processing">PHP</acronym>, MySQL, web servers, etc.
</ol>
<p>Even though the web has been here for a while already, there seems to be a lot of differences between how we (who work on the web) are called, and what is expected of us. Personally I&#8217;ve always viewed web development as a mix of the last two options, basing on the phrase, &#8220;I develop for the web&#8221;. The lines blur especially when we&#8217;re talking about JavaScript and <acronym title="Pre-Hypertext Processing">PHP</acronym>. Both are programming languages, and might fall in the realm of software developers more.</p>
<p><strong>As someone who works (be it as full-time work, freelance, or as a hobby) on the web, what do you consider part of what you do?</strong> Let me know in the comments!</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/07/18/frontend-friday-what-do-you-do/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: Implementation focus on Indiscript&#8217;s lettered menu</title>
		<link>http://whimsical.nu/2008/07/11/frontend-friday-implementation-focus-on-indiscripts-lettered-menu/</link>
		<comments>http://whimsical.nu/2008/07/11/frontend-friday-implementation-focus-on-indiscripts-lettered-menu/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 00:00:22 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[implementation focus]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[navigation menus]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[sprites]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=209</guid>
		<description><![CDATA[For this week&#8217;s Frontend Friday I wanted to get a little more technical, and decided on focusing on and working though the implementation of Indiscript&#8217;s menus &#8212; the main navigation up top, and the script highlights on the sidebar: What&#8217;s interesting about this implementation is that if I were to rename sections around, add new scripts to the sidebar, and otherwise need &#8220;new&#8221; menu items, I&#8217;ll never need to do anything more than just add the menu/link item, and every menu item or link presented this way makes use of just one 61.5kb image. When I was working with the...]]></description>
			<content:encoded><![CDATA[<p>For this week&#8217;s <em>Frontend Friday</em> I wanted to get a little more technical, and decided on <strong>focusing on and working though the implementation of Indiscript&#8217;s menus</strong> &#8212; the main navigation up top, and the script highlights on the sidebar:</p>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/07/mainmenu1.png'><img src="http://whimsical.nu/wp-content/uploads/2008/07/mainmenu1.png" alt="" title="Scripts.Indisguise.Org main navigation" width="500" height="47" class="alignnone size-full wp-image-210" /></a></p>
<p>What&#8217;s interesting about this implementation is that if I were to rename sections around, add new scripts to the sidebar, and otherwise need &#8220;new&#8221; menu items, I&#8217;ll never need to do anything more than just add the menu/link item, and every menu item or link presented this way makes use of just one 61.5kb image.</p>
<p>When I was working with the Indiscripts revamp, I knew I wanted something relatively simple, light, and easy to implement and extend for if/when I need to add new sections to the website. Usually that meant that artsy menu items were out&#8230;but I didn&#8217;t want to give up so easily. <em>The result is the menu/link style you see now: an artsy letter serves as a background, usually in plain grey. The active menu item is green, and when you&#8217;re hovering over it, it becomes orange. If I wanted to use blue, pink, yellow, brown, etc&#8211;that&#8217;s all possible, with the help of <acronym title="Cascading Style Sheets">CSS</acronym> and <acronym title="Portable Network Graphics">PNG</acronym>.</em></p>
<p>To make sure I have everything ready for if/when the time comes to add sections, I prepared a sprite image containing all the letters of the alphabet. For the uninitiated, a sprite (in terms of web development/<acronym title="Cascading Style Sheets">CSS</acronym>) is an image made up of several smaller images in measured distances from each other, in the interests of reducing <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests and speed up website load times (see <a href="http://spritegen.website-performance.org/section/what-are-css-sprites">Website Performance&#8217;s <em>What are <acronym title="Cascading Style Sheets">CSS</acronym> sprites?</em></a>).</p>
<p><span id="more-407"></span>Part of my letter sprite looks like this (black background added for clarity):</p>
<p><a href='http://whimsical.nu/wp-content/uploads/2008/07/partsprite1.gif'><img src="http://whimsical.nu/wp-content/uploads/2008/07/partsprite1.gif" alt="" title="Part of the letters sprite" width="500" height="309" class="alignnone size-full wp-image-211" /></a></p>
<p>A couple of notes on this sprite:</p>
<ol>
<li> The distances between each sprite is carefully calculated, and yes, manually done. That means that if I have a menu item that is too long (say more than 550 pixels wide), the letter next to the sprite shows up. But we&#8217;re talking menu items here, anyway, so this isn&#8217;t a big issue. I could even go as low as a width of 300 pixels. </li>
<li> If you scrutinize the above sample, the letters are cut off at the top and left of the letters, because this forms the upper left corner of the menu item. There is pretty much no reason to keep the swirls at that portion of the letters, because it <em>will</em> be cut off, and keepting them would add complexity and raise the file size of the sprite. However, it is important to keep the swirls to the right and bottom of the letter, because the menu items will probably expand to the right and/or grow taller depending on the content of the item. Its limitation? I can&#8217;t have these artsy letters aligned on the right. </li>
<li> I could have used <acronym title="Graphics Interchange Format">GIF</acronym>, but I went with <acronym title="Portable Network Graphics">PNG</acronym>. <acronym title="Portable Network Graphics">PNG</acronym> is well-supported now, except for <acronym title="Internet Explorer 6">IE6</acronym>, but basically <acronym title="Portable Network Graphics">PNG</acronym> here lets me have different, <acronym title="Cascading Style Sheets">CSS</acronym>-specified backgrounds for the letter, and have the letter blend cleanly against the solid background. Win! </li>
</ol>
<p>Once that&#8217;s ready, it&#8217;s time for the markup. Basically what we&#8217;re doing is we need at least two separate &#8220;layers&#8221; for each menu/link item. One for the colored background (grey, green, and orange); one for the letter on top of this, which should let the colored background show through; and then our actual menu item, if we have multiple-word-set menu items.</p>
<p>Time for some pretty code (with just one, current menu item):</p>
<pre><code>&lt;ul class="menu"&gt;
&lt;li&gt;
  &lt;a href="http://scripts.indisguise.org" id="menu-blog" class="current"&gt;
    &lt;div class="swirl-b"&gt;
      &lt;h3&gt;Blog&lt;/h3&gt;
      &lt;p&gt;tech babble&lt;/p&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<p>Now we need to have the menu list items line up horizontally, and we do that with floating things:</p>
<pre><code>ul.menu li {
   list-style-type: none;
   float: left;
   border-right: 3px solid #fff; /* whitespace between each menu item */
   font-size: 85%;
   height: 54px;
   overflow: hidden;
}</code></pre>
<p>We also need to color the background of an ordinary link to a nice light shade of grey, as well as tacking on additional colors for when we have a currently active menu item, or when hovering over. The current menu item is identified with a <code>current</code> class, but otherwise there shouldn&#8217;t be any classes involved. This one forms our background layer. We use the <code>&lt;a&gt;</code> tag so that the whole item is a link, plus we can change the background color across all browsers (<acronym title="Internet Explorer">IE</acronym> doesn&#8217;t recognize the <code>:hover</code> pseudo-class on anywhere other than <code>&lt;a&gt;</code> tags).</p>
<pre><code>ul.menu li a {
   display: block;
   text-decoration: none;
   background: #e7e7e7;
}
ul.menu li a.current { background: #bddcbd; }
ul.menu li a:hover, ul.menu li a:active { background: #eed6b4; }
ul.menu li a.current:hover, ul.menu li a.current:active { background: #bddcbd; }</code></pre>
<p>The next layer is our artsy letter layer, which is the div with a class pertaining to the letter we want to show. First we need set up our actual swirl classes:</p>
<pre><code>.swirl-a, .swirl-b, ... .swirl-x, .swirl-y, .swirl-z { background: url('sprite.png') no-repeat top left; }
.swirl-a { background-position: 0 -30px; }
.swirl-b { background-position: 0 -210px; }
...
.swirl-x { background-position: -1120px -210px; }
.swirl-y { background-position: -1120px -390px; }
.swirl-z { background-position: -1120px -570px; }</code></pre>
<p>I just showed the classes for the letters A, B, X, Y and Z for simplicity&#8217;s sake. I separated the style rule for the common background to minimize code repetition. This can be tricky and a bit tedious, but a nice ol&#8217; calculator can do wonders, if you&#8217;ve set up your sprite correctly. After all, the distance of all the sprites are calculated and measured.</p>
<p>Now we have the rest of the styles for our swirl <code>&lt;div&gt;</code>, as well as the <code>&lt;h3&gt;</code> and <code>&lt;p&gt;</code> tags I use for the actual menu text: paddings, font sizes, colors, etc. If I ever need more menu items, or change a menu item&#8217;s name, I can just keep adding/changing the markup for that menu item, and everything&#8217;s set up for me immediately.</p>
<p>Hope this entry gives inspiration and ideas for more, better implementations. Feel free to ask away if something&#8217;s unclear. :)</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/07/11/frontend-friday-implementation-focus-on-indiscripts-lettered-menu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Frontend Friday: Watch out for Divitis</title>
		<link>http://whimsical.nu/2008/07/04/frontend-friday-watch-out-for-divitis/</link>
		<comments>http://whimsical.nu/2008/07/04/frontend-friday-watch-out-for-divitis/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 00:00:37 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=201</guid>
		<description><![CDATA[Back when I first started using CSS, my favorite tag was undoubtedly the &#60;div&#62;. It was so versatile, and I did everything I could with that tag. It introduced me to absolute positioning and the CSS in general, and I&#8217;m forever grateful, but it also brought me away from the basics: HTML as a markup language. It&#8217;s also known as divitis: that is, having one too many &#60;div&#62; tags. The result was code bloat, and once I started weaning away from this practice, I had hundreds of files to update, as they all looked like: &#60;div class="content"&#62; &#60;div class="title"&#62;Some heading!&#60;/div&#62;...]]></description>
			<content:encoded><![CDATA[<p>Back when I first started using <acronym title="Cascading Style Sheets">CSS</acronym>, my favorite tag was undoubtedly the <code>&lt;div&gt;</code>. It was so versatile, and I did everything I could with that tag. It introduced me to absolute positioning and the <acronym title="Cascading Style Sheets">CSS</acronym> in general, and I&#8217;m forever grateful, but it also brought me away from the basics: <acronym title="HyperText Markup Language">HTML</acronym> as a markup language. It&#8217;s also known as <em>divitis</em>: that is, having one too many <code>&lt;div&gt;</code> tags.</p>
<p>The result was code bloat, and once I started weaning away from this practice, I had hundreds of files to update, as they all looked like:</p>
<pre><code>&lt;div class="content"&gt;
&lt;div class="title"&gt;Some heading!&lt;/div&gt;
&lt;div class="date"&gt;July 4, 2008&lt;/div&gt;
&lt;p&gt;This is some of the content of the page. Yay!&lt;/p&gt;
&lt;div class="subtitle"&gt;Some subheading&lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>(I&#8217;m sure if you look hard enough you&#8217;ll find a couple of my older sites still sporting this sort of markup.)</p>
<p>Movements and events like <a href="http://naked.dustindiaz.com/">the annual <acronym title="Cascading Style Sheets">CSS</acronym> Naked Day</a> woke me (and hopefully a few others) to the sad truth that as web developers and designers, we can be so <em>obsessive</em> about needing every single pixel in place, but completely forget about keeping the house clean. The impact may be minimal at the onset (i.e., &#8220;hey, everyone sees the pretty decors after all!&#8221;) but just like your house after a rush cleaning because people are coming over tonight, you have to deal with guests stumbling into hidden mess, things not in the right place, and a painful cleanup job afterward.</p>
<p>(Of course, there&#8217;s the other end of the spectrum where holy wars are raged between the use of a <code>&lt;ul&gt;</code> and a <code>&lt;table&gt;</code> tag, which is just as bad, <acronym title="In my opinion">IMO</acronym>.)</p>
<p>There are three things I do when working on a website to help me keep as close to &#8220;clean&#8221; as possible:</p>
<ol>
<li> <em>Keep markup in the back of your mind when creating your design.</em> The best example of this is creating a navigation menu. Can it be done in lists? What sort of arcane <acronym title="Cascading Style Sheets">CSS</acronym>-fu is needed to make it work like so? </li>
<li> <em>Start with a bare <acronym title="HyperText Markup Language">HTML</acronym> page.</em> I&#8217;m doing this right now for a couple of projects. I have wireframes (structures) where I&#8217;ve laid out roughly where things are going, but nothing else. No colors, no images, no JavaScript, just plain ol&#8217; markup-py goodness. </li>
<li> <em>Once done, remove stylesheets and take a look.</em> It&#8217;s easy for me to lose track of things when I&#8217;m on a roll, so this one personally has made me cringe a lot of times. Temporarily removing all styles from my work is a good way to see if it&#8217;s still readable and navigable even without all my pretty styles, and that it&#8217;s as close to how I designed it as possible. (This pretty much destroys all unordered lists masquerading as tables&#8230; so beware.) </li>
</ol>
<p>Remember: there are <a href="http://www.w3.org/TR/html401/index/elements.html">91 <acronym title="HyperText Markup Language">HTML</acronym> tags</a> available, one of which might serve the need and communicate your intent better. But don&#8217;t force it: sometimes saying nothing at all is better than being misunderstood.</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/07/04/frontend-friday-watch-out-for-divitis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

