<?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>Passiomatic &#187; Web design</title>
	<atom:link href="http://passiomatic.com/topics/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://passiomatic.com</link>
	<description>Andrea Peltrin web and interaction designer from Vicenza, Italy</description>
	<lastBuildDate>Fri, 30 Apr 2010 13:38:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Introducing Dagopocket</title>
		<link>http://passiomatic.com/articles/introducing-dagopocket/</link>
		<comments>http://passiomatic.com/articles/introducing-dagopocket/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 08:00:51 +0000</pubDate>
		<dc:creator>Andrea Peltrin</dc:creator>
				<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://passiomatic.com/?p=89</guid>
		<description><![CDATA[Past and present Back in 2006 the site Dagospia.com didn&#8217;t provide a feed for its headlines and so I thought it was a good idea to do some web scraping and produce a valid Atom 1.0 feed out of it. If you understand italian you can still read the announcement. Finally, during the last year [...]]]></description>
			<content:encoded><![CDATA[<div class="picture">
<a title="Visit Dagopocket" href="http://lab.passiomatic.com/dagopocket/"><img src="http://passiomatic.com/wp-content/uploads/2010/03/dagopocket-opening.jpg" alt="Dagopocket on the iPhone" title="" width="530" height="400" class="alignnone size-full wp-image-164" /></a>
</div>

<h2>Past and present</h2>

<p>Back in 2006 the site <a href="http://www.dagospia.com/">Dagospia.com</a> didn&#8217;t provide a feed for its headlines and so I thought it was a good idea to do some web scraping and produce a <a href="http://lab.passiomatic.com/dagospia/feed.atom">valid Atom 1.0 feed</a> out of it. If you understand italian you can still <a href="http://blog.deelan.com/2006/10/24/dagospia-rss/">read the announcement</a>.</p>

<p>Finally, during the last year Dagospia added a <abbr>RSS</abbr> 2.0 feed &#8212; albeit <a href="http://beta.feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.dagospia.com%2Frss%2Ffeeds%2Farticoli.xml">invalid</a> &#8212; to syndicate its latest headlines, so I thought it was time to move on and try something new. Since mobile computing is growing, and it will even more relevant in the future, I created <a href="http://lab.passiomatic.com/dagopocket/">Dagopocket</a>, a stripped-down version of the Dagospia home page.</p>

<p>Let&#8217;s see how this thing works in detail.</p>

<h2>Step 1: converting the feed</h2>

<p>Since I wanted to continue to provide a valid Atom 1.0 feed for Dagospia the first thing to do was to fix the site <abbr>RSS</abbr> feed.  </p>

<p>I used the amazing <a href="http://www.feedparser.org/">Universal Feed Parser </a> to fetch the feed and extract any relevant information: news headlines, publishing dates, and categories. In the process I encountered only one serious problem: the feed titles was littered by several invalid characters as <a href="http://beta.feedvalidator.org/docs/warning/BadCharacters.html">documented by feed validator help pages</a>. </p>

<p>And guess what? A quick web search led me to Effbot&#8217;s <a href="http://effbot.org/zone/unicode-gremlins.htm"><code>kill_gremlins</code> Python function</a>, which did exactly what I needed: it substitutes those bad characters with the corresponding Unicode counterparts.</p>

<h2>Step 2: from the feed to the mobile version</h2>

<p>There are a couple of important concepts to keep in mind while designing the Dagopocket page, and generally any application for the mobile market: </p>

<ul>
<li>Since screen size on smartphones is severely limited  every superfluous graphic element must be removed. </li>
<li>Users open Dagopocket to look up the latest headlines, so the page just need to give them what they want: the latest scoop. The user in that particular moment is essentially focused on a single task, so it is crucial to not add details or features which could distract the reader.</li>
</ul>

<p>With this in mind building the page was then a matter of reading back the Atom feed and formatting the results with some <abbr>HTML5</abbr> and <abbr>CSS</abbr> code. </p>

<p><a href="http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW1">As documented here</a> some extra settings must be specified in the <code>head</code> element to show the page with the correct viewport and scaling on the iPhone: </p>

<pre><code>&lt;meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0,   
maximum-scale=1.0, user-scalable=no, width=device-width" /&gt; 
</code></pre>

<h2>Step 3: scheduling and caching</h2>

<p>Finally, I scheduled the script with a server <a href="http://en.wikipedia.org/wiki/Crontab">cron job</a> and set to rebuild the <code>feed.atom</code> and the corresponding web page every hour. </p>

<p>To serve the files from the web server with maximum efficiency I enabled the Apache caching mechanism with these lines on the <code>.htaccess</code> file:</p>

<pre><code>&lt;IfModule mod_expires.c&gt;
ExpiresActive On
ExpiresDefault "access plus 1 week"
ExpiresByType text/html "modification plus 1 hour"    
ExpiresByType application/atom+xml "modification plus 1 hour"
&lt;/IfModule&gt;
</code></pre>

<h2>Further development</h2>

<p>Admittedly the current implementation is nothing more than a beautified feed. However, I think there is room for improvement.  Here there&#8217;re some open questions:</p>

<ul>
<li>It will be cool to have a single story page optimized for the small iPhone screen, but this would stop a visitor to load up the Dagospia.com web page and I suspect the site owners would not be happy about this.</li>
<li>Is it useful to group headlines by category? I did that initially but I recently scrapped that feature. My gut feeling is that a reader wants to look up the latest site headlines, regardless of their categories.</li>
<li>Potentially linked to the previous point: how to take advantage of the iPhone landscape/portrait mode? Should a change of the device orientation to trigger a new arrangement/sorting of the headlines?</li>
</ul>

<h2>Compatibility</h2>

<p>Dagopocket should be compatible with browsers featured on any modern smartphone, although there are some optimizations specific for the WebKit-based browsers. </p>
]]></content:encoded>
			<wfw:commentRss>http://passiomatic.com/articles/introducing-dagopocket/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Taking the grids on the web</title>
		<link>http://passiomatic.com/articles/taking-the-grids-on-the-web/</link>
		<comments>http://passiomatic.com/articles/taking-the-grids-on-the-web/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 10:00:00 +0000</pubDate>
		<dc:creator>Andrea Peltrin</dc:creator>
				<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://passiomatic.com/?p=24</guid>
		<description><![CDATA[Update Mar 7, 2010: Since I wrote this article the site has been redesigned. However, the 12 columns grid described is still in place, only sligthly tweaked to accomodate the new typographic choices. Typographic grids &#8212; or grids for short &#8212; in graphic design have been proved to be a phenomenal weapon in the hands [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update Mar 7, 2010</strong>: Since I wrote this article the site has been redesigned. However, the 12 columns grid described is still in place, only sligthly tweaked to accomodate the new typographic choices.</p>

<p><em>Typographic grids</em> &#8212; or <em>grids</em> for short &#8212; in graphic design have been proved to be a phenomenal weapon in the hands of the competent designer. Nowadays grids are used in newspapers, magazines, web sites, stationery items and a number of other designed objects to present text and picture matter on the page in a coherent manner. 
<span id="more-24"></span></p>

<h2>Definitions</h2>

<p>Wikipedia <a href="http://en.wikipedia.org/wiki/Grids">defines a typographic grid</a> as:</p>

<blockquote>
  <p>&#8230; a two-dimensional structure made up of a series of intersecting vertical and horizontal axes used to structure content. The grid serves as an armature on which a designer can organize text and images in a rational, easy to absorb manner. </p>
</blockquote>

<p>Vertical axes define <em>columns</em>, horizontal axes define <em>rows</em>.</p>

<h2>Benefits on using grids</h2>

<p>Grids help a design to achieve <em>unity</em>, one of the tenets of graphic design. Alex W. White in his <a href="http://www.amazon.com/Elements-Graphic-Design-Space-Architecture/dp/1581152507/"><em>Elements of Graphic Design</em></a> book describes unity as:</p>

<blockquote>
  <p>Unity in design exists where all elements are in agreement. Elements are made to look like they belong together, not as thought they happened to be placed randomly. (&#8230;) So, without <em>unity</em> a design becomes chaotic and unreadable. But without <em>variety</em> a design becomes inert, lifeless, and uninteresting. A balance must be found between the two.</p>
</blockquote>

<p>Grids also work because they introduce a systematic approach in positioning elements on the page. Josef Muller-Brockmann in his seminal book <a href="http://www.amazon.com/Systems-Graphic-Systeme-Visuele-Gestaltung/dp/3721201450"><em>Grid Systems in Graphic Design</em></a> writes:</p>

<blockquote>
  <p>A suitable grid in visual design makes it easy: a) to construct the argument objectively with the means of visual communication; b) to construct the text and illustrative material systematically and logically; c) to organize the text and illustrations in a compact arrangement with its own rhythm; d) to put together the visual material so that it is readily intelligible and structured with a high degree of tension.</p>
</blockquote>

<p>Muller-Brockmann also suggests that grids must be designed starting analyzing the material to lay out, while force-fitting contents into an existing grid makes no sense, since grids are there to <em>serve</em> contents.</p>

<h2>Grids on the web</h2>

<p>Much has been written about grids in web design lately. The discussion generated by <a href="http://www.markboulton.co.uk/journal/comments/simple_steps_to_designing_grids/">Mark Boulton</a> and <a href="http://www.subtraction.com/2007/03/18/oh-yeeaahh">Knoi Vinh</a> have helped the web design community to start promoting and using grids in the large. In this regard an useful resource is <a href="http://www.designbygrid.com/">Design by Grid</a>, which gathers real-world examples and articles about the use of grids in web design. </p>

<h2>Designing the grid</h2>

<p>With that said it should come as no surprise this site too uses a grid system. In the picture below you can see the Passiomatic home page with the superimposed 12 pink columns. </p>

<div class="picture caption">
<img src="http://passiomatic.com/wp-content/uploads/2008/10/passiomatic-grid1.jpg" alt="Passiomatic 12 columns grid" title="" width="540" height="505" class="alignnone size-full wp-image-78" />
<p>The Passiomatic home page with a superimposed 12 columns grid.</p>
</div>

<p>The home page is often the most challenging page of a site and Passiomatic is no exception. In fact the home page has a number of different information elements to be presented in decreasing order of importance. Once a grid is created with contents in mind it will assist the designer in positioning such elements on the page. Let&#8217;s see how:</p>

<ul>
<li>Logo and navigation menu share the top vertical space, spanning across the 12 colums and 3 lines of text (60px). Note how the logo height is 60px too.</li>
<li>Latest published article is 8 and 6 columns for heading, subheading and the first article paragraph respectively. The remaining 2 columns under the subheading is used to shown  publishing date, article topic and a comment counter. </li>
<li>The about blurb requires less space thus the remaining 4 columns (140px) and 7 lines of text (140px) suffice. Again, note how the picture is cropped to the same dimensions.</li>
<li>Featured project takes all the 12 columns (8 for the screenshot, 4 for the project information), and 10&#8211;11 lines of text (200&#8211;220px) since descriptions may vary in length.</li>
<li>The three sections with very short texts at the bottom of the page call for a narrower paragraph width of 3 columns, 13 lines of text each (260px). Sections are positioned side by side.</li>
</ul>

<p>Pixel height for each text element has been calculated starting from chosen line-height. More about this on the next section. </p>

<p>Generally speaking the more heterogeneous in size is the material to assemble the more flexible should be the grid to employ. In the case of Passiomatic a 12 columns grid provides enough variation to position all the needed elements.</p>

<h2>Picking type size and line-height</h2>

<p>As written previously a grid is defined by a number of columns and rows. </p>

<p>Each of the 12 columns of Passiomatic is 60px wide, plus there are 11 margins of 20px each. This gives a grand total of 940px:</p>

<p>(60px &times; 12) + (20px &times; 11) = 940px</p>

<p>Rows are created by setting a <em>vertical rhythm</em>. This is more tricky and requires to pick a comfortable font size and line-height &#8212; or <em>leading</em> in traditional typography &#8212; for the body text.</p>

<p>In Passiomatic the body font is set to 13px Georgia with a 20px of line-height. So 20px (or 20/13 ≈ 1.5em) becomes the vertical rhythm unit, which is used to set vertical dimensions like  paddings, margins, etc. of the page elements. </p>

<p>These font settings combined with the 6 columns used for long passages of text &#8212; like the one you are reading &#8212; make lines containing an average of 10 words, which according to Muller-Brockmann, is the ideal width for a paragraph with a regular leading.  </p>

<h2>A word of warning</h2>

<p>The dynamic, fluid, fast-paced nature of the the web makes difficult and admittedly not practical to impose a rigid vertical grid to all elements of the page. Richard Rutter&#8217;s article <a href="http://24ways.org/2006/compose-to-a-vertical-rhythm"><em>Compose to a Vertical Rhythm</em></a> gives a detailed explanation of the number of calculations and caveats involved in achieving a pixel-perfect vertical rhythm in web design.</p>

<p>In my projects I try to maintain a vertical rhythm without becoming too obsessive about it. I&#8217;m usually more concerned to maintain a coherent rhythm between heading, subheading and paragraphs of a single text column, instead of trying to perfectly align elements across different columns. </p>

<h2>Use the framework, Luke</h2>

<p>Recently we have seen the rise of a number of <acronym>CSS</acronym> frameworks like <a href="http://www.blueprintcss.org/">Blueprint</a> which greatly simplify and streamline the usage of grids on the web. <a href="http://jeffcroft.com/">Jeff Croft</a> has written <a href="http://jeffcroft.com/search/?search=framework&amp;models=blogs.entry">several articles</a> on describing the rationale behind the <acronym>CSS</acronym> frameworks. However there were some people who fiercely argued against his points. It turned out that few people are scared by <acronym>CSS</acronym> frameworks while other reject them altogether. </p>

<p>It&#8217;s worth pointing out that Blueprint &#8212; and I guess others <acronym>CSS</acronym> frameworks too &#8212; is highly modular. This means that you can break Blueprint into pieces and take what you want from it. In fact I&#8217;ve designed and coded several web sites using only two modules of the original Blueprint: <code>reset.css</code> and <code>grid.css</code>. The actual grid has even been customized using <a href="http://blueprint-generator.kaizeku.com/">Blueprint Grid Generator</a>.</p>

<h2>Breaking the grid</h2>

<p>In closing I would like to point out that grids are not meant to be rigid. In fact once a designer has a grid in place she can achieve a great effect be breaking it consciously. </p>
]]></content:encoded>
			<wfw:commentRss>http://passiomatic.com/articles/taking-the-grids-on-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
