<?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>Pixel Acres &#187; Web Design</title>
	<atom:link href="http://f6design.com/journal/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://f6design.com/journal</link>
	<description>Adventures in web and graphic design</description>
	<lastBuildDate>Wed, 16 May 2012 06:50:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Build a parallax scrolling website interface with jQuery and CSS</title>
		<link>http://f6design.com/journal/2011/08/06/build-a-parallax-scrolling-website-interface-with-jquery-and-css/</link>
		<comments>http://f6design.com/journal/2011/08/06/build-a-parallax-scrolling-website-interface-with-jquery-and-css/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 02:36:52 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML/XHTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=2141</guid>
		<description><![CDATA[Parallax scrolling website interfaces have been popping up all over the place recently. I didn&#8217;t want to miss out on the fun, so I have put together a parallax scrolling demo built using jQuery and CSS. Parallax what? Even if you&#8217;re not familiar with the term &#8220;parallax scrolling&#8221; you will certainly be familiar with the [...]]]></description>
			<content:encoded><![CDATA[<p>Parallax scrolling website interfaces have been popping up all over the place recently. I didn&#8217;t want to miss out on the fun, so I have put together a parallax scrolling demo built using jQuery and CSS.</p>
<p><a href="http://f6design.com/projects/parallax-scrolling/"><img src="http://f6design.com/journal/wp-content/uploads/2011/08/parallax-screenshot-578w.jpg" alt="Parallax scrolling interface" width="578" height="423" class="contentImg" /></a></p>
<h3>Parallax what?</h3>
<p>Even if you&#8217;re not familiar with the term &#8220;parallax scrolling&#8221; you will certainly be familiar with the technique. <a href="http://en.wikipedia.org/wiki/Parallax_scrolling">Parallax scrolling</a> is a 2d animation process that creates an illusion of depth by animating foreground layers faster than background layers. When you observe the landscape from a moving car, objects closer to the car appear to pass you faster than scenery further away. Parallax scrolling uses the same principle to trick the viewer into thinking they are observing a 3d scene.</p>
<h3>Demo and Download</h3>
<p>My demo web page shows one approach to building a vertical parallax scrolling interface:</p>
<p><a href="http://f6design.com/projects/parallax-scrolling/">View demo</a><br />
<a href="http://f6design.com/projects/parallax-scrolling/parallax-scrolling-demo.zip">Download source</a></p>
<p>You can scroll in the usual fashion, use the navigation menu at the right-hand side of the page, or the next/prev buttons that appear underneath each article. As you scroll, the page&#8217;s four content layers are animated independently of one another to create an illusion of depth.</p>
<p>The scrolling looks smoothest in Safari (at least that&#8217;s the case on my PC), but my demo should work in any modern browser.</p>
<p><em><strong>Disclaimer 1:</strong> Because this is just an experiment I&#8217;ve not spent any time optimising the demo to work on mobile devices. I wanted to keep the demo lean &#8216;n&#8217; mean, and not clutter it by sniffing mobile browsers and forking my code. On a production site you&#8217;d want to ensure that the site degrades gracefully on mobile devices, where scroll events and fixed positioning might work in unexpected ways.</em></p>
<p><em><strong>Disclaimer 2:</strong> The navigation menu in my demo is inspired by the menu on the Nike <a href="http://www.nikebetterworld.com/">Better World</a> website. If you plan on implementing a similar menu on a production site, please be aware of its origin.</em></p>
<h3>How it works</h3>
<p>The articles and background layers are given a fixed positioned with CSS, and assigned a <code>z-index</code> so that the foreground layers appear above the background layers. The four layers are: small clouds, large clouds, balloon/landscape images, articles.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* foreground (ballons/landscape) */</span>
<span style="color: #cc00cc;">#parallax-bg3</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">3</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50%</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* align left edge with center of viewport */</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">940px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-470px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* move left by half element's width */</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Within each layer individual content elements are absolutely positioned. This was the most fiddly part of the process, since the elements need to positioned in such a way that they align in a pleasing manner when the user scrolls to any of the four articles. In this case it was really just a process of trial and error.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#bg3-1</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-111px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">355px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#bg3-2</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">812px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">321px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* etc... */</span></pre></div></div>

<p>A few lines of jQuery control the parallax effect, triggered by a scroll event. I was surprised how easy this was to achieve, it is literally just a handful of lines of code.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'scroll'</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    parallaxScroll<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> parallaxScroll<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> scrolled <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">scrollTop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#parallax-bg1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span>scrolled<span style="color: #339933;">*</span>.25<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#parallax-bg2'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span>scrolled<span style="color: #339933;">*</span>.5<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#parallax-bg3'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">,</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span>scrolled<span style="color: #339933;">*</span>.75<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'px'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>As you can see the CSS <code>top</code> property is used to move each layer as the user scrolls. The foreground layer is always aligned to the top of the document, while the movement of other layers is adjusted according to their depth. The lower a layer sits in the stack, the less distance it is moved.</p>
<p>The rest of the jQuery is concerned with controlling the navigation menus. When the user clicks a navigation button the page scrolls to the top of the associated article. In the event that the user has JavaScript disabled, regular HTML anchor links still allow the page to be navigated, but without any fancy pants animations.</p>
<h3>Next steps</h3>
<p>I&#8217;m sure there are plenty of other approaches to parallax scrolling, and hopefully my experiment provides a starting point for your own explorations of the technique.</p>
<h3>Update</h3>
<p>I have updated the demo so that each parallax layer is given a fixed, rather than absolute, position. This approach gives a smoother scrolling effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/08/06/build-a-parallax-scrolling-website-interface-with-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>71</slash:comments>
		</item>
		<item>
		<title>Book Review: Dig Deal</title>
		<link>http://f6design.com/journal/2011/08/05/book-review-dig-deal/</link>
		<comments>http://f6design.com/journal/2011/08/05/book-review-dig-deal/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 05:36:01 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[News & Reviews]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=2090</guid>
		<description><![CDATA[Robert Hoekman, Jr is a user experience designer and consultant who is best known for his books about interface design, Designing the Obvious and Designing the Moment. His self-published book Big Deal: On Being Famous to Almost No One tackles a far more personal subject. In Big Deal Hoekman, Jr recounts his rise to the [...]]]></description>
			<content:encoded><![CDATA[<div class="align-right border"><img src="http://f6design.com/journal/wp-content/uploads/2011/08/big-deal-218w.png" alt="Big Deal book cover"  width="218" height="309" class="contentImg" /></div>
<p><a href="http://rhjr.net/">Robert Hoekman, Jr</a> is a user experience designer and consultant who is best known for his books about interface design, <a href="http://www.amazon.com/Designing-Obvious-Common-Approach-Application/dp/032145345X"><i>Designing the Obvious</i></a> and <a href="http://www.amazon.com/Designing-Moment-Interface-Design-Concepts/dp/0321535081"><i>Designing the Moment</i></a>. His self-published book <a href="http://www.goodreads.com/book/show/12254276-big-deal"><i>Big Deal: On Being Famous to Almost No One</i></a> tackles a far more personal subject. In <i>Big Deal</i> Hoekman, Jr recounts his rise to the top of the web design field, and describes how his craving for professional notoriety eventually devastated his personal friendships, marriage, and sense of self worth.</p>
<p>The form of celebrity Hoekman Jr discusses in <i>Big Deal</i> has been dubbed &#8220;micro-fame&#8221;:</p>
<blockquote><p>My name is Robert Hoekman, Jr, and in certain rooms, under certain circumstances, at certain moments, surrounded by certain people, and when all these very certain things come together, I am a big fucking deal.</p></blockquote>
<p>In other words, Hoekman, Jr might be unknown to the general public, but within the web design industry he is a bona fide rock star.</p>
<p>From the unique perspective that this notoriety affords, he takes the reader on a whirlwind tour of the conference rooms, hotel bars, book signings, photo opportunities and corporate retreats that consumed his attention as he rose the ranks of his profession. Along the way we rub shoulders with a veritable who&#8217;s who of the web industry: Matt Mullenweg, Jeff Veen, Jeffrey Zeldman, Caterina Fake, Luke Wroblewski, to name but a few.</p>
<p>Ultimately Hoekman, Jr&#8217;s craving for recognition and approval forces a crisis in his professional and personal life, and he has to face up to the root causes of his obsession with fame, and deal with the fallout.</p>
<p>This makes for fascinating reading, especially for a web design nerd such as myself, but I was left with the nagging feeling that Hoekman, Jr has &#8211; perhaps unwittingly &#8211; used his book about the pitfalls of fame as a platform to reinforce his cool kid credentials.</p>
<p>The nonstop cataloging of his professional achievements came across at times like bragging, and I wish he had dialed the self promotion back a notch. Even in the book&#8217;s later chapters, where he describes a dawning awareness that his obsession with fame is destroying his marriage, the laundry list of book signings and speaking engagements barely slows down. It is as if he wants to remind the reader that even though he no longer <em>cares</em> about being famous, he still <em>is</em> famous. </p>
<p>It is said that that pride comes before a fall, and in <i>Big Deal</i> Hoekman, Jr talks candidly about the flipside of his micro-fame: spiraling self doubt, professional rejection by Apple and Yahoo, isolation from friends, and the collapse of his marriage. It takes guts for a writer to expose their weaknesses so openly, but it feels a little like sitting in on someone else&#8217;s therapy session (in a psychotherapy cliché he lays much of the blame for his low self esteem at the feet of his mother). I imagine the process of writing <i>Big Deal</i> was extremely cathartic, but I question whether the experience of reading the book is  equally enlightening. </p>
<p>The problem is that <i>Big Deal</i> is all about Hoekman, Jr, and frankly I&#8217;m not sure that his personal experiences provide enough material to do the book&#8217;s topic justice. If more of <i>Big Deal</i> had been devoted to examining the impact of micro-fame in a broader context &#8211; the cult of celebrity engendered by social networking services like Twitter, say &#8211; the book might be better rounded, and have a broader appeal.</p>
<p>Despite the reservations I have outlined above, I still found <i>Big Deal</i> very enjoyable. There is no doubt that Hoekman, Jr is a talented writer, and has penned a book that can accurately be described as a page turner. I finished the book in one day, and certainly wasn&#8217;t left unsatisfied. Hoekman, Jr paints a very human picture of his life as a web industry A-Lister, and in a field where technical manuals are the norm <i>Big Deal</i> is quite unlike any other web design book I have read.</p>
<p><i>Big Deal: On Being Famous to Almost No One</i> will be released as an ebook through Amazon and iBooks later this year. <a href="http://rhjr.tumblr.com/post/5173363304/big-deal-on-being-famous-to-almost-no-one">Learn more about the book</a> on Robert Hoekman, Jr&#8217;s website.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/08/05/book-review-dig-deal/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to tell if you&#8217;re a web design OG</title>
		<link>http://f6design.com/journal/2011/07/12/how-to-tell-if-youre-a-web-design-og/</link>
		<comments>http://f6design.com/journal/2011/07/12/how-to-tell-if-youre-a-web-design-og/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 00:16:02 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=2061</guid>
		<description><![CDATA[This morning I&#8217;ve been following the hilarious (and cringe inducing) web design OG Twitter meme started by Jeff Croft (if you&#8217;re wondering, OG stands for Original Gangster). Here are a few of my favourites: If you created a website that had &#8220;Works best with Netscape Navigator&#8221; you may be a #design_og @_j12 If you remember [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I&#8217;ve been following the hilarious (and cringe inducing) <a href="http://search.twitter.com/search?had_popular=true&#038;q=%23design_og&#038;result_type=recent">web design OG</a> Twitter meme started by <a href="http://twitter.com/jcroft">Jeff Croft</a> (if you&#8217;re wondering, OG stands for Original Gangster). Here are a few of my favourites:</p>
<blockquote><p>If you created a website that had &#8220;Works best with Netscape Navigator&#8221; you may be a #design_og<br />
<a href="http://twitter.com/#!/_j12/status/90876432359763968">@_j12</a></p></blockquote>
<blockquote><p>If you remember Adobe PageMill, you may be a web design OG. #design_og<br />
<a href="http://twitter.com/#!/meyerweb/status/90876524101767168">@meyerweb</a></p></blockquote>
<blockquote><p>If you&#8217;ve ever said that your &#8220;site looks better in Netscape Navigator&#8221; you may just be a web design OG! #design_og<br />
<a href="http://twitter.com/#!/hudsonperalta/status/90886392565080064">@hudsonperalta</a></p></blockquote>
<blockquote><p>If you remember cleaning up bad Word-to-HTML markup by hand in a text editor, you might be a web design OG #design_og<br />
<a href="http://twitter.com/#!/DataG/status/90890989388054528">@DataG</a></p></blockquote>
<blockquote><p>If u ever designed an interactive CD-ROM you&#8217;re a #design_og<br />
<a href="http://twitter.com/#!/daveixd/status/90895527880818688">@daveixd</a></p></blockquote>
<blockquote><p>If you remember having to make sure that your hex colour codes were &#8220;web safe&#8221; you might be web design OG #design_og<br />
<a href="http://twitter.com/#!/stevecomrie/status/90907148007124993">@stevecomrie</a></p></blockquote>
<blockquote><p>If you used .midi files for audio on your webpage, maybe you are a #design_og<br />
<a href="http://twitter.com/#!/blueocto/status/90915850357444608">@blueocto</a></p></blockquote>
<blockquote><p>If you&#8217;ve ever optimized a website for 14.4, 28.8 and/or 33.6 baud rate modems, you might be a web design OG #design_og<br />
<a href="http://twitter.com/#!/digitaljhelms/status/90915860784480256">@digitaljhelms</a></p></blockquote>
<blockquote><p>If you still have some old business cards laying around where ur title was Webmistress, you&#8217;re a web #design_og (or OL as case may be)<br />
<a href="http://twitter.com/#!/flynine/status/90915862684516352">@flynine</a></p></blockquote>
<blockquote><p>If you used 1&#215;1 spacer gifs you may be a web design OG #design_og<br />
<a href="http://twitter.com/#!/trafnar/status/90920386878898176">@trafnar</a></p></blockquote>
<blockquote><p>If you ever thought while reading @alistapart article, &#8220;That&#8217;s great, but I&#8217;m still supporting IE3,&#8221; you might be a #design_og.<br />
<a href="http://twitter.com/#!/dylanw/statuses/90936282552860673">@dylanw</a></p></blockquote>
<p>And here are my contributions:</p>
<blockquote><p>If you ever designed a website that was hosted on Geocities, you may be a web design OG #design_og<br />
<a href="http://twitter.com/#!/f6design/status/90906731160403968">@f6design</a></p></blockquote>
<blockquote><p>If you ever designed a website for 640&#215;480 resolution, you may be a web design OG #design_og<br />
<a href="http://twitter.com/#!/f6design/status/90905962172514304">@f6design</a></p></blockquote>
<p>There are still plenty of goodies pouring in, so keep an eye on <a href="http://search.twitter.com/search?had_popular=true&#038;q=%23design_og&#038;result_type=recent">the meme</a>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/07/12/how-to-tell-if-youre-a-web-design-og/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Goodbye conditional comments</title>
		<link>http://f6design.com/journal/2011/07/10/goodbye-conditional-comments/</link>
		<comments>http://f6design.com/journal/2011/07/10/goodbye-conditional-comments/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 01:46:42 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=2047</guid>
		<description><![CDATA[The very first article I wrote on this blog, back in July 2006, was titled Goodbye hacks. Hello conditional comments. In that post I discussed how conditional comments could be used to feed different stylesheets to older version of Internet Explorer, smoothing differences between browser rendering engines without resorting to CSS hacks. Conditional comments have [...]]]></description>
			<content:encoded><![CDATA[<p>The very first article I wrote on this blog, back in July 2006, was titled <em><a href="http://f6design.com/journal/2006/07/14/goodbye-hacks/">Goodbye hacks. Hello conditional comments</a></em>. In that post I discussed how conditional comments could be used to feed different stylesheets to older version of Internet Explorer, smoothing differences between browser rendering engines without resorting to CSS hacks.</p>
<p>Conditional comments have provided a great stopgap measure while we wait for obsolete versions of IE to fall into disuse, but as the market share of IE6 and IE7 has dwindled I&#8217;ve found myself relying on them less and less. In fact, I can&#8217;t remember the last time I resorted to a separate stylesheet to make an old browser behave.</p>
<p>Last week Microsoft announced that <a href="http://blogs.msdn.com/b/ie/archive/2011/07/06/html5-parsing-in-ie10.aspx">support for conditional comment</a>s will be dropped from version 10 of Internet Explorer. Like other modern browsers IE10 will treat conditional comments just like regular HTML comments, and ignore them. This is a very encouraging sign, since it means that Microsoft are confidant that IE&#8217;s support for web standards has reached a level where a standards compliant website ought to &#8220;just work&#8221; across all modern web browsers, without having to make special allowances for legacy rendering engines. </p>
<p>Of course, conditional comments will continue to be recognised by older versions of IE, but with IE6 and IE7 ready to disappear off the radar the time is clearly right for conditional comments to be put out to pasture. Goodbye conditional comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/07/10/goodbye-conditional-comments/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to spot a troublesome client</title>
		<link>http://f6design.com/journal/2011/06/25/how-to-spot-a-troublesome-client/</link>
		<comments>http://f6design.com/journal/2011/06/25/how-to-spot-a-troublesome-client/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 22:22:25 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=1947</guid>
		<description><![CDATA[I&#8217;ve written in the past about how it is just as important to turn down the wrong clients as it is to work with the right ones, but even when a client ticks all the right boxes they might still spell trouble. Here are a few problematic clients to watch out for: The Carrot Dangler [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written in the past about how it is just as important to turn down the wrong clients as it is to work with the <a href="http://f6design.com/journal/2007/08/30/picking-clients-who-help-your-business/">right ones</a>, but even when a client ticks all the right boxes they might still spell trouble. Here are a few problematic clients to watch out for:</p>
<h3>The Carrot Dangler</h3>
<p>The Carrot Dangler will tempt you with promises of lucrative work in the future if you agree to take on their first project at a generous discount. Like the carrot that coaxes a donkey to pull its cart, this client hopes that the lure of more work will secure your loyalty, and make you receptive to the idea of lowering your fee.</p>
<p>It goes without saying that the dangling carrot will always remain just out of your reach, as elusive as the proverbial pot of gold at the end of a rainbow. If you do have an opportunity to work with this client in the future they will almost certainly plead poverty again, then dangle another carrot in front of you.</p>
<p>When confronted with a Carrot Dangler remind yourself that if they don&#8217;t have the money to pay you fairly now, they probably won&#8217;t in the future either. Don&#8217;t let the carrot tempt you into putting yourself at a financial disadvantage.</p>
<h3>The Aspiring Designer</h3>
<p>This type of client wishes they had gone to art school instead of business school, and sees the redesign of their website as a perfect opportunity to live out their fantasy of being a graphic designer. </p>
<p>The Aspiring Designer has little respect for your professional expertise, and secretly wishes they didn&#8217;t need to hire you at all. In this relationship they see themselves as the brain, and you as the brawn, little more than a Mac Monkey with the technical skills required to realize their grand vision.</p>
<p>You can spot an Aspiring Designer because at your initial meeting they will tell you they &#8220;have a few ideas for the site design&#8221;, and proceed to whip out a huge stack of ultra-detailed mockups that leave no room for you to do any real design work.</p>
<p>Think very carefully before taking on an Aspiring Designer as a client. The power they wield over you isn&#8217;t financial, it&#8217;s creative, and working for them can be a miserable, soul sapping experience.</p>
<p>If you do choose to work with the Aspiring Designer, make sure they understand that their role in your relationship is to define the business problem, and it is <em>your </em>job to propose a design solution. Make it clear that the appropriate solution may differ significantly from their preliminary mockups.</p>
<h3>The Broke Startup</h3>
<p>In the web industry the word &#8220;startup&#8221; has glamorous connotations, conjuring up images of overnight wealth, fame, and a jet-setting lifestyle.</p>
<p>When a prospective client describes their new Internet company as a startup you might imagine that they have come up with an idea for the next Facebook, YouTube or Twitter, and that untold riches await anyone who gets on board at the ground floor. The tradeoff? You have to build their website on the cheap, in return for equity in the company.</p>
<p>That probably sounds like an opportunity too good to pass up, but when you stop to think about it &#8220;startup&#8221; is just another word for &#8220;new business&#8221;, and the reality is that most new businesses never get off the ground. By offering you equity, your client is asking you to gamble <em>your</em> money on <em>their</em> business idea. In the likely event that your client&#8217;s idea fizzles, you&#8217;re left with a big handful of nothing.</p>
<p>Don&#8217;t let the allure of the word &#8220;startup&#8221; cloud your senses. You&#8217;re not operating a charity, and the fact that your client is a cash strapped entrepreneur doesn&#8217;t entitle them to special treatment. You should only enter into this type of business arrangement if you&#8217;re 110% committed to the startup, and are OK with the fact that your equity share will probably never amount to anything.</p>
<h3>Yay or nay?</h3>
<p>If you are approached by a client who fits one of the profiles outlined above, should you automatically put them in the &#8220;too hard&#8221; basket? Not necessarily. If you nip the problem in the bud it needn&#8217;t affect your relationship with the client. The trick is to spot the troublesome client coming, so that you can deal with them before any damage is done.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/06/25/how-to-spot-a-troublesome-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A website can&#8217;t be measured in pages</title>
		<link>http://f6design.com/journal/2011/06/23/a-website-cant-be-measured-in-pages/</link>
		<comments>http://f6design.com/journal/2011/06/23/a-website-cant-be-measured-in-pages/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 00:19:25 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=1927</guid>
		<description><![CDATA[For a long time page count has been used as a unit of measurement in web design and development. Clients will often phrase a pricing enquiry by asking &#8220;how much would it cost for a (x) page website?&#8221;, and when quoting on a project it can be tempting to measure the required effort in these [...]]]></description>
			<content:encoded><![CDATA[<p>For a long time page count has been used as a unit of measurement in web design and development. Clients will often phrase a pricing enquiry by asking &#8220;how much would it cost for a (x) page website?&#8221;, and when quoting on a project it can be tempting to measure the required effort in these terms. Some web developers go a step further by assigning a fixed value to a page, and sell page-based website packages to their clients: a 5 page website for $800, a 10 page site for $1,500 and so forth. This approach is shortsighted for several reasons.</p>
<h3>All pages are not created equal</h3>
<p>A page is not a one-size-fits-all unit of measurement. There are many factors to take into consideration: the needs of the site&#8217;s audience, the complexity of the desired feature set, the quality of the design, the time required to perform testing, the level and complexity of database interaction, and so on.</p>
<p>Would you measure the effort required to develop a website like Facebook or Twitter in &#8216;pages&#8217;? Of course not, and I don&#8217;t think <em>any</em> website can be quantified simply on the basis of how many pages it includes.</p>
<p>Assigning a fixed price to a page, or assuming that one page is much the same as another, greatly increases the chance of underestimating the effort required to build a site. If you neglect to properly consider all aspects of a project&#8217;s scope then you cannot accurately quote on the job. Even if you meet your cost estimate it may be necessary to omit functionality or skimp on testing in order to stay on budget.</p>
<h3>Selling yourself short</h3>
<p>Selling page-based website packages isn&#8217;t just an inaccurate way to gauge project scope,  it is a questionable way to turn a profit.</p>
<p>By treating a web page as a quantifiable unit with a measurable value, you position yourself as a service vendor rather than a web professional (for more on this distinction see <a href="http://designprofessionalism.com/"><em>Design Professionalism</em></a> by Andy Rutledge). You risk being lumped together with every web monkey offering bargain basement website packages, and your client will view their relationship with their you as akin to shopping at a department store or supermarket, where every retailer offers an identical range of products. </p>
<p>Marketing your services on the basis of quantity also leaves you no option but to compete on price. If one web developer sells a &#8216;page&#8217; for $200, and another for $100, why would a client choose the more expensive option? There is always going to be someone who can undercut you, and for a freelancer or small studio competing on price isn&#8217;t a sustainable business strategy.</p>
<h3>Forget about pages</h3>
<p>In the Web&#8217;s early years the concept of pages made more sense. Most websites were built using static HTML, their content comprised entirely of text and images. There was a certain equivalency between pages. Today&#8217;s average website is far more sophisticated, and may include dynamically generated content, AJAX interactions, a content management system, embedded video, integration with third party APIs and advanced social features. The myriad possible approaches to the task of building a website render the  idea of a &#8216;page&#8217; virtually meaningless.</p>
<p>A website&#8217;s architecture is an essential component of its specification, and understanding the way a site&#8217;s content is organised is key to establishing the project scope. But that understanding needs to be informed by more than just the number of pages the site will comprise. You need a firm grasp of the project requirements before you can think about quoting the job, and using page quantity as the sole gauge of effort will inevitably leave you under prepared.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/06/23/a-website-cant-be-measured-in-pages/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Best viewed in Safari</title>
		<link>http://f6design.com/journal/2011/05/05/best-viewed-in-safari/</link>
		<comments>http://f6design.com/journal/2011/05/05/best-viewed-in-safari/#comments</comments>
		<pubDate>Fri, 06 May 2011 05:45:37 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=1498</guid>
		<description><![CDATA[Remember when websites came with disclaimers listing their minimum viewing requirements, and shooed away anyone who didn&#8217;t make the grade? &#8220;This website is best viewed in Netscape Navigator&#8221; visitors would be advised, or &#8220;View this site in Internet Explorer at 800&#215;600 resolution&#8221;. Those were the bad old days, and I would like to believe that [...]]]></description>
			<content:encoded><![CDATA[<p>Remember when websites came with disclaimers listing their minimum viewing requirements, and shooed away anyone who didn&#8217;t make the grade? &#8220;This website is best viewed in Netscape Navigator&#8221; visitors would be advised, or &#8220;View this site in Internet Explorer at 800&#215;600 resolution&#8221;. Those were the bad old days, and I would like to believe that as a community we have learned our lesson and moved on, embracing graceful degradation and progressive enhancement as alternatives to the &#8220;my way or the highway&#8221; mentality. </p>
<p>This morning I visited a website that caused me to wonder if we&#8217;ve come so far after all. I was looking forward to experiencing the site&#8217;s typography, which I&#8217;d been informed was exemplary, and was surprised when my browser served up fallback system fonts rather than the embedded web fonts I was expecting. A warning message in the masthead informed me that if the fonts looked &#8220;kind of weird&#8221; I should switch to Chrome or Safari.</p>
<p>My guess is that the site&#8217;s designer had chosen a typeface that wasn&#8217;t properly optimised for on-screen display, and as a consequence the site&#8217;s typography didn&#8217;t fare well on certain browser and operating system combinations. Rather than adapt their design to suit a wider audience the designer decided to try and change their user&#8217;s behavior by instructing them to switch to a different web browser. As a web professional I was surprised to be admonished for choosing to use Firefox 4 &#8211; the latest version of a modern web browser &#8211; and I can only imagine what a less technically inclined visitor would make of the warning message.</p>
<p>Thankfully browser sniffing is still a rarity, but all too often I see evidence of designers who are ignorant of, or choose to ignore the fact that many embedded web fonts render in a sub optimal fashion on the Windows platform. For these designers the fact that the website looks nice on their own (presumably Apple branded) computer seems to be enough. Never mind the fact that 85% of the average website&#8217;s audience <a href="http://www.statowl.com/operating_system_market_share.php">use the Windows platform</a>, and will experience the site&#8217;s typography in a very different fashion. </p>
<p>Jeffrey Zeldman called the disparity between various browser and OS font rendering engines the &#8220;<a href="http://24ways.org/2009/real-fonts-and-rendering">elephant in the room</a>&#8221; &#8211; everyone knows the problem is there, but none of us wants to mention it for fear of spoiling the web font party. Sadly his warning seems to have gone unheeded by some. Too many web designers continue to make poor font selections, ignore the majority of their users, and jeopardize their website&#8217;s usability in the process.</p>
<p>Thankfully typeface designers are beginning to acknowledge the problem, and hinting their fonts for improved performance on the Windows platform. Recently the Skolar typeface, which used to look very shabby in Windows, was <a href="http://blog.typekit.com/2011/03/16/skolar-web-hinted-for-better-screen-rendering/">skillfully re-hinted</a> by Ross Mills and now renders superbly. But the responsibility doesn&#8217;t rest solely with type designers &#8211; web designers and font vendors need to do their share too. Mills wrote an article for Typographica called <a href="http://typographica.org/2011/on-typography/the-state-of-webfont-quality-from-a-type-designers-view/">The State of Webfont Quality from a Type Designer’s View</a> in which he urges all parties involved in the production and distribution of web fonts to carefully consider the quality of the fonts being released. From my perspective that means web designers too: if we don&#8217;t choose our web fonts appropriately then can we really claim to be doing our jobs properly? </p>
<p>The case can be made that Apple&#8217;s approach to font rendering is superior to Microsoft&#8217;s, but that doesn&#8217;t give web designers an excuse for subjecting Windows users to a substandard typographic experience. Web design has always been about compromise and working within technical limitations. Trying to modify user&#8217;s behaviour by convincing them to switch operating system or browser won&#8217;t work, and designing for a single platform is simply irresponsible.</p>
<p>Instead, why not restrict our typeface choices to those fonts that have been optimised to render well on both the Macintosh and Windows platforms? There are plenty of well hinted fonts out there, and as the web font marketplace matures the number of choices will continue to grow. Yes, it requires patience and restraint, but restraint should be something we&#8217;re all used to by now &#8211; for years we&#8217;ve had to make do with the handful of fonts that come pre-installed on both Windows and Mac OS. Surely it won&#8217;t kill us to continue using a little of that self-control and limit ourselves to web fonts that render well for all our users, instead of designing for a minority.</p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2011/05/05/best-viewed-in-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion for web development: Part 3</title>
		<link>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/</link>
		<comments>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 09:48:46 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=975</guid>
		<description><![CDATA[ In the final article of the series I will talk about configuring a local Apache webserver to integrate smoothly with your development working copy, and how to deploy a version controlled website to a live webserver.]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/">first</a> and <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">second</a> parts of this series you learned what version control is, and how to put a place a website under version control using Subversion. In this final article I will talk about configuring a local Apache webserver to integrate smoothly with your development working copy, and how to deploy a version controlled website to a live webserver.</p>
<h3>Working with a local web server</h3>
<p>Except for the very simplest sites, my web projects require PHP and therefore must run on a webserver with PHP installed. For testing purposes I have an Apache webserver installed on my local computer &#8211; I use <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>, which is a free Apache/MySQL/PHP distribution for Linux, Windows, Mac OS X and Solaris.</p>
<p>For each project I create an Apache virtual host, which allows the website to have its own domain root. This is configured in Apache&#8217;s <em>httpd-vhosts.conf</em> file:</p>
<pre><code>&lt;VirtualHost *:80&gt;
    DocumentRoot "D:/jobs/my_project/dev/_svn_working_copy/www"
    ServerName myproject.local
    ServerAlias www.myproject.local
    ErrorLog "logs/error.log"
    CustomLog "logs/access.log" combined
    &lt;Directory "D:/jobs/my_project/dev/_svn_working_copy/www"&gt;
	Options Indexes FollowSymLinks Includes ExecCGI
	AllowOverride All
	Order allow,deny
	Allow from all
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;</code></pre>
<p>The important thing to note here is that the DocumentRoot points at the <em>www</em> directory of my Subversion working copy, not at a sub-directory of my XAMPP installation, as would usually be the case. This allows me to keep the development version of the site in the same location as all my other project files, in this case: <em>D:/jobs/my_project</em>.</p>
<p>The job folder also contains Photoshop mockups, wireframes, image assets and any other files related to the project. Keeping these files all in the one spot makes it easy to backup the project &#8211; I simply burn the entire job folder to disc or an external hard drive.</p>
<h3>Version control is not backup</h3>
<p>While we are on the topic of backup, I think it is important to point out that your should never rely on Subversion alone as a backup solution.</p>
<p>It is tempting to think of a Subversion repository as an alternative to conventional backup strategies, since in many respects a repository seems like the perfect backup: it is stored off site, it is well commented, and it has a history of every change ever made to your project. But by relying on the repository for backup you are putting all of your eggs in one basket. If the repository is ever corrupted you will lose your entire development history! Sure, you still have your local working copy of the site, but the ability to roll back to a previous website state or refer to old code is lost forever.</p>
<p>To guard against this possibility it is important to perform regular exports of your working copy, and archive these copies using your regular backup method. Subversion has an <a href="http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.export.html">export command</a> for this purpose.</p>
<h3>Deploying to a live server</h3>
<p>When it comes time to deploy your website to a production webserver, the simplest approach is to simply upload your working copy via FTP or SFTP. This method should require no major changes from your existing workflow, and has the advantage of working with any webserver. If your site resides on a shared hosting account then this is probably your only option.</p>
<p>There is just one gotcha: Subversion creates a bunch of <em>.svn</em> folders inside the working copy, which it requires to work. They contain sensitive information such as your repository URL, which you probably don&#8217;t want to broadcast to the whole world, so it is important to make sure that these files are omitted from the upload process. Any decent FTP client can be configured to filter out particular files or folders, so make sure to create a filter that ignores <em>.svn</em> directories. I use <a href="http://filezilla-project.org/">Filezilla</a>, which <a href="http://allthingsmarked.com/2009/07/20/avoid-transferring-svn-cvs-folders-in-filezilla/">does the job nicely</a>.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/server_diagram_ftp.jpg" alt="Server diagram - upload via FTP" title="Server diagram - upload via FTP" width="450" height="384"  /></p>
<p>If Subversion is already installed on your production web server (or you are able to install it yourself) and have shell access to the server, then you have another option available to you.</p>
<p>Instead of uploading files to the server from your working copy, you can checkout a working copy of your repository trunk to the production server. When you are ready to publish to the live site you just need to update the server&#8217;s working copy and any modified files and folders will be deleted/renamed/downloaded automatically.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/server_diagram_subversion_on_live_server.jpg" alt="Server diagram - live server is a working copy" title="Server diagram - live server is a working copy" width="450" height="414" /></p>
<p>The advantage of this approach is that it is largely free from human error &#8211; there is no chance you might forget to upload a modified file, or that one developer will accidentally upload an old file over a newer one.</p>
<p>Explaining how to work with Subversion on your production server is beyond the scope of this article (plus, I&#8217;ve never done it before!), but if you dig a little you will find tutorials online.</p>
<p><em><strong>Update 11 March 2010:</strong> A couple of readers have pointed out that the alternative deployment approach mentioned above requires additional steps to hide the .svn directories on your production server. Please read the comments below for further information.</em></p>
<h3>Making friends with Subversion</h3>
<p>As I mentioned at the outset of this series, it took a couple of goes before I had an &#8220;aha!&#8221; moment and realised how Subversion could improve my workflow, but once everything clicked into place I didn&#8217;t look back. Hopefully this article has given you some pointers about integrating version control into your own web development process.</p>
<p>There is plenty of technical detail I haven&#8217;t covered, and for that I recommend checking out the free <a href="http://svnbook.red-bean.com/"><em>Version Control with Subversion</em></a> book, and the excellent <a href="http://tortoisesvn.net/support">TortoiseSVN documentation</a>. If you have any questions about my approach, or suggestions based on your own experiences with Subversion, please leave a comment below.</p>
<p><em>Icons in this article are courtesy of <a href="http://www.visualpharm.com/">Visual Pharm</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Subversion for web development: Part 2</title>
		<link>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/</link>
		<comments>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 09:47:23 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=973</guid>
		<description><![CDATA[In the second article of the series I will give specific detail about establishing a Subversion workflow.]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/">part 1</a> of this series you learned what version control is, and how it can be useful for website development. In this second article I will give specific detail about establishing a Subversion workflow.</p>
<h3>Structuring your repository</h3>
<p>Before you import any data to your Subversion repository you will need some top-level directories to help organise your project. There are no set rules dictating how you approach this, but the <a href="http://svnbook.red-bean.com/en/1.5/svn.tour.importing.html#svn.tour.importing.layout">recommended repository layout</a> is to create <em>trunk</em>, <em>branches</em> and <em>tags</em> directories:</p>
<pre><code>/trunk
/branches
/tags</code></pre>
<p><strong>Trunk:</strong> This is where you store the &#8220;main line&#8221; of development. It is a snapshot of the current state of the project.</p>
<p><strong>Branches:</strong> A &#8220;branch&#8221; is a copy of the project, and allows you to carry out a separate line of development without breaking the trunk. Once you are happy with your changes they can be merged back into the main code base.</p>
<p><strong>Tags:</strong> A &#8220;tag&#8221; is an archival snapshot of the project at a given point in time.</p>
<p>Whether or not you create branches and tags entirely depends on your own approach to version control.</p>
<p>Tags are commonly used in software development to capture a snapshot of a stable release of an application, but are not necessarily applicable to websites, where changes tend to be pushed live as soon as they are made.</p>
<p>Branching is useful when multiple developers are working on the project, but may be a redundant concept for a solo developer. Two scenarios where I can see branching would be useful are during a website redesign, or when adding a major new feature to a site. Development of the live site continues in the trunk whilst the upgrades are carried out in a branch.</p>
<p>Even if you don&#8217;t plan on creating branches or tags I still recommend sticking with this conventional directory naming structure. If another developer ever needs to access your repository the <em>trunk/branches/tags</em> structure will probably be one they are already familiar with, and it also gives you the flexibility to create branches and tags should the need ever arise.</p>
<h3>What files to keep under version control</h3>
<p>The only files I keep under version control are those that are required to compile and deploy the site: the source files, any files that are required on the live web server, and a copy of the site&#8217;s database.</p>
<p>For a typical website I create two additional folders inside the trunk:</p>
<pre><code>/trunk
    /db
    /www
/branches
/tags</code></pre>
<p>The <em>www</em> directory represents a web server&#8217;s public http directory. This is where most of the project files and folders live. The <em>db</em> directory is where I store a dump of the site&#8217;s MySQL database (more on this in <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">part 3 of this series</a>).</p>
<p>If I was working on a Flash project then I would have additional directories for my Actionscript and FLA source files:</p>
<pre><code>/trunk
    /db
    /www
    /src
    /lib
/branches
/tags</code></pre>
<p>None of these folder names are set in stone, and you should choose a structure that suits your work methodology.</p>
<h3>Creating a working copy</h3>
<p>To begin working with your repository you need to checkout a working copy. To do this, create a folder somewhere on your local computer, and give it a name that makes its purpose obvious. I call mine <em>_svn_working_copy</em>, and create it inside the job folder for the particular project it relates to. For instance, my folder might reside at <em>D:/jobs/my_project/dev/_svn_working_copy</em>.</p>
<p>Right-click on the directory you created, and choose <em>SVN Checkout</em> from TortoiseSVN&#8217;s context menu. In the Checkout dialog that appears, enter the URL of your repository trunk.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/tortoisesvn_checkout_dialog.gif" alt="TortoiseSVN checkout dialog" title="TortoiseSVN checkout dialog" width="450" height="356" /></p>
<p>Once the checkout is complete your working copy should now contain the <em>db</em>, <em>www</em>, and any other directories you created in the trunk.</p>
<p>(You might notice that each directory in your project contains a folder named <em>.svn</em>. TortoiseSVN requires these folders to do its job so make sure not to delete or edit them!)</p>
<p>Now you can start to add files to your project, and edit them as you would usually. Remember that the <em>www</em> directory represents the site&#8217;s root level, so your index file should be stored here, along with any other files and folders required for the site to function.</p>
<p>You might be wondering <em>&#8220;What if I need run my project in my local web server? Shouldn&#8217;t I check out the working copy to my Apache webroot?&#8221;</em>. That&#8217;s what I initially thought too, until I realised that Apache could be configured to read files from any directory on my computer. I&#8217;ll explain how (and why) I do this in <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">part 3 of this series</a>.</p>
<h3>Keeping a database under version control</h3>
<p>If your site relies on a database then you need to keep that under version control too, otherwise you lose synchronisation if you ever need to roll back to a previous website state. But because the database is stored outside of a website’s public html directory it needs special consideration to ensure it is included with Subversion commits.</p>
<p>I mentioned earlier that my SVN trunk includes a directory named <em>db</em>. This is where I place a dump of the site’s MySQL database. In my case this is a manual process: I use PHPMyAdmin to export a .sql file which I copy into my trunk’s <em>db</em> directory, overwriting the previous version.</p>
<p>I suspect it is possible to automate the process of exporting the database from MySQL into the <em>db</em> folder, but for now I&#8217;m happy enough to do it manually. Like the other steps in the version control workflow it quickly becomes second nature.</p>
<h3>Making commits</h3>
<p>When you have finished editing the files in your working copy it is time to commit them to the repository. In TortoiseSVN this is accomplished by right-clicking the folder in which your working copy resides (or any sub-folder or individual file) and choosing <em>SVN Commit</em> from the context menu.</p>
<p>At this point you have the option to add any non-versioned files to the repository, after which any new or modified files are uploaded to your Subversion server and stored in the repository. The next time anyone browses or checks out the trunk they will be able to view your changes.</p>
<h3>Commenting your commits</h3>
<p>It is good practice to accompany each commit with a descriptive message explaining the changes you have made. In a team environment commit log messages are a vital means of communicating with the rest of the team, but they are just as important for the solo developer. Well documented commits help you recall every change you make to your project, when you made it, and why. </p>
<blockquote><p>Trust me, you don’t want to be the dunce, who commits with blank messages, or with meaningless ones like “Fixes”. Your team will hate you. You will hate yourself after a month, when trying to discover what the hell this code does in your brilliant project.<br />
<cite>&ndash;Petyo Ivanov, <a href="http://wildbit.com/blog/2008/11/11/the-importance-of-commit-messages/">The importance of commit messages</a></cite></p></blockquote>
<h3>Commit frequency</h3>
<p>How often you choose to commit changes to the repository is a matter of personal preference. Once a day, twice a day, ten times a day &#8211; it&#8217;s entirely up to you.</p>
<p>I like to make my commits fairly frequently. This makes it easier to review the changes that I&#8217;ve made, and also keeps me focussed on the task at hand: the commit message acts as a goal for the coding session. Also, I get a small glow of satisfaction each time I make it commit, like ticking off an item on a to-do list!</p>
<p>In the final part in this series I will talk about working with a local Apache development server, and deploying a version controlled website to a live webserver.</p>
<p><strong><a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">Read part 3 &raquo;</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion for web development: Part 1</title>
		<link>http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/</link>
		<comments>http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 06:09:35 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://f6design.com/journal/?p=764</guid>
		<description><![CDATA[In this three part series of articles I will explain my approach to using Subversion, the open-source version control software, for web development. For a long time I steered clear of version control, dismissing it as too complex, or something that was only useful for large development teams. I took Subversion for a test drive, [...]]]></description>
			<content:encoded><![CDATA[<p>In this three part series of articles I will explain my approach to using <a href="http://subversion.tigris.org/">Subversion</a>, the open-source version control software, for web development.</p>
<p>For a long time I steered clear of version control, dismissing it as too complex, or something that was only useful for large development teams. I took Subversion for a test drive, but didn&#8217;t really &#8220;get it&#8221;, and decided version control wasn&#8217;t for me.</p>
<p>I changed my tune earlier this year when I was employed to work on a project that was already under version control. I had no choice but to get up to speed with Subversion, and once I got the hang of it I was excited to discover that version control streamlined my entire workflow. I now use Subversion for all of my web projects and consider it an integral part of my development process.</p>
<p>My approach to Subversion is geared towards solo web developers like myself, and is fairly easy to grasp. I won&#8217;t delve too deeply into the inner workings of Subversion and its commands &#8211; this will be more of a conceptual overview of setting up a version control workflow:</p>
<p>Part 1: Getting started with version control<br />
<a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">Part 2: Working with Subversion repositories</a><br />
<a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">Part 3: Servers and deployment</a></p>
<h3>What is version control?</h3>
<p>In a nutshell, version control allows you to track changes made to a file over time, and roll back to a previous state when you mess up. This might not sound too different to the traditional <em>&#8220;save as&#8230;&#8221;</em> technique offered by virtually every software application, but a <a href="http://en.wikipedia.org/wiki/Revision_control">Version Control System</a> offers considerably more functionality than simply appending <em>&#8220;_v01&#8243;</em> or <em>&#8220;_v02&#8243;</em> to your file names. Some of the advantages of a Version Control System are:</p>
<ul>
<li><strong>Roll back.</strong> Jump back in time and revert a file, folder, or even the whole project to a specific historic state. If you make a mistake in your code you can simply revert to the last good version of the file you are working on.</li>
<li><strong>Revision messaging.</strong> File revisions can be accompanied by messages explaining what changes were made, and why. This makes it possible to track the evolution of a project over time.</li>
<li><strong>Branching.</strong> If you need to test out new features in your project without disturbing the main line of development, you can &#8220;branch&#8221; your code and continue development in a separate sandbox. Later, you can merge changes back into the main code base.</li>
<li><strong>Work with a team.</strong> If several people are working on the same project, version control helps to synchronise changes so that one team member doesn&#8217;t accidentally overwrite another&#8217;s work.</li>
<li><strong>Work remotely.</strong> A version controlled project can be accessed from anywhere, any time. This is perfect for geographically remote team members or developers who work from multiple locations.</li>
</ul>
<h3>Why use version control?</h3>
<p>In my pre-Subversion days I relied on an ad-hoc backup system whereby I would periodically create a manual snapshot of the project I was currently working on by copying the entire project source to a new directory. I might make a backup once a day, or perhaps every two days. If the changes were small, I might not make a backup at all.</p>
<p>This approach worked well enough, but left me wide open to data loss. Reverting to a previous project state could be a tedious task, requiring that I backtrack further than was strictly necessary.</p>
<p>I also lacked comprehensive metadata about the changes I was making. I did keep brief notes with each backup, describing the changes I had made since the last snapshot, but these notes provided only &#8220;broad brush strokes&#8221; information about my edits, and lacked detail about which specific files had been modified.</p>
<p>A Version Control System helps to address these problems: snapshots are taken of revisions much more frequently, code changes are easier to document and track, and recovering from coding mistakes is much easier.</p>
<h3>Version control for web development</h3>
<p>When setting up a Version Control System my initial challenge was to find a workflow that worked for me as a solo web developer. Most of the explanations of version control I read were aimed at software programming teams, and it wasn&#8217;t immediately obvious to me how I fitted into the picture. To help me choose a version control approach that suited my own requirements, I began by listing the key components of my web development process:</p>
<ul>
<li>Most of the time I work alone on projects, not as part of a team</li>
<li>I work on projects from the office and from home, using two different computers</li>
<li>During the development phase of a project I work from an Apache web server, hosted on my local computer</li>
<li>Most of my websites rely on a MySQL database</li>
<li>My websites are hosted on a range of web servers, usually in a shared hosting environment, and in many cases I am not free to choose the hosting solution</li>
</ul>
<p>With those considerations in mind, I needed an approach to version control that allowed for:</p>
<ul>
<li>Remote access to the Subversion repository</li>
<li>A working copy of the repository that could be accessed by my local web server</li>
<li>The website&#8217;s database to be under version control along with the source files</li>
<li>A deployment process that would work in a typical shared hosting environment</li>
</ul>
<h3>Creating a Subversion repository</h3>
<p>The first step in working with Subversion is to create a repository. A repository is a store of data, which holds all of your project files, much like a standard file-system. A repository does a lot more than that though:</p>
<blockquote><p>What makes the Subversion repository special is that it <em>remembers every change</em> ever written to it: every change to every file, and even changes to the directory tree itself, such as the addition, deletion, and rearrangement of files and directories.<br />
<cite>&ndash;<a href="http://svnbook.red-bean.com/">Version Control with Subversion</a></cite></p></blockquote>
<p>The simplest way to create a repository is on your local machine, a task that is made extremely easy by <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> (a Subversion client). A local repository is perfect for cutting your teeth with Subversion, but has a major drawback: it can only be accessed from one computer. A remotely hosted repository is a far more powerful and flexible option.</p>
<p>To create a remote Subversion repository you are going to need a web server with Subversion installed. This is not as daunting as it may sound. Many web hosting companies offer Subversion with their plans (I use <a href="http://dreamhost.com/">Dreamhost</a>), or you can choose a Subversion hosting specialists such as <a href="http://unfuddle.com/">Unfuddle</a>, <a href="http://www.springloops.com/">Springloops</a> and <a href="http://beanstalkapp.com/">Beanstalk</a>.</p>
<p>It is important to note that your Subversion repository needn&#8217;t be on the same server as your website. In the development environment I describe in this article there is never any direct communication between the repository and the live web server.</p>
<h3>Choosing a Subversion client</h3>
<p>Once your Subversion repository is up and running, you need a way to access it. A Subversion client allows you to to read data from your repository (&#8220;check out&#8221;, in Subversion parlance), write data to the repository (&#8220;commit&#8221;), and perform other useful actions such as branching, tagging, and merging.</p>
<p>I work in a Windows environment, so <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> was an obvious choice for my Subversion client. TortoiseSVN installs as a Windows shell extension, and all of its functionality is accessed via the Explorer context menu &#8211; in other words, by right-clicking on a file or folder. This approach is very unobtrusive, and soon becomes second nature.</p>
<p><img src="http://f6design.com/journal/wp-content/uploads/2009/12/tortoisesvn_context_menu.jpg" alt="TortoiseSVN context menu" title="TortoiseSVN context menu" width="450" height="541" /></p>
<p>I won&#8217;t go into detail about how to install and use TortoiseSVN. The program is very <a href="http://tortoisesvn.net/support">well documented</a> and there are stacks of <a href="http://www.google.com/search?q=tortoisesvn+tutorial">online tutorials</a> if you get stuck.</p>
<p>In <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">part 2</a> and <a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-3/">part 3</a> of this series I will refer to TortoiseSVN when explaining some of my processes. For other Subversion clients the process will be slightly different from what I describe, but the basic principles remain the same. Apple users will find that there are plenty of Subversion clients for the Mac, though I haven&#8217;t used any of them and can&#8217;t make a personal recommendation &#8211; if you have a favourite you can leave a comment below.</p>
<p>In the second part of this series I will explain how I structure my subversion repository, how to create a working copy of your repository, and how to commit changes to the repository.</p>
<p><strong><a href="http://f6design.com/journal/2009/12/27/subversion-for-web-development-part-2/">Read part 2  &raquo;</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://f6design.com/journal/2009/12/23/subversion-for-web-development-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

