<?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"
	>

<channel>
	<title>Web 3.0, 6 Bladed Razors, 7 Minute Abs &#187; Interface Design</title>
	<atom:link href="http://www.zachleat.com/web/category/interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zachleat.com/web</link>
	<description></description>
	<pubDate>Thu, 21 Aug 2008 06:02:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Double Whammy: OpenID and Microformats</title>
		<link>http://www.zachleat.com/web/2008/05/23/double-whammy-openid-and-microformats/</link>
		<comments>http://www.zachleat.com/web/2008/05/23/double-whammy-openid-and-microformats/#comments</comments>
		<pubDate>Fri, 23 May 2008 06:13:01 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Application Design]]></category>

		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[Flickr]]></category>

		<category><![CDATA[hCard]]></category>

		<category><![CDATA[microformat]]></category>

		<category><![CDATA[OpenID]]></category>

		<category><![CDATA[Technorati]]></category>

		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/?p=141</guid>
		<description><![CDATA[<a href="http://www.ownyouridentity.com/2008/04/30/get-satisfactions-nice-import-profile-feature/">Own your Identity had a great post today</a> detailing a great feature on the signup form of the <a href="http://getsatisfaction.com/people/new">Get Satisfaction</a> site.

They rely on the fact that sites like Twitter and Flickr publish an <a href="http://microformats.org/wiki/hcard">hCard microformat</a> for all of their users publicly on their website.]]></description>
			<content:encoded><![CDATA[<h3>Microformategery</h3>
<p><a href="http://www.ownyouridentity.com/2008/04/30/get-satisfactions-nice-import-profile-feature/">Own your Identity had a great post today</a> detailing a great feature on the signup form of the <a href="http://getsatisfaction.com/people/new">Get Satisfaction</a> site.</p>
<p>They rely on the fact that sites like Twitter and Flickr publish an <a href="http://microformats.org/wiki/hcard">hCard microformat</a> for all of their users publicly on their website.  If you go to <a href="http://twitter.com/zachleat/">my twitter page</a> and view the source, you'll find the following code available to anyone (without authentication):</p>
<div class="syntax_hilite">
<div id="html-1">
<div class="html"><span style="color: #009900;"><a href="http://december.com/html/4/element/address.html"><span style="color: #000000; font-weight: bold;">&lt;address&gt;</span></a></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">&lt;ul</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"about vcard entry-author"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"label"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Name<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"fn"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Zach Leatherman<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"label"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Location<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"adr"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Omaha, NE USA<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"label"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Web<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">&lt;a</span></a> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">"http://www.zachleat.com/"</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"url"</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">"me"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>http://www.zachle...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;"><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">&lt;li</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"bio"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"label"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>Bio<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span> <span style="color: #009900;"><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">&lt;span</span></a> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">"bio"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>UI Programmer, JavaScript Enthusiast, Soccer Hooligan<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/span&gt;</span></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/li&gt;</span></span><br />
&nbsp; &nbsp;<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/ul&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/address&gt;</span></span></div>
</div>
</div>
<p></p>
<p>The premise here is that hCard tells you how to parse this markup to get usable information.  The <code>adr</code> CSS class tells you what my address is.  The <code>fn</code> CSS class tells you what my name is, and so on.  So, Get Satisfaction goes and spiders this page behind the scenes and autopopulates your profile with what it can find.  Pretty sweet.</p>
<p>Now, they don't limit you to the services they provide, which are: Flickr, Technorati, Twitter, Upcoming, and last.fm.  They provide an Other category for any hCard enabled URL (your personal homepage or perhaps an <a href="http://microformats.org/wiki/hresume">hResume</a> you have posted on the web).</p>
<h3>Integrate with OpenID</h3>
<p>However, why not take it to the next level?  Why not integrate this microformat functionality WITH an openid login system?  You'd be able to kill two birds (not a twitter joke) with one stone in some cases, since both Twitter and Technorati are also OpenID producers (re-echo: We need more consumers).</p>
<p>So, not only do you get the benefits of having OpenID authentication on your website, but you'd be able to prepopulate a certain amount of profile data with an hCard parser.  And the best part is, if you already have a <a href="http://remysharp.com/2008/04/24/stop-using-openid-why-how/">nice clean user interface</a> set up to handle different OpenID producers, there wouldn't be any additional clutter on the interface to get this benefit.  It'd be transparent to the user when it works, and fall back to a normal empty profile form when it doesn't.</p>
<p>What I'd like to see, is more sites that are OpenID producers, also serve hCard microformats as well.  If we can get all the major producers on board, we'd have a nice tidy little system going.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2008/05/23/double-whammy-openid-and-microformats/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Don&#8217;t Let the Door Hit You Onunload and Onbeforeunload</title>
		<link>http://www.zachleat.com/web/2008/04/22/dont-let-the-door-hit-you-onunload-and-onbeforeunload/</link>
		<comments>http://www.zachleat.com/web/2008/04/22/dont-let-the-door-hit-you-onunload-and-onbeforeunload/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 04:51:08 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Web Browsers]]></category>

		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[Gmail]]></category>

		<category><![CDATA[Opera]]></category>

		<category><![CDATA[Undo]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/?p=126</guid>
		<description><![CDATA[Many people attempt a last ditch effort to save page state in the browser by using the onunload or onbeforeunload events.  This has been studied at great length by Patrick Hunlock,  who uses the perhaps now common knowledge of using a Synchronous Ajax call to perform the page state save.
Another use for the [...]]]></description>
			<content:encoded><![CDATA[<p>Many people attempt a last ditch effort to save page state in the browser by using the onunload or onbeforeunload events.  This has been studied at great length by <a href="http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript">Patrick Hunlock</a>,  who uses the perhaps now common knowledge of using a Synchronous Ajax call to perform the page state save.</p>
<p>Another use for the onbeforeunload event to allow the user to cancel the action that initiated the user leaving in the first place.  Gmail uses this technique when the user is in the middle of writing a draft of an e-mail and attempts to leave the page.</p>
<p><a href='http://www.zachleat.com/web/wp-content/uploads/2008/04/gmail-confirm.png'><img src="http://www.zachleat.com/web/wp-content/uploads/2008/04/gmail-confirm.png" alt="" title="gmail-confirm" width="455" height="157" class="aligncenter size-full wp-image-129" /></a><br />
<em>Gmail's pops up this prompt when the user attempts to leave the page while drafting an email.</em></p>
<p>Worthy to note, however, is that Opera <a href="http://www.quirksmode.org/bugreports/archives/2004/11/load_and_unload.html">doesn't fire the unload event</a> when the browser refreshes the page, or uses the back/forward buttons to browse off of the page (I had no success with the fix posted in the comments on that page).  What's worse, Opera never fires the onbeforeunload event.  This creates a serious problem with attempting to save page state prior to a user leaving your page.</p>
<p>Browser support aside, I believe that the onbeforeunload prompt is not an ideal way to protect the user from lost work (or unsaved page state).  Humanized has argued, and I agree, that <a href="http://www.alistapart.com/articles/neveruseawarning">an undo operation is much easier on the end user than a warning message</a>.  The strange thing is, Gmail could save the draft in a synchronous Ajax request in the onunload event.  They aren't using the prompt to save Opera users from losing their drafts, since the Opera web browser doesn't even fire the onbeforeunload event.  (Interestingly enough, they are using some sort of browser history management to fire a warning to the user when they press back, or forward, in Opera -- but Reload can't be caught using this method, so your could draft email be lost).</p>
<p>From a User Interface design standpoint, I would recommend just sticking with onunload.  You can still perform your synchronous Ajax call in the method to save the state of your page, so that the user can later resume their state or undo the operation. (Except for Back/Forward/Refresh in Opera, until they support a better onunload or any onbeforeunload).  The onbeforeunload prompt is an unnecessary evil, and doesn't do much besides annoy the end user with another warning message and a mouse click.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/JavaScript" rel="tag">JavaScript</a>, <a href="http://technorati.com/tag/onunload" rel="tag"> onunload</a>, <a href="http://technorati.com/tag/onbeforeunload" rel="tag"> onbeforeunload</a>, <a href="http://technorati.com/tag/Ajax" rel="tag"> Ajax</a>, <a href="http://technorati.com/tag/Undo" rel="tag"> Undo</a>, <a href="http://technorati.com/tag/Opera" rel="tag"> Opera</a>, <a href="http://technorati.com/tag/Gmail" rel="tag"> Gmail</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2008/04/22/dont-let-the-door-hit-you-onunload-and-onbeforeunload/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rethinking JavaScript Grids and DataTables</title>
		<link>http://www.zachleat.com/web/2008/04/13/rethinking-javascript-grids-and-datatables/</link>
		<comments>http://www.zachleat.com/web/2008/04/13/rethinking-javascript-grids-and-datatables/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 20:29:26 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Conservative Design]]></category>

		<category><![CDATA[Dojo]]></category>

		<category><![CDATA[ExtJS]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/?p=122</guid>
		<description><![CDATA[In the world of front end engineering, one must consider the end-user of the interface first, and above all other things.  The priorities should not start with development ease, nor external library preference.  The priorities should start with the needs of the consumer of your end product.
Evolution of your engineering skill is also [...]]]></description>
			<content:encoded><![CDATA[<p>In the world of front end engineering, one must consider the end-user of the interface first, and above all other things.  The priorities should not start with development ease, nor external library preference.  The priorities should start with the needs of the consumer of your end product.</p>
<p>Evolution of your engineering skill is also a vital trait in this world, which means that as a developer increases his knowledge of good practices and proper methods, sometimes he must shirk his previous assertions about the world as he previously knew it.  And today I'm shirking a staple of the front end as all web users know it: The Grid (DataTable) Component.</p>
<p>Of course, I've written a few articles in the past about the <a href="http://developer.yahoo.com/yui/datatable/">YUI DataTable</a>, during my long love affair with Yahoo's User Interface library.  Another popular one is jQuery's <a href="http://tablesorter.com/docs/">TableSorter</a>.  Then there's the <a href="http://dojotoolkit.org/book/dojo-book-0-9/docx-documentation-under-development/grid">Dojo Grid</a>, a component <a href="http://www.sitepen.com/blog/2007/09/16/the-dojo-grid/">inherited from TurboAjax</a>.  ExtJS has a variety of nice examples as well for their <a href="http://extjs.com/deploy/dev/examples/#sample-1">Ext 2.0 Grid</a>.</p>
<p>And after using these Grids and DataTables, I certainly respect the programming that went into developing these components.  But let's take a step back for a second.  Why do the users need the bells and whistles in these components?  Are they worth the extra load time and complexity they add to the interface?</p>
<p>All we're doing here is putting a nice coat of paint on a &lt;table&gt; tag.  Sure, it might have some nice ancillary features like Ajax Data Loading, but those don't really matter - they are things that can be easily performed with some good Ajax and DOM insert utility functions.  In fact, most of the core features included in these components could be described as feature creep, and not beneficial to the end user at all.  Feature creep contributes to code bloat, which means the user is downloading bytes to their web browser that they don't need, which can hamper performance.  Libraries usually have online examples of their components, and the include sizes are seen below.  (Gzip compression not considered)</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>JavaScript Size</th>
<th>Minimized</th>
<th>Link</th>
</tr>
</thead>
<tbody>
<tr>
<td>YUI DataTable</td>
<td>216.6 KB</td>
<td>Minimized</td>
<td><a href="http://developer.yahoo.com/yui/examples/datatable/dt_basic_clean.html">Example</a></td>
</tr>
<tr>
<td>Dojo Grid</td>
<td>338.4 KB</td>
<td>Unminimized</td>
<td><a href="http://dojotoolkit.org/book/dojo-book-0-9/docx-documentation-under-development/grid/simple-grid">Example</a></td>
</tr>
<tr>
<td>Ext Grid</td>
<td>545.5 KB</td>
<td>Minimized</td>
<td><a href="http://extjs.com/deploy/dev/examples/grid/array-grid.html">Example</a></td>
</tr>
<tr>
<td>jQuery TableSorter</td>
<td>66 KB</td>
<td>Minimized</td>
<td><a href="http://www.tablesorter.com/">Example</a></td>
</tr>
</tbody>
</table>
<p>The JavaScript include sizes listed above are directly proportional to the feature set that the components provide, and should give you an idea of the overhead involved with using them.  Do we need 545.5 KB of features coming down the pipe to give our users an extra bell, or an extra whistle?  Let's analyze the features to rationalize their usage, and remove items from the feature set.</p>
<ul>
<li>Sorting</li>
<li>Modifying column order and display</li>
<li>Resizing columns</li>
<li>Editing of row data directly on the grid itself</li>
<li>Scrolling</li>
<li>Pagination</li>
</ul>
<p><strong>Sorting</strong></p>
<p>Data should be used in the context of its usefulness.  You have a list of messages in your e-mail inbox.  What's the most useful context for this list?  In order of date received.  The default sort order provided by the application, to facilitate proper use of the application.  Is comparing the rows in the grid by any other method as useful?  Does the user need to see the list of messages ordered alphabetically by subject?  In these cases where the user is in need of a specific message, <em>searching and filtering</em> is more useful than sorting.  The default sort is useful, but allowing the user to resort on the client, in most cases, is not as useful as other methods of finding a row.</p>
<p><strong>Modifying column order and display</strong></p>
<p>The same argument can be made for any of the other methods of customization provided to the end user.  Does the user need to reorder or hide columns?  The context provided by the application should be sufficient to use the applications data in the way it was intended.  Don't overcomplicate your user interface with needless features or a deluge of useless data.  Provide succinct, appropriate data, and the user needn't reorder or change the interface.</p>
<p><strong>Resizing columns</strong></p>
<p>The default HTML &lt;table&gt; tag expands to fit the data inside of its cells.  Even when you set the width of the table explicitly, the cells adjust themselves accordingly to fit the data.  This should be the behavior of your table.  You needn't monkey around with widths, the browser is smart enough to do it for you.  You can even customize a cell to wrap its text to multiple lines with CSS, if need be.</p>
<p><strong>Editing of row data directly on the grid itself</strong></p>
<p>If you're providing an Excel spreadsheet interface for the end user to customize your data, you haven't designed your interface correctly.  Rethink how the user needs to interact with the data you've provided, and give them a better, simpler way to edit the data.</p>
<p><strong>Scrolling</strong></p>
<p>Everyone knows that internal scrollbars on a page are evil.  I don't even like scrollbars on textareas, to be honest.  Previously, I had worked and reworked the YUI DataTable to handle horizontal scrolling.  Looking back on this, it was a mistake.  There are better ways to handle lots of data in a table, without the heavy mouse interaction and scanning that scrolling require.  Which brings me to my next point.</p>
<p><strong>Pagination</strong></p>
<p>This is the one exception to the feature set cutting board.  This is the one feature that's is a requirement, when the data set has too many records to fit on a single page.</p>
<p>Keep these in mind, and look at the feature set provided by a few sites using tabular data centric interfaces that know a thing or two about interface design:</p>
<p><a href='http://www.zachleat.com/web/2008/04/13/rethinking-javascript-grids-and-datatables/gmail/' title='Google Mail'><img src="http://www.zachleat.com/web/wp-content/uploads/2008/04/gmail-150x150.png" width="150" height="150" class="attachment-thumbnail" /></a><br />
<a href='http://www.zachleat.com/web/2008/04/13/rethinking-javascript-grids-and-datatables/wordpress-admin/' title='Wordpress 2.5 Admin Interface'><img src="http://www.zachleat.com/web/wp-content/uploads/2008/04/wordpress-admin-150x150.png" width="150" height="150" class="attachment-thumbnail" /></a><br />
<a href='http://www.zachleat.com/web/2008/04/13/rethinking-javascript-grids-and-datatables/google-reader/' title='Google Reader List View'><img src="http://www.zachleat.com/web/wp-content/uploads/2008/04/google-reader-150x150.png" width="150" height="150" class="attachment-thumbnail" /></a></p>
<p><strong>So, what should we include?</strong></p>
<p>A simple CSS class to style your table is sufficient, with links to paginate the table (properly) and/or a hover for row selection if needed.  You're looking at 10-20 lines of jQuery code, maximum, and a few CSS declarations.  In lieu of sorting, of course, you'll need to program in a mechanism for searching and filtering as well.  But really, the difficulty with programming this component is knowing what to leave out.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Interface+Design" rel="tag">Interface Design</a>, <a href="http://technorati.com/tag/Dojo" rel="tag"> Dojo</a>, <a href="http://technorati.com/tag/Ext" rel="tag"> Ext</a>, <a href="http://technorati.com/tag/jQuery" rel="tag"> jQuery</a>, <a href="http://technorati.com/tag/YUI" rel="tag"> YUI</a>, <a href="http://technorati.com/tag/Grid" rel="tag"> Grid</a>, <a href="http://technorati.com/tag/DataTable" rel="tag"> DataTable</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2008/04/13/rethinking-javascript-grids-and-datatables/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ALARMd 2 Beta, with Google Calendar Integration</title>
		<link>http://www.zachleat.com/web/2008/04/06/alarmd-2-beta-with-google-calendar-integration/</link>
		<comments>http://www.zachleat.com/web/2008/04/06/alarmd-2-beta-with-google-calendar-integration/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 07:31:59 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Alarmd]]></category>

		<category><![CDATA[Google Calendar]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[Youtube]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/?p=111</guid>
		<description><![CDATA[Take a look: ALARMd 2 Beta
Update: added Metric and Unit Circle time formats.
I know, some of you are reading this and thinking to yourself -- genital herpes is more appealing than yet another online alarm clock.  But to that I say, congratulations, that's one of the new features in ALARMd 2!
Why did I make [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zachleat.com/Projects/alarmd-beta/">Take a look: ALARMd 2 Beta</a></p>
<p><em><strong>Update</strong>: added Metric and Unit Circle time formats.</em></p>
<p>I know, some of you are reading this and thinking to yourself -- genital herpes is more appealing than yet another online alarm clock.  But to that I say, congratulations, that's one of the new features in ALARMd 2!</p>
<p>Why did I make another online alarm clock?  Mostly due to missing features and limitations in the old version, but also because it's a good exercise in JavaScript programming and User Interface design.  Everyone likes to hone their skills, and this is my publicly viewable work desk.  But the real reason I went back to rewrite the old version is that I'm hooked on <a href="http://jquery.com">jQuery</a>.  I can't get enough of that sweet, sweet, source code, and couldn't stand to see my old, crusty, handwritten DOM manipulations polluting web browsers across the world.  Users of the Yahoo User Interface Library (what I used for the original version of ALARMd) would do well to consider jQuery a nice plugin to be used alongside YUI.  It will clean up your code MAX_INT-fold.</p>
<p>Here are a few new features and addressed limitations in ALARMd 2.</p>
<ul>
<li>Easy Alarm Mode: No more fumbling around when you just want one simple easy-to-add alarm.</li>
<li>Google Calendar Alarm Mode: Customize your alarm schedule to your heart's content, it will load your alarms straight from a publicly available Google Calendar.  There are some great features with this:
<ul>
<li>Load only the first calendar event of every day</li>
<li>Day Limiter (Example: Only load calendar events within the next 3 days)</li>
<li>Minute Adjuster (Example: Alarm me 90 minutes before work without adding a separate event)</li>
<li>Google does a nice job of normalizing dates as well, so you don't have to worry about calendar time syncing.  If it says 8AM on your calendar, it's going to alarm you at 8AM on your computer's local time.</li>
</ul>
</li>
<li>New Clock Formats:
<ul>
<li>Human Readable Clock Format: Think "Half Past Two", or "Quarter Til Twelve".  This idea is from <a href="http://www.insightoutsight.co.uk/viewproject.php?cid=2&#038;pid=3&#038;iid=2">Laurence Willmott's Project "It's about Time"</a>.  I took some liberties with his labeling scheme, I hope he doesn't mind too much.</li>
<li><a href="http://zapatopi.net/metrictime/">Metric Time Format</a>: Shows the measurement Centi-days in Local Metric Time.  Basically, it's a percentage of much of the day has passed.  If it's 80.000, 80 percent of the day has passed, which coincides with 7:12 PM.</li>
<li>Unit Circle Time Format: Displays the time in radians that would be shown if a clock were <a href="http://www.cafepress.com/poofietomato.49111330">pasted on top of a unit circle</a>.  If it's 12 o'clock, it will read &pi;/2.  After programming this one, it's starting to seem normal in my brain.  Oh, it's 3&pi;/2?  Time to eat dinner.  How the hell did it get 2&pi;/3??</li>
</ul>
</li>
<li><a href="http://www.zachleat.com/web/2008/03/23/yet-another-pretty-date-javascript/">Human Readable Alarm Dates</a>: Think "29 Minutes", "1 Hour", "2 Days Ago".</li>
<li>Much cleaner interface, using a jQuery accordion to display the options.</li>
<li>The old ALARMd required an internet connection for all sources, and provided no safeguard if your internet went down whilst you were sleeping.  ALARMd 2 preloads all Youtube videos in the background when the page loads using the new <a href="http://apiblog.youtube.com/2008/03/something-to-write-home-about.html">Youtube JavaScript API</a>.  A nice benefit of this is that the browser window no longer requires focus to play the YouTube video.</li>
<li>Less clunky interface for adding new alarm sources.</li>
<li>Repeat option for YouTube videos and MP3's.  Turn infinite loop on or off.  Careful with this one.  Don't leave ALARMd going if you're not going to be home when it goes off.</li>
<li>CSS Skins, Use the really simple ones I've included for Red, Green, or Blue, or include your own URL to your own hosted CSS file.  Have a good skin?  I'll include it in the select list and give you some props here, just link to it in the comments below.  Use some CSS class hooks to spice up your skins (they are mutually exclusive).  These are CSS classes that are added to the body tag to allow you to style the alarm differently depending on the alarm clock's current state.  <em>Future enhancements</em> might include more than just alarm-based hooks: Year, day of the year, and hour of the day might be useful, that way you could style the clock to show a lighter background during the day and a darker background at night.
<ul>
<li>.alarmWithin30Minutes</li>
<li>.alarmWithin15Minutes</li>
<li>.alarmWithin5Minutes</li>
<li>.alarmWithin1Minute</li>
<li>.alarmActive (Alarm is being played)</li>
</ul>
</li>
<li>Still has all the old favorites:
<ul>
<li>Test Button to make sure the video or source is working and to check your volume.</li>
<li>Count Down mode to show the time between now and the first alarm.</li>
<li>Store your own list of alarm sources, using YouTube, MP3, Last.FM, or any URL (Pandora is included).</li>
<li>Military time (24 hour clock) and seconds toggle.</li>
<li>Naked mode (get rid of the extras)</li>
</ul>
</li>
</ul>
<p>Finished reading?  I'm surprised you didn't click the link at the top: <a href="http://www.zachleat.com/Projects/alarmd-beta/">ALARMd 2 Beta</a></p>
<p>Remember, this is BETA.  That means it's new.  I've done my best to test and code out all the kinks, but there may be a few that slipped through.  Try it out and please report any bugs.  And once again, this code is released under the BSD license.</p>
<p>I'll probably move this to the main ALARMd.com domain shortly.</p>
<p>Alarmd has been personally tested with Firefox 2, Firefox 3, Internet Explorer 7, Safari 3.1, and Opera 9.27, all on Windows.  Google GDATA reports an unsupported browser error on Safari and Opera, which you can hide using custom CSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2008/04/06/alarmd-2-beta-with-google-calendar-integration/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wake up to YouTube on my Internet Alarm Clock</title>
		<link>http://www.zachleat.com/web/2007/06/18/wake-up-to-youtube-on-my-internet-alarm-clock/</link>
		<comments>http://www.zachleat.com/web/2007/06/18/wake-up-to-youtube-on-my-internet-alarm-clock/#comments</comments>
		<pubDate>Tue, 19 Jun 2007 01:40:07 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Alarmd]]></category>

		<category><![CDATA[ExtJS]]></category>

		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/06/18/wake-up-to-youtube-on-my-internet-alarm-clock/</guid>
		<description><![CDATA[Update: Try the new ALARMd 2 Beta, with Google Calendar integration and offline Youtube caching.
Did you take your contacts out last night and you can't see the time on your alarm clock from all the way across the room?  
I'm here to calm your fears.  Enter ALARMD, the Internet Alarm Clock.  Wake [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update</strong>: Try the new <a href="http://www.zachleat.com/web/2008/04/06/alarmd-2-beta-with-google-calendar-integration/">ALARMd 2 Beta</a>, with Google Calendar integration and offline Youtube caching.</em></p>
<p>Did you take your contacts out last night and you can't see the time on your alarm clock from all the way across the room?  </p>
<p>I'm here to calm your fears.  Enter <a href="http://www.zachleat.com/Projects/alarmd/">ALARMD, the Internet Alarm Clock</a>.  Wake up to any Youtube video (that allows embedding), a last.fm user stream or tag, or any mp3 hosted online.  There are a few defaults in there, but you can add and modify your own.</p>
<p><a href="http://www.flickr.com/photos/zachleat/531165035/" title="Photo Sharing"><img src="http://farm2.static.flickr.com/1067/531165035_d2ba407333.jpg" width="500" height="375" alt="Now that's an alarm clock" /></a></p>
<p>Features:</p>
<ul>
<li>Supports multiple alarms (ALT+R to add an alarm or use the Add Alarm button).</li>
<li>Options for 24 Hour (Military) time and Seconds display</li>
<li>Supports MP3 (hosted online), YouTube videos (that allow embedding), and last.fm user or tag streams.</li>
<li>Key Mash Mode to kill the alarm (hit five random keys in one second)</li>
<li>Time Font Size customization (automatically size to the width of the window using the Max option)</li>
<li>Typical alarm clock colors: Red, Green, or Blue</li>
<li>Alarm Toggle based on the Day of the Week</li>
<li>Test button to make sure your speaker volume is set correctly.</li>
<li>Sleep Mode button to get rid of the extra GUI while you don't need it.</li>
<li>Save all of your settings, URL's, and alarms locally in a cookie (you <strong>don't</strong> need yet another account to use this)</li>
</ul>
<p>Things to think about:</p>
<ul>
<li>Power Settings - disable your screen saver, or any sort of automatic suspend or sleep setting.  In my testing, having your monitor go into power save mode is acceptable, and the alarms will still sound (but you might want to test this yourself and leave a comment with your result).</li>
<li>You might not want to use with a CRT, for fear of burn in.</li>
<li>Personally, I like to use this in Opera, just because their default full screen mode (F11) doesn't have toolbars or a status bar.  But you can use the <a href="https://addons.mozilla.org/en-US/firefox/addon/4650">Fuller Screen Firefox plug-in</a> to soup up your Firefox for similar functionality.</li>
<li>Word of warning, the window <strong>must</strong> have focus to autoplay YouTube videos.</li>
<li>Make sure your local time on your computer is correct, especially if you are traveling between time zones.  It doesn't do any server side validation on the time (yet?).</li>
</ul>
<p>Possible Future Improvements:</p>
<ul>
<li>Countdown mode, displays amount of time until next alarm in place of the clock (good for timed presentations, where you want to see how much time is left before you have to quit).</li>
<li>Google Gears integration for offline mode (if your internet goes out during the night)</li>
<li>Support customizing source URL's on a per alarm basis.</li>
<li>Support days of the week toggle on a per alarm basis.</li>
<li>Support user specified color customization.</li>
<li>A crescendo alarm MP3 that increases in volume for a more peaceful wake up experience.</li>
<li>An alarm MP3 with especially violent noises for heavy sleepers.</li>
<li>An alarm MP3 of my mom's voice to get that nice feeling of childhood back.</li>
</ul>
<p>This internet application was built using the Yahoo UI Libraries (YUI) and Jack Slocum's Ext DomQuery class.  It is written entirely without using any server side programming languages, and therefore can be saved to your local machine.  Not that anyone might want to use the Internet Alarm Clock, but if you do, I declare it officially released under the BSD license.  Just don't forget to cite the source when you redistribute.</p>
<p><strong>Update</strong>: added a couple more things to think about.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/YUI" rel="tag">YUI</a>, <a href="http://technorati.com/tag/DomQuery" rel="tag"> DomQuery</a>, <a href="http://technorati.com/tag/alarm-clock" rel="tag"> alarm-clock</a>, <a href="http://technorati.com/tag/javascript" rel="tag"> javascript</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2007/06/18/wake-up-to-youtube-on-my-internet-alarm-clock/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Enlarging your YUI DataTable in 30 Seconds or Less!</title>
		<link>http://www.zachleat.com/web/2007/06/07/enlarging-your-yui-datatable-in-30-seconds-or-less/</link>
		<comments>http://www.zachleat.com/web/2007/06/07/enlarging-your-yui-datatable-in-30-seconds-or-less/#comments</comments>
		<pubDate>Fri, 08 Jun 2007 02:51:08 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Expandable]]></category>

		<category><![CDATA[Grid]]></category>

		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/06/07/enlarging-your-yui-datatable-in-30-seconds-or-less/</guid>
		<description><![CDATA[Please note that this post has been updated to the new version of YUI, 2.3.0 in an article called "Enlarging your YUI DataTable in 29 Seconds or Less!"
Do you want to fit more content onto your DataTable, but don't know how?  Do you wish that you had fewer columns, or more horizontal screen-estate?  [...]]]></description>
			<content:encoded><![CDATA[<p><b>Please note that this post has been updated to the new version of YUI, 2.3.0 in an article called <a href="http://www.zachleat.com/web/2007/08/28/enlarging-your-yui-datatable-in-29-seconds-or-less/">"Enlarging your YUI DataTable in 29 Seconds or Less!"</a></b></p>
<p>Do you want to fit more content onto your DataTable, but don't know how?  Do you wish that you had fewer columns, or more horizontal screen-estate?  Well now you can enlarge your table easily with these simple functions!  Instead of adding more information into additional columns, we have used our patented method of not actually patenting anything to bring you a secret formula that will allow you to dynamically insert rows into your table, designed for holding additional, non-constrained customizable content!</p>
<p>Do you mean to tell me that your formula will give that special lady in your life the DataTable that she has always wanted?</p>
<p>Of course!  In fact, we guarantee this DataTable to satisfy all of the women you know and don't know in the world or we'll give you a full refund of the purchase price!</p>
<p>Wow! How does it work?</p>
<p><a href="http://www.zachleat.com/Projects/valdi/__test_yui_datatable_expandable.html"></p>
<p>Click here for an example!</p>
<p><img src='http://www.zachleat.com/web/wp-content/uploads/2007/06/datatable.gif' alt='Normal DataTable' /></p>
<p><img src='http://www.zachleat.com/web/wp-content/uploads/2007/06/datatableexpanded.gif' alt='Expanded DataTable' /><br />
</a></p>
<p>When you click on a row in the DataTable, it inserts a child row beneath the row with an HTML string passed in to populate the dynamic content.  When you click on the parent row or the new row that was inserted, the content disappears!  It's that easy!  You don't have to apply any gross awful smelling creams, or take any large horse-sized pills for this to work!  You literally only use the following code to do it:</p>
<p>Usage Code:</p>
<div class="syntax_hilite">
<div id="javascript-5">
<div class="javascript"><span style="color: #003366; font-weight: bold;">var</span> myDataTable = <span style="color: #003366; font-weight: bold;">new</span> YAHOO.<span style="color: #006600;">widget</span>.<span style="color: #006600;">DataTable</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"myContainer"</span>,myColumnSet,myDataSource<span style="color: #66cc66;">&#41;</span>;&nbsp; <br />
myDataTable.<span style="color: #006600;">subscribe</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"cellClickEvent"</span>, myDataTable.<span style="color: #006600;">onEventSelectRow</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #009900; font-style: italic;">// make sure you're firing the row selection event</span><br />
myDataTable.<span style="color: #006600;">subscribe</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"cellClickEvent"</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span> e <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> myCustomHtml = <span style="color: #3366CC;">'Hello, this is my expanded content.&lt;br /&gt;:-)&lt;br /&gt;'</span>; <span style="color: #009900; font-style: italic;">// generate the string, could use an ajax call if you wanted.</span><br />
&nbsp; &nbsp;YAHOO.<span style="color: #006600;">ymod</span>.<span style="color: #006600;">datatable</span>.<span style="color: #006600;">clickAndExpand</span>.<span style="color: #006600;">call</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000066; font-weight: bold;">this</span>, e, myCustomHtml <span style="color: #66cc66;">&#41;</span>; <span style="color: #009900; font-style: italic;">// if you do use an ajax call, this function returns a reference to the newly created div that you can put the ajax results into.</span><br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;</div>
</div>
</div>
<p></p>
<p>Library Code:</p>
<div class="syntax_hilite">
<div id="javascript-6">
<div class="javascript">YAHOO.<span style="color: #003366; font-weight: bold;">namespace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #3366CC;">'YAHOO.ymod.datatable'</span> <span style="color: #66cc66;">&#41;</span>;<br />
YAHOO.<span style="color: #006600;">ymod</span>.<span style="color: #006600;">datatable</span>.<span style="color: #006600;">clickAndExpand</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span> e, expandedHtml <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> selectedRows = <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">getSelectedRows</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> selectedRows.<span style="color: #006600;">length</span>&gt; <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">hasClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'ymod-expandedData'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">previousSibling</span>, <span style="color: #3366CC;">'expanded'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">parentNode</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> !YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">hasClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'ymod-expanded'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> newRow = document.<span style="color: #006600;">createElement</span><span style="color: #66cc66;">&#40;</span> <span style="color: #3366CC;">'tr'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> newCell = document.<span style="color: #006600;">createElement</span><span style="color: #66cc66;">&#40;</span> <span style="color: #3366CC;">'td'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> newDiv = document.<span style="color: #006600;">createElement</span><span style="color: #66cc66;">&#40;</span> <span style="color: #3366CC;">'div'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span> newDiv, <span style="color: #3366CC;">'ymod-expandedDataContent'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> expandedHtml != <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #66cc66;">&#41;</span> newDiv.<span style="color: #006600;">innerHTML</span> = expandedHtml;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newCell.<span style="color: #006600;">appendChild</span><span style="color: #66cc66;">&#40;</span> newDiv <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newCell.<span style="color: #006600;">colSpan</span> = selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">childNodes</span>.<span style="color: #006600;">length</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRow.<span style="color: #006600;">appendChild</span><span style="color: #66cc66;">&#40;</span> newCell <span style="color: #66cc66;">&#41;</span>;&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span> newRow, <span style="color: #3366CC;">'ymod-expandedData'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">hasClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'yui-dt-odd'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span> newRow, <span style="color: #3366CC;">'yui-dt-odd'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">hasClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'yui-dt-even'</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span> newRow, <span style="color: #3366CC;">'yui-dt-even'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">addClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'ymod-expanded'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">parentNode</span>.<span style="color: #006600;">insertBefore</span><span style="color: #66cc66;">&#40;</span> newRow, selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">nextSibling</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Event</span>.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span> newRow, <span style="color: #3366CC;">'click'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span> e <span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">ymod</span>.<span style="color: #006600;">datatable</span>.<span style="color: #006600;">collapseRow</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000066; font-weight: bold;">this</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Event</span>.<span style="color: #006600;">stopEvent</span><span style="color: #66cc66;">&#40;</span> e <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'yui-dt-selected'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Event</span>.<span style="color: #006600;">stopEvent</span><span style="color: #66cc66;">&#40;</span> e <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> newDiv;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">parentNode</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">nextSibling</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'ymod-expanded'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span> selectedRows<span style="color: #66cc66;">&#91;</span> <span style="color: #CC0000;">0</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #3366CC;">'yui-dt-selected'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Event</span>.<span style="color: #006600;">stopEvent</span><span style="color: #66cc66;">&#40;</span> e <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span>;</p>
<p><span style="color: #009900; font-style: italic;">// pass in the expanded content, NOT the parent row.</span><br />
YAHOO.<span style="color: #006600;">ymod</span>.<span style="color: #006600;">datatable</span>.<span style="color: #006600;">collapseRow</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span> row <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span> row.<span style="color: #006600;">previousSibling</span>, <span style="color: #3366CC;">'ymod-expanded'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; YAHOO.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dom</span>.<span style="color: #006600;">removeClass</span><span style="color: #66cc66;">&#40;</span> row.<span style="color: #006600;">previousSibling</span>, <span style="color: #3366CC;">'yui-dt-selected'</span> <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; row.<span style="color: #006600;">parentNode</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span> row <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span>;</div>
</div>
</div>
<p></p>
<p>Customize the CSS, if desired.</p>
<div class="syntax_hilite">
<div id="code-7">
<div class="code">.<span style="">yui</span>-dt-table tr.<span style="">ymod</span>-expandedData <span style="color:#006600; font-weight:bold;">&#123;</span> background-color: #bdcede; cursor: pointer; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
.<span style="">yui</span>-dt-table tr.<span style="">ymod</span>-expandedData td <span style="color:#006600; font-weight:bold;">&#123;</span> padding-right: 5px; padding-bottom: 5px; white-space: normal; overflow: visible; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
.<span style="">yui</span>-dt-table tr.<span style="">ymod</span>-expanded <span style="color:#006600; font-weight:bold;">&#123;</span> background-color: #bdcede; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
.<span style="">yui</span>-dt-table tr.<span style="">ymod</span>-expanded td <span style="color:#006600; font-weight:bold;">&#123;</span> border-bottom: <span style="color:#800000;">0</span>; <span style="color:#006600; font-weight:bold;">&#125;</span><br />
.<span style="">yui</span>-dt-table div.<span style="">ymod</span>-expandedDataContent <span style="color:#006600; font-weight:bold;">&#123;</span> background-color: #f4f4f4; border: 1px inset #aaa; padding: 2px 5px; white-space: normal; zoom: <span style="color:#800000;">1</span>; overflow: hidden; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</div>
</div>
<p></p>
<p>You might even want to put a little + and - into the first column of each row to give a visual cue that there is more information for display available on click.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/YUI" rel="tag">YUI</a>, <a href="http://technorati.com/tag/DataTable" rel="tag"> DataTable</a>, <a href="http://technorati.com/tag/Grid" rel="tag"> Grid</a>, <a href="http://technorati.com/tag/YUI+DataTable" rel="tag"> YUI DataTable</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2007/06/07/enlarging-your-yui-datatable-in-30-seconds-or-less/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Problems with YUI DataTable</title>
		<link>http://www.zachleat.com/web/2007/04/04/problems-with-yui-datatable/</link>
		<comments>http://www.zachleat.com/web/2007/04/04/problems-with-yui-datatable/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 22:52:41 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Reviews]]></category>

		<category><![CDATA[ExtJS]]></category>

		<category><![CDATA[Grid]]></category>

		<category><![CDATA[YUI]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/04/04/problems-with-yui-datatable/</guid>
		<description><![CDATA[If you have read anything I've written before or know me at all, you know that my go-to JavaScript library is the one and only YUI.  So obviously, when I was looking around for a Grid (or as YUI jargon goes, a DataTable), naturally I'm going to turn to YUI compatible components.  First, [...]]]></description>
			<content:encoded><![CDATA[<p>If you have read anything I've written before or know me at all, you know that my go-to JavaScript library is the one and only YUI.  So obviously, when I was looking around for a Grid (or as YUI jargon goes, a DataTable), naturally I'm going to turn to YUI compatible components.  First, I looked at Jack Slocum's EXT, which has a nice looking Grid component that had a lot of features I wouldn't need, but I didn't really want to take a 0.5 MB hit for the limited feature set I was requiring.  Adding the YUI DataTable would only tack on approximately 70-75 KB of additional download.  So first, let me establish what I'm going for:</p>
<p><strong>Minimum Feature Set</strong>:</p>
<ul>
<li>Client-Side Sorting: I don't want it to do an XMLHttpRequest to sort the data, I want it to be done all clientside.</li>
<li>Simple inline editing: Edit a field in the table right there on the table.  I hadn't established what types of data I would need to edit yet.</li>
<li>Data Sources: load from a native JavaScript array or a XMLHttpRequest returning XML or JSON.</li>
<li>Data Type Sort Algorithms: at the very minimum different sorting algorithms for numeric columns and string columns.</li>
<li>Hierarchical Columns: group column headers together under a parent header.</li>
<li>Easily customizable: must be able to customize the look and feel of the grid easily using CSS and not by editing Javascript.</li>
<li>Header Freeze: If I have overflow on my table vertically causing a scroll bar, I want the table headers to remain shown at the top of the table while I scroll from top to bottom.</li>
<li>Custom Cell Rendering: I have the data I'm loading, but I want to change how it looks when it is rendered to the table.  Common for date formatting.</li>
</ul>
<p><strong>Luxury Feature Set</strong>:</p>
<ul>
<li>Resizeable Columns: change the width of a column by dragging on the column header's right border.</li>
<li>Movable Columns: dragging a column will cause it to be moved on the table (TIBCO General Interface supports this).</li>
<li>Custom Sort Algorithm: write my own algorithm to specify how data is sorted, or provide a way to do multi-column sorting (sort within one column, ties are sorted by another column, and so on).</li>
<li>Dynamic Paging (don't make me click numbered links, load the data automatically when I scroll) both on the client (dynamically insert only what I'm looking at and remove what I've scrolled past) and using the server (load more data through an XMLHttpRequest)</li>
<li>Column Freeze: if the table is going to scroll horizontally, allow the developer to freeze a column or multiple columns so that they are shown when scrolling from left to right.</li>
</ul>
<p><strong>Evaluation of Options</strong>: How does the YUI DataTable stack up?</p>
<p>Basic Items: Client-Side Sorting, Simple inline editing, Data Sources, Data Type Sort Algorithms (<em>stock types not yet implemented out of the box</em>), Hierarchical Columns, Header Freeze (<em>buggy</em>), Custom Cell Rendering, and is easily customizable with CSS.</p>
<p>Luxury Items: Resizeable Columns, Movable Columns (<em>not supported</em>), Custom Sort Algorithms are supported (you can right your own Data Type Sort Algorithms with this feature), Dynamic Paging (manually, not dynamic), Column Freeze (<em>not supported</em>)</p>
<p>Problems:</p>
<ul>
<li>Any sort of fixed width table is going to be problematic.  Putting a fixed width on the table causes the table headers to be misaligned with the associated table data.  It's a mess.  The only viable option here is to let the table do it's own width calculations.  You can't even set the column widths manually using the {width} variable as suggested when using a fixed width table.</li>
<li>Data Type Sort Algorithms supposedly work from the column type, but this feature is documented in the code as being a TODO.  All columns are sorted by a string datatype, meaning that if your column is numeric and you had the following rows: { 3, 7, 40 }, the sort result would be { 3, 40, 7 }.</li>
<li>Header Freeze was problematic.  Implementing the {scrollable=true} feature as recommended by the documentation causes the table headers to be misaligned with the data in a fixed width table.</li>
<li>Paging uses the old school numbers method.  This wasn't a deal breaker, since I classified this feature as a luxury item.</li>
</ul>
<p>Granted, the DataTable in it's current form is a beta component, but that 0.5 MB ExtJS hit is looking pretty nice right now.</p>
<p><strong>Minor Update</strong>: to do a fixed width table that will overflow horizontally, this is the method you can use:</p>
<div class="syntax_hilite">
<div id="code-9">
<div class="code">div#dataTableId <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#008000;">/* change this to whatever id you're using to hold the dataTable */</span><br />
&nbsp; &nbsp; width:520px; <span style="color:#008000;">/* put in your own fixed width */</span><br />
&nbsp; &nbsp; overflow-x:auto;<br />
&nbsp; &nbsp; overflow-y:hidden;<br />
<span style="color:#006600; font-weight:bold;">&#125;</span><br />
.<span style="">yui</span>-dt-headtext, .<span style="">yui</span>-dt-headcontainer <span style="color:#006600; font-weight:bold;">&#123;</span><br />
&nbsp; &nbsp; position: static; <span style="color:#008000;">/* without this declaration, the headers weren't horizontally scrolling with the data in IE6 */</span><br />
<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</div>
</div>
<p></p>
<p>Technorati Tags: <a href="http://technorati.com/tag/YUI" rel="tag">YUI</a>, <a href="http://technorati.com/tag/DataTable" rel="tag"> DataTable</a>, <a href="http://technorati.com/tag/Grid" rel="tag"> Grid</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2007/04/04/problems-with-yui-datatable/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Conservative Design Example: Hierarchical Options</title>
		<link>http://www.zachleat.com/web/2007/03/23/conservative-design-example-hierarchical-options/</link>
		<comments>http://www.zachleat.com/web/2007/03/23/conservative-design-example-hierarchical-options/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 06:52:12 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Conservative Design]]></category>

		<category><![CDATA[Hierarchical Select]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/03/23/conservative-design-example-hierarchical-options/</guid>
		<description><![CDATA[Welcome, one and all, to the second installment of actual code examples for the Conservative Design series.  The decision was made (by me) to rename the component in question from the original Hierarchical Select to Hierarchical Options, due to the fact that the hierarchy can consist of any multiple option component, and is not [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome, one and all, to the second installment of actual code examples for the Conservative Design series.  The decision was made (by me) to rename the component in question from the original Hierarchical Select to Hierarchical Options, due to the fact that the hierarchy can consist of any multiple option component, and is not limited to just a select.  And to this face, this particular component was documented in the original post entitled <a href="http://www.zachleat.com/web/2007/02/22/conservative-design-hierarchical-select-boxes/">Conservative Design: Hierarchical Select Boxes</a>.</p>
<p><a href='http://www.zachleat.com/Projects/valdi/hierarchicalOptions.html' title='Hierarchical Options'><img src='http://www.zachleat.com/web/wp-content/uploads/2007/03/hierarchical.gif' alt='Hierarchical Options' /></a><br />
Click the image above to go to the example.</p>
<p>Notes on the example: The Tree structure is as follows:</p>
<ul>
<li>Primary
<ul>
<li>Secondary</p>
<ul>
<li>Tertiary</p>
<ul>
<li>Quaternary</p>
<ul>
<li>Quinary</li>
</ul>
</li>
</ul>
</li>
<li>2nd Tertiary (is a static element that doesn't hide)</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>So without further adieu or out of place french, what do we have?  3 out of 4 requirements and 1 of 2 luxury items.</p>
<ul>
<li>Handles any number of select elements in a linear or tree (luxury item) like structure.</li>
<li>Child select elements are optional based on parent selection.  Can hide entire div element or display a message stating no options are available.</li>
<li>Compliant with the Reset button.</li>
<li>Right now only loads from standard HTML markup (not yet from JavaScript or JSON or an XMLHTTPRequest)</li>
<li>Only supports Select elements for now, in the future should be abstracted to support Checkbox Lists or any multiple option component.</li>
</ul>
<p><strong>Outstanding Bugs</strong>:</p>
<ul>
<li>Opera button doesn't reset properly with Reset Button</li>
<li>Clicking off of the default and then back onto the default has the original selections downstream (but doesn't propagate more than one level)</li>
</ul>
<p>Technorati Tags: <a href="http://technorati.com/tag/JavaScript" rel="tag">JavaScript</a>, <a href="http://technorati.com/tag/Hierarchical+Select" rel="tag"> Hierarchical Select</a>, <a href="http://technorati.com/tag/YUI" rel="tag"> YUI</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2007/03/23/conservative-design-example-hierarchical-options/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Conservative Design Example: Multiple Option List</title>
		<link>http://www.zachleat.com/web/2007/03/10/conservative-design-example-multiple-option-list/</link>
		<comments>http://www.zachleat.com/web/2007/03/10/conservative-design-example-multiple-option-list/#comments</comments>
		<pubDate>Sat, 10 Mar 2007 22:39:40 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[JavaScript]]></category>

		<category><![CDATA[Projects]]></category>

		<category><![CDATA[Conservative Design]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/03/10/conservative-design-example-multiple-option-list/</guid>
		<description><![CDATA[All of the posts in the Conservative Design series so far have been brainstorming of design patterns.  But how about some real life examples, some actual code?  Let's dive in.
The first example I decided to tackle was the Option List, specifically the variant that allows multiple options to be selected.  Let me [...]]]></description>
			<content:encoded><![CDATA[<p>All of the posts in the Conservative Design series so far have been brainstorming of design patterns.  But how about some real life examples, some actual code?  Let's dive in.</p>
<p>The first example I decided to tackle was the <a href="http://www.zachleat.com/web/2007/02/26/conservative-design-option-list/">Option List</a>, specifically the variant that allows multiple options to be selected.  Let me start out by saying that I didn't abstract out the type of source element that you could put into this example, I only programmed the element for a &lt;select multiple&gt; element.  For the impatient, let's just start with the result:</p>
<p><a href="http://www.zachleat.com/Projects/valdi/multipleSelectList.html"><img src='http://www.zachleat.com/web/wp-content/uploads/2007/03/optionlist_multiple_real.gif' alt='Multiple Option List Real Example' /></a><br />
Click the image to see the actual example.</p>
<p>This element was constructed using the YUI Library and Jack Slocum's DomQuery selector class, as well as using the new form validation CSS and JavaScript code I'm currently developing entitled '<strong>Valdi</strong>'.</p>
<p>It includes 3 of the 4 of the minimum features required as set in the original specification.</p>
<p>Features:</p>
<ul>
<li><strong>Validation</strong>: there is no submit button, but if there were, it would validate if the form has been entry has a value.</li>
<li><strong>Quick Links</strong>: Select All, Select None, and Sort the Options</li>
<li><strong>Customizable Options</strong>: Allow the user to add their own options for selection.</li>
<li>Does <strong>not </strong>abstract option types (checkbox, etc)</li>
<li>Keyboard Support: CTRL+A inside of the select box selects all options, Delete or Backspace removes the selected options, Enter key inside Add input field automatically adds option to the select.</li>
<li>Can be <em>easily</em> transformed into a Single Option List by removing the multiple="multiple" option in the html.</li>
<li>Sort will toggle between Ascending and Descending and maintain the selected options</li>
<li>When the number of options outweighs the select size, the number of options is displayed next to the Add button.  Try adding 5 or more options to the select list.</li>
</ul>
<p>Screenshots for the Lazy People:</p>
<p>Multiple Options are Added<br />
<img src='http://www.zachleat.com/web/wp-content/uploads/2007/03/optionlist_multiple_real1.gif' alt='Multiple Option List Real Example' /></p>
<p>Validation when an Option is not selected:<br />
<img src='http://www.zachleat.com/web/wp-content/uploads/2007/03/optionlist_multiple_real21.gif' alt='Multiple Option List Real Example' /></p>
<p>Success, they selected something and submitted:<br />
<img src='http://www.zachleat.com/web/wp-content/uploads/2007/03/optionlist_multiple_real31.gif' alt='Multiple Option List Real Example' /></p>
<p>Watch for another separate article about Valdi later on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2007/03/10/conservative-design-example-multiple-option-list/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Conservative Design: Command Line Interface</title>
		<link>http://www.zachleat.com/web/2007/03/07/conservative-design-command-line-interface/</link>
		<comments>http://www.zachleat.com/web/2007/03/07/conservative-design-command-line-interface/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 06:52:05 +0000</pubDate>
		<dc:creator>Zach Leatherman</dc:creator>
		
		<category><![CDATA[Interface Design]]></category>

		<category><![CDATA[Conservative Design]]></category>

		<guid isPermaLink="false">http://www.zachleat.com/web/2007/03/07/conservative-design-command-line-interface/</guid>
		<description><![CDATA[This is another post in the series entitled Conservative Design Patterns for Form Elements.
The argument has existed since the dawn of the Graphical User Interface (GUI).  Which is better, keyboard-exclusive Command Line or mouse-intensive GUI's?  As more enterprise architectures are moving from terminals to web interfaces for their products, and as time is [...]]]></description>
			<content:encoded><![CDATA[<p>This is another post in the series entitled <a href="http://www.zachleat.com/web/2007/02/22/conservative-design-patterns-for-form-elements/">Conservative Design Patterns for Form Elements</a>.</p>
<p>The argument has existed since the dawn of the Graphical User Interface (GUI).  Which is better, keyboard-exclusive Command Line or mouse-intensive GUI's?  As more enterprise architectures are moving from terminals to web interfaces for their products, and as time is moving forward with the everyman user desiring an interface that looks pretty and easy to use, we're seeing a drastic reduction in the utilization of the keyboard.</p>
<p>But with the exception of form input, we've almost completely moved away from the keyboard as a means to execute functions and navigation.  I'm proposing that we bring back the power of the keyboard.  Obviously we can't get rid of the GUI altogether, but instead complement it with a powerful command line.</p>
<p>This component could exist as a standalone command line interface component or as a supplement to any search bar your page may contain.  The basic premise of the Command Line Interface component is to provide a standardized method of navigating your website using nothing but the keyboard.  It could fulfill more complex operations, but the scope of this article will just cover command line rudimentary navigation.</p>
<p>Screen Printing: Fake Command Line Example<br />
<img src='http://www.zachleat.com/web/wp-content/uploads/2007/03/commandline.gif' alt='Command Line' /></p>
<p>Screen Printing: Fake Command Line Example of AutoComplete Capabilities<br />
<img src='http://www.zachleat.com/web/wp-content/uploads/2007/03/commandline_f.gif' alt='Command Line AutoComplete' /></p>
<p><strong>Minimum Feature Set</strong>: (<a href="http://jfulton.org/?page=Software&#038;file=gui.php">source</a>)</p>
<ul>
<li>Autocomplete: must be able to finish the current command being typed by presenting a list of available options to the user.  Must be compatible with keyboard navigation:
<ul>
<li>UP and DOWN arrows to select from list</li>
<li>TAB autocompletes to first option</li>
</ul>
</li>
<li>Markup Scanning for Applicable Links: scan the current dom for &lt;a&gt; tags with a href element that could be used in autocomplete.</li>
<li>Quick commands: markup options (custom attributes?) to allow the programmer to define commands in the html.  These are one to three character combinations that execute a link or event.</li>
<li>Standardized Command Set: standardized hot key to force focus to the command line.  Also, for navigation options that are standardized between every website, have a standard set of commands that will execute with the same behavior, regardless of navigation implementation (Home [H], Login [L], Register [R], Forgotten Password [FP], Contact Us Page [C], Privacy Policy [PRIV], Terms of Service [TOS])</li>
</ul>
<p><strong>Luxury Feature Set</strong>:</p>
<ul>
<li>Markup Scanning for Events: sometimes navigation is executed through event handling.  Scan the events assigned to nodes for any available options that could be executed in navigation.</li>
</ul>
<p><strong>Limitations</strong>:</p>
<ul>
<li>Limitations on any sort of mouse-required interface: drag and drop</li>
<li>Interaction with flash?</li>
</ul>
<p><strong>Idea Credits</strong>:</p>
<ul>
<li><a href="http://www.softpanorama.org/OFM/gui_vs_command_line.shtml">GUI vs Command line interface</a></li>
<li><a href="http://www.humanized.com/weblog/2007/02/24/your_grandmothers_command_line_the_command_line_co/">Command Line for the Common Man: The Command Line Comeback</a></li>
</ul>
<p>Technorati Tags: <a href="http://technorati.com/tag/command+line" rel="tag">command line</a>, <a href="http://technorati.com/tag/javascript" rel="tag"> javascript</a>, <a href="http://technorati.com/tag/design+patterns" rel="tag"> design patterns</a>, <a href="http://technorati.com/tag/cli" rel="tag"> cli</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zachleat.com/web/2007/03/07/conservative-design-command-line-interface/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
