<?xml version="1.0" encoding="UTF-8"?>
<rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Arc90 Lab</title>
	
	<link>http://lab.arc90.com</link>
	<description>Web Application Design &amp; Development</description>
	<lastBuildDate>Mon, 08 Feb 2010 15:22:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Arc90Lab" /><feedburner:info uri="arc90lab" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>HashMask</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/mVvJNBRI7VE/</link>
		<comments>http://lab.arc90.com/2009/07/09/hashmask-another-more-secure-experiment-in-password-masking/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 19:06:02 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Experiments]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/07/09/hashmask-another-more-secure-experiment-in-password-masking/</guid>
		<description><![CDATA[<p>HashMask attempts to provide an easier-to-view visual "fingerprint" for users to recognize the password they've entered. Within the password text box, a sparkline is drawn to aid the user in recognizing what they've entered.</p>]]></description>
			<content:encoded><![CDATA[<p>HashMask is an attempt to find a more secure middle ground between clear and masked passwords. It does this by visualizing a hashed representation of the password as a sparkline with color &#8211; the intent being that the user would become familiar with this image and be able to easily confirm that they typed the right (or wrong) password.</p>
<hr />
<h4 id="demo">Demo</h4>
<p><iframe src="http://lab.arc90.com/experiments/hashmask/demo.html" width="600" height="300" style="margin-left: 10px; border: 1px solid #CCC"></iframe></p>
<h4 id="why">Why?</h4>
<p>My original experiment, <a href="http://lab.arc90.com/2009/07/halfmask.php">HalfMask</a>, produced lots of good discussion, which is exactly what I had hoped for. As security expert Bruce Schneier said recently, <a href="http://www.schneier.com/blog/archives/2009/07/the_pros_and_co.html">password masking is not a panacea</a>. Finding a solution that provides both security and usability is the goal.</p>
<p>As with HalfMask, HashMask is purely an experiment. I&#8217;m not suggesting that this is the best middle ground between clear and masked passwords. I am just hoping to get the community thinking about different approaches.</p>
<h4 id="how">How does it work?</h4>
<p>HashMask is a <a href="http://www.jquery.com">jQuery</a> plugin that will produce a unique and non reversible visualization of a users password.  The hope being that they would be able to confirm that they entered their password correctly, but no one else would. It also degrades gracefully so that users without javascript or a poor browser (IE6) will just see a password field.</p>
<p>Technically speaking, it uses a subset of the sha1 hash of the password as the seed for the sparkline&#8217;s shape and color. It should be relatively safe from reverse engineering as a result. There is the potential to estimate a possible range of characters of the first section of the hash, but overall this should be a extremely low risk.</p>
<h4 id="use">Can I use it?</h4>
<p>HashMask is still alpha-level software, but it should be relatively safe to use on an experimental basis if you are interested. It should work on Firefox 3, Safari 4 and IE6+. It&#8217;s available here, as well as on <a href="http://code.google.com/p/hashmask">google code</a>.</p>
<h4 id="download">Download</h4>
<p><p>Click on the icon to go to the download directory at google code:</p>
<p><a href="http://code.google.com/p/hashmask/downloads/list"><img alt="Download" src="http://arc90.com/_img/download.gif" /></a></p>
<p>Additionally, you may <a href="http://code.google.com/p/hashmask/source/browse/trunk/jquery.hashmask.js">view the source directly in google code</a>.</p>
</p>
<h4 id="license">License</h4>
<p>HashMask is released under the BSD license.</p>
<h4 id="improvement">Room for Improvement</h4>
<p>I personally like this approach much better than HalfMask. It&#8217;s more secure at the loss of slight usability. That said, there is room for improvement, specifically with regard to more memorable and elegant visualizations. A colored sparkline works, but it&#8217;s not ideal. If you have suggestions, please let me know or feel free to fork and implement!</p>
<h4 id="discuss">Discuss</h4>
<p>Please offer feedback on the <a href="http://blog.arc90.com/2009/07/newer_in_the_lab_hashmask_-_an.php">Arc90 Blog</a>, or email me, Chris Dary, at <a href="mailto:chrisd@arc90.com">chrisd@arc90.com</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/mVvJNBRI7VE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/07/09/hashmask-another-more-secure-experiment-in-password-masking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/07/09/hashmask-another-more-secure-experiment-in-password-masking/</feedburner:origLink></item>
		<item>
		<title>HalfMask</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/etl_XbL4Bsc/</link>
		<comments>http://lab.arc90.com/2009/07/08/halfmask-an-experiment-in-password-masking/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 15:03:11 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/07/08/halfmask-an-experiment-in-password-masking/</guid>
		<description><![CDATA[<p>HalfMask is an experimental approach to masking on password fields. Rather than just showing bullets or asterisks, HalfMask presents visual cues so the user can easily read their own password.</p>]]></description>
			<content:encoded><![CDATA[<p>HalfMask is an experimental approach to masking on password fields. Currently the standard shows bullets or asterisks to hide a user&#8217;s password completely as they type. Halfmask avoids this by obscuring the password with semi-visible random characters in the background. The intent is to only allow the user who typed the password to easily read it.</p>
<p><strong>Update: If you find HalfMask interesting, you may want to check out our newer experiment, <a href="http://lab.arc90.com/2009/07/hashmask.php">HashMask</a>.</strong></p>
<hr />
<h4 id="demo">Demo</h4>
<p><iframe src="http://lab.arc90.com/experiments/halfmask/demo.html" width="600" height="300" style="margin-left: 10px; border: 1px solid #CCC"></iframe></p>
<h4 id="why">Why?</h4>
<p>There&#8217;s been a lot of buzz in the tubes lately about password masking being A Bad Thing, specifically brought on by <a href="http://www.useit.com/alertbox/passwords.html">Jakob Nielsen&#8217;s AlertBox article, Stop Password Masking</a>. To be frank, I couldn&#8217;t disagree more with this. I think showing clear passwords would be a huge mistake, despite the obvious usability gains. But I&#8217;m all about compromise, so HalfMask is an attempt to meet Jakob halfway.</p>
<p>I&#8217;m not suggesting that this is the best way to mask passwords. I am just hoping to get the community thinking about different approaches by exploring one approach.</p>
<h4 id="how">How does it work?</h4>
<p>HalfMask is a <a href="http://www.jquery.com">jQuery</a> plugin that will obscure a password field with random characters. The intent is that to a casual observer the field will be unreadable at a glance, but the user inputting the text will be able to read it relatively clearly as they only need to confirm what they input, not read it fresh.</p>
<p>In this way, it is usable <em>enough</em>, by being visible to the author, but not <em>too usable</em>, in that shoulder surfers shouldn&#8217;t be able to read it. It also degrades gracefully so that users without javascript or with a poor browser (IE6) will still see a password field.</p>
<h4 id="use">Can I use it?</h4>
<p>Well sure, but I can&#8217;t recommend using this in any critical software. It should work in Firefox 3, Safari 3 and IE7. It&#8217;s available here, as well as on <a href="http://code.google.com/p/halfmask">google code</a>.</p>
<h4 id="download">Download</h4>
<p><p>Click on the icon to go to the download directory at google code:</p>
<p><a href="http://code.google.com/p/halfmask/downloads/list"><img alt="Download" src="http://arc90.com/_img/download.gif" /></a></p>
<p>Additionally, you may <a href="http://code.google.com/p/halfmask/source/browse/trunk/jquery.halfmask.js">view the source directly in google code</a>.</p>
</p>
<h4 id="license">License</h4>
<p>HalfMask is released under the BSD license.</p>
<h4 id="knownissues">Known Issues</h4>
<p>There are a few known issues with this approach:</p>
<ul>
<li>Text becomes nearly impossible to read at small fonts.</li>
<li>Password fields are still vulnerable to cameras/recording.</li>
<li>Colorblind people may have a harder time reading the correct text.</li>
</ul>
<p>These are issues which readers are welcome to solve with their own approach or with modifications to this one!</p>
<h4 id="discuss">Discuss</h4>
<p>Please offer feedback on the <a href="http://blog.arc90.com/2009/07/new_in_the_lab_halfmask_a_pass.php">Arc90 Blog</a>, or email me, Chris Dary, at <a href="mailto:chrisd@arc90.com">chrisd@arc90.com</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/etl_XbL4Bsc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/07/08/halfmask-an-experiment-in-password-masking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/07/08/halfmask-an-experiment-in-password-masking/</feedburner:origLink></item>
		<item>
		<title>TBUZZ</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/8MKlLW3TUKA/</link>
		<comments>http://lab.arc90.com/2009/05/12/tbuzz/#comments</comments>
		<pubDate>Tue, 12 May 2009 12:16:54 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[tbuzz arc90]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/05/12/tbuzz/</guid>
		<description><![CDATA[<p>Our wildly-popular Twitter client, TBUZZ lets you easily post to Twitter directly from your Web browser, and shows you what others are saying about that page. It works with all modern Web browsers.</p>]]></description>
			<content:encoded><![CDATA[<p>Following in the footsteps of our last lab experiment &#8211; <a href="http://lab.arc90.com/experiments/readability/">Readability</a> &#8211; we bring yet another bookmarklet. We wanted an easy way to twitter as we browse the Web. We also wanted to see what others were saying about the pages we were visiting.</p>
<p>Enter <a href="http://tbuzz.arc90.com/">TBUZZ</a>:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="450" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=4548135&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="600" height="450" src="http://vimeo.com/moogaloop.swf?clip_id=4548135&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>You can install <a href="http://tbuzz.arc90.com">TBUZZ</a> in just a few seconds by visiting:</p>
<h2 style="margin-bottom: 1em;text-align: center"><a href="http://tbuzz.arc90.com">http://tbuzz.arc90.com</a></h2>
<p>If you&#8217;ve got thoughts, feedback or suggestions regarding TBUZZ, feel free to <a href="http://blog.arc90.com/2009/05/introducing_tbuzz.php">leave a comment on the Arc90 blog</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/8MKlLW3TUKA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/05/12/tbuzz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/05/12/tbuzz/</feedburner:origLink></item>
		<item>
		<title>Readability</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/xuzdc3TXgps/</link>
		<comments>http://lab.arc90.com/2009/03/02/readability/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 00:31:37 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[readability arc90 reading web]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/03/02/readability/</guid>
		<description><![CDATA[<p>Despite the ubiquity of reading on the Web, readers remain a neglected audience. Readability is our popular bookmarklet that removes the junk around what you're reading and displays a clean, readable view.</p>]]></description>
			<content:encoded><![CDATA[<p>Reading anything on the Internet has become a full-on nightmare. As media outlets attempt to eke out as much advertising revenue as possible, we&#8217;re left trying to put blinders on to mask away all the insanity that surrounds the content we&#8217;re trying to read.</p>
<p>It&#8217;s almost like listening to talk radio, except the commercials <em>play during </em>the program in the background. It&#8217;s a pretty awful experience. Our friend to date has been the trusty &#8220;Print View&#8221; button. Click it and all the junk goes away. I click it all the time and rarely print. It&#8217;s really become the &#8220;Peace &amp; Quiet&#8221; button for many.</p>
<p>Recently, <a href="http://www.aworkinglibrary.com/">Mandy Brown</a> wrote a wonderful article for A List Apart called <a href="http://alistapart.com/articles/indefenseofreaders"><em>In Defense Of Readers</em></a><em>. </em>It&#8217;s an attempt to awaken designers responsibility to those who <em>read </em>on the Web:</p>
<blockquote><p>Despite the ubiquity of reading on the web, readers remain a neglected audience. Much of our talk about web design revolves around a sense of movement: users are thought to be finding, searching, skimming, looking. We measure how frequently they click but not how long they stay on the page. We concern ourselves with their travel and participation&#8211;how they move from page to page, who they talk to when they get there&#8211;but forget the needs of those whose purpose is to be still. Readers flourish when they have space&#8211;some distance from the hubbub of the crowds&#8211;and as web designers, there is yet much we can do to help them carve out that space.</p></blockquote>
<p>Mandy is spot on &#8211; and her concerns are even more salient in today&#8217;s cram-all-the-ads-on-one-page Web.</p>
<p>In response to all this madness, we&#8217;d like to introduce <em>Readability:</em></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="450" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3445774&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="600" height="450" src="http://vimeo.com/moogaloop.swf?clip_id=3445774&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/3445774">Readability : An Arc90 Lab Experiment</a> from <a href="http://vimeo.com/arc90">Arc90</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Readability is a browser bookmarklet (sort of like a bookmark on steroids). You can install Readability by visiting the Readability setup page:</p>
<p><a title="http://lab.arc90.com/experiments/readability/" href="http://lab.arc90.com/experiments/readability/"><strong>http://lab.arc90.com/experiments/readability/</strong></a></p>
<p>Readability works with most major modern browsers and has been tested on many news sites and blogs. It isn&#8217;t 100% effective but works surprisingly well.</p>
<p>Our latest experiment was partly inspired by <a href="http://www.marco.org/">Marco Arment&#8217;s</a> awesome <a href="http://www.instapaper.com">Instapaper</a> application (and equally awesome Instapaper iPhone app). We hope you enjoy this little tool. If you find any issues, feel free to <a href="http://blog.arc90.com/2009/03/shhh_im_trying_to_read.php">comment on our blog</a>.</p>
<p>If you&#8217;d like to keep track of Readability and other experiments that may escape out of our lab, be sure to subscribe to our RSS feeds for the <a href="http://feeds.feedburner.com/arc90lab">lab</a> and <a href="http://feeds.feedburner.com/arc90blog">blog</a> or <a href="http://twitter.com/arc90">follow us on Twitter</a> for announcements.</p>
<p>The Readability code (including setup pages and supporting assets) is <a href="http://code.google.com/p/arc90labs-readability/">available on Google Code</a>.</p>
<p><strong>Readability is licensed under the </strong><a href="http://www.apache.org/licenses/LICENSE-2.0"><strong>Apache License, Version 2.0</strong></a><strong>.</strong></p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/xuzdc3TXgps" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/03/02/readability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/03/02/readability/</feedburner:origLink></item>
		<item>
		<title>ActionScript XML Binding</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/mPeywAFHx50/</link>
		<comments>http://lab.arc90.com/2009/02/12/actionscript-xml-binding/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 22:22:02 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/02/12/actionscript-xml-binding/</guid>
		<description><![CDATA[<p>&#8230; converting to and from XML is an often laborious, and certainly tedious, task.</p>]]></description>
			<content:encoded><![CDATA[<p>Working with XML in ActionScript has been made pretty simple by E4X. But many developers prefer to work with ActionScript objects rather than straight XML. Unfortunately, converting to and from XML is an often laborious, and certainly tedious, task. Java developers may be familiar with Java Architecture for XML Binding (<a href="https://jaxb.dev.java.net/">JAXB</a>) and will quickly note that it was the inspiration for ActionScript XML Biinding (ASXB). </p>
<p>ASXB is a concrete implementation of XML binding that used custom metadata as the means of annotation. This is the 0.1 release of ASXB and so it&#8217;s fairly rough around the edges and is intended to test the waters, so to speak, of the ActionScript developer community. If the ASXB project seems like it might be of use in your development, please comment on it over in <a href="http://blog.arc90.com/2009/02/actionscript_xml_binding.php">the arc90 blog</a>.</p>
<hr />
<ul>
<li><a href="#what">What is this?</a>
<li><a href="#how">How do I use it?</a>
<li><a href="#documentation">Documentation</a>
<li><a href="#licensing">Licensing</a>
<li><a href="#blog">Discuss <em>ActionScript XML Binding</em></a> </li>
</ul>
<h4 id="what">What is this?</h4>
<p>The ActionScript XML Binding (ASXB) project is intended to make the marshalling/unmarshalling of XML/ActionScript objects a much easier task. It&#8217;s a small library that allows a developer to use custom metadata to annotate his/her ActionScript objects for seamless marshalling and unmarshalling.</p>
</p>
<h4 id="how">How Do I Use It?</h4>
<p>To use <i>ASXB</i> in your Flex project, just follow these simple steps:</p>
<h5 id="one">Download The Code</h5>
<div class="howtouse">
<p>Click on the icon below to download the source code:</p>
<p><a href="http://www.arc90.com/_assets/asxb/asxb-0.1-with-dependencies.zip"><img alt="Download" src="http://arc90.com/_img/download.gif"></a>
<p>The file contains everything required to build the ASXB project, as well as a compiled release of the ASXB.swc.</p>
</div>
<h5 id="two">Add the code to your Flex or AIR project</h5>
<div class="howtouse">
<p>You can either add the compiled library, ASXB.swc, to your project&#8217;s library path, or include the source directly in your project. </p>
</div>
<h5 id="three">Add compiler settings</h5>
<div class="howtouse">
<p>Copy flex-config-template.xml to your project and change the name to flex-config.xml. Add the following compiler setting: -load-config+=&lt;path-to-config&gt;/flex-config.xml</p>
</div>
<h5 id="four">Annotate your ActionScript objects</h5>
<div class="howtouse">
<p>Below is a <i>very</i> basic example of an annotated object.</p>
<p>
<pre name="code" class="java">	[XmlRootElement(name="book")] 	public class Book 	{ 		[XmlAttribute(name="authorFullName")] 		public var author:String; 		 		[XmlAttribute] 		public var dateOfPublication:Date; 		 		[XmlAttribute(name="pageCount")]  		public var pages:int; 		 		[XmlElement] 		public var title:String; 		 		... 	} </pre>
</p>
<p>The above object maps to the following XML snippet. When the name of an annotated member is the same as the corresponding XML element or attribute, no name key/value pair is required.</p>
<p>
<pre name="code" class="xml" rows="5" cols="60">	&lt;book authorFullName="Alastair Reynolds" dateOfPublication="2003-5-27" pageCount="704"&gt; 		&lt;title&gt;Chasm City&lt;/title&gt; 	&lt;/book&gt; </pre>
</p>
</div>
<h5 id="five">Create an instance of <i>XMLService</i> using either MXML or ActionScript.</h5>
<div class="howtouse">
<p>MXML:</p>
<p>
<pre name="code" class="java" rows="5" cols="60">	&lt;arc90:XMLService id="service" url="http://example.url/service/" fault="faultHandler(event)" result="resultHandler(event)"/&gt;   </pre>
</p>
<p>ActionScript:</p>
<p>
<pre name="code" class="java" rows="5" cols="60">	import org.orpheus.xml.bind.XMLService; 	 	var service:XMLService = new XMLService(); 	service.url = "http://example.url/service/" 	service.addEventListener(FaultEvent.FAULT, faultHandler); 	service.addEventListener(ResultEvent.RESULT, resultHandler);   </pre>
</p>
</div>
<h5 id="six"><i>XMLService</i> functions <i>exactly</i> like mx.rpc.http.HTTPService</h5>
<div class="howtouse">
<p>To send data to a service just call send, passing an ActionScript object as the parameter, or by setting the request property.</p>
<p>
<pre name="code" class="java" rows="5" cols="60">	var book:Book = new Book(); 	book.author = "Alastair Reynolds"; 	book.title = "Chasm City"; 	 	service.send(book); 	 	// or 	 	service.request = book; 	service.send(); </pre>
</p>
<p>Any data returned as a result of a service call will be automatically unmarshalled into the appropriate data type. It is accessible via the result property of the ResultEvent object.</p>
<p>
<pre name="code" class="java" rows="5" cols="60">	private function resultHandler(event:ResultEvent):void 	{ 		var book:Book = event.result as Book; 		 		trace("You have retrieved " + book.title + " by " + book.author + "."); 		// OUTPUT: You have retrieved Chasm City by Alastair Reynolds.	 	} </pre>
</p>
</div>
<h4 id="documentation">Documentation</h4>
<p>Review the complete <a href="http://www.arc90.com/_assets/asxb/docs/index.html">documentation</a> for a full list of all properties, methods, and annotations of the <i>ActionScript XML Binding</i> project.</p>
<h4 id="licensing">Licensing</h4>
<p>This arc90 tool is licensed under the <a href="http://www.opensource.org/licenses/bsd-license.php">BSD license</a></p>
<h4 id="blog">Discuss <i>ActionScript XML Binding</i></h4>
<p>You can offer feedback on <i>ActionScript XML Binding</i> at the <a href="http://blog.arc90.com/2009/02/actionscript_xml_binding.php">arc90 blog</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/mPeywAFHx50" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/02/12/actionscript-xml-binding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/02/12/actionscript-xml-binding/</feedburner:origLink></item>
		<item>
		<title>Best Buy Remix API client (PHP)</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/TBsYv_QhtqY/</link>
		<comments>http://lab.arc90.com/2009/02/06/best-buy-remix-api-client-php/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 15:29:18 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/02/06/best-buy-remix-api-client-php/</guid>
		<description><![CDATA[<p>BestBuy Remix API Client is a PHP library for placing HTTP calls to the <a href="http://remix.bestbuy.com/">Best Buy Remix</a> API.</p>]]></description>
			<content:encoded><![CDATA[<p>Best Buy has opened up its retail catalog in hopes that innovative developers will help to expand the company&#8217;s online presence. <a href="http://remix.bestbuy.com/" target="_blank">Best Buy Remix</a> (currently in Beta) exposes information about Best Buy products and stores.</p>
<p>Interested? <a href="http://remix.bestbuy.com/apps/register" target="_blank">Apply for an API key</a>, download the PHP client library and get started!</p>
<hr />
<ul>
<li><a href="#what">What is this?</a></li>
<li><a href="#how">How do I use it?</a></li>
<li><a href="#documentation">Documentation</a></li>
<li><a href="#licensing">Licensing</a></li>
<li><a href="#blog">Discuss <em>Best Buy Remix API Client</em></a></li>
</ul>
<h4 id="what">What is this?</h4>
<p>BestBuy_Service_Remix is a PHP library for placing HTTP calls to the <a href="http://remix.bestbuy.com/">Best Buy Remix</a> API.</p>
<h4 id="how">How Do I Use It?</h4>
<p>To use <em>BestBuy_Service_Remix</em> in your PHP project, just follow these simple steps:</p>
<h5 id="one">Download The Code From Google Code</h5>
<div class="howtouse">
<p>Click on the icon below to go get the source from Google Code:</p>
<p><a href="http://code.google.com/p/bestbuy-service-remix/"><br />
<img alt="Download" src="http://arc90.com/_img/download.gif" /><br />
</a></p>
<p>The most recent download will contain source code, usage instructions, and <a href="http://www.phpdoc.org/">documentation</a>.</p>
</div>
<h5 id="two">Add the code to your PHP project </h5>
<div class="howtouse">
<p>You&#8217;ll need to add the contents of the &#8216;lib&#8217; folder to <a href="http://www.php.net/set_include_path">your include path</a>.</p>
</div>
<h5 id="three">Create a <em>BestBuy_Service_Remix</em> API client with a valid API key</h5>
<div class="howtouse">
<p><pre name="code" class="php">
&lt;?php
require_once('BestBuy/Service/Remix.php');
$remix = new BestBuy_Service_Remix('YourApiKey');
</pre>
</p>
</div>
<h5 id="four"><em>BestBuy_Service_Remix</em> returns a response object containing API response data <strong>and</strong> <a href="http://www.php.net/manual/en/function.curl-getinfo.php">HTTP metadata</a> recorded by cURL</h5>
<div class="howtouse">
<p>Data may be requested in either XML (default) or JSON format.</p>
<p><pre name="code" class="php">
&lt;?php
require_once('BestBuy/Service/Remix.php');
$remix = new BestBuy_Service_Remix('YourApiKey');
// Retrieve a list of Movies containing the text "Bat"
$result = $remix-&gt;products(array('name=bat*','type=Movie'))-&gt;query();
if(!$result-&gt;isError())
{
echo $result;
}
else if(403 != $result-&gt;http_code)
{
// API errors result in an error document with detailed info
echo $result-&gt;toSimpleXml()-&gt;message;
}
else
{
// 403 errors do not contain a full document, only an h1 message
echo $result-&gt;toSimpleXml()-&gt;h1;
}
</pre>
</p>
</div>
<h4 id="documentation">Documentation</h4>
<p>Complete documentation is included with each download in the &#8216;docs&#8217; folder.</p>
<h4 id="licensing">Licensing</h4>
<p>This library is licensed under a <a href="http://www.opensource.org/licenses/bsd-license.php">BSD</a> license.</p>
<h4 id="blog">Discuss</h4>
<p>Share your thoughts, or just let us know what you&#8217;re up to over at <a href="http://blog.arc90.com/2009/02/best_buy_remix_big_retail_open.php">the Arc90 blog</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/TBsYv_QhtqY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/02/06/best-buy-remix-api-client-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/02/06/best-buy-remix-api-client-php/</feedburner:origLink></item>
		<item>
		<title>SqlWatcher: Ad-hoc database change monitoring</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/V6GlDspg5X8/</link>
		<comments>http://lab.arc90.com/2009/02/05/sqlwatcher-ad-hoc-database-change-monitoring/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 14:48:14 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/02/05/sqlwatcher-ad-hoc-database-change-monitoring/</guid>
		<description><![CDATA[<p>How many times have you needed to debug an application and wished, just wished, you had put better &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>How many times have you needed to debug an application and wished, just wished, you had put better instrumentation in your code? It would have been brilliant if you had logged the key database fields before and after the update. It would have been killer if you had recognized exactly which rows and columns were in play and had a way of confirming that your stored proc is doing what you thought it would.</p>
<p>But you didn&#8217;t.</p>
<p><span id="more-47"></span></p>
<p>Your app has no logging at all, and you have no ability to see what&#8217;s happening in real-time other than firing up ol&#8217; SQL Server Management Studio and attempting to run queries before and after every action in your app. Now there is a better way.</p>
<ul class="contents">
<li><a href="#what">What is this?</a>
</li>
<li><a href="#how">How do I use it?</a>
</li>
<li><a href="#documentation">Documentation</a>
</li>
<li><a href="#download">Download the code</a>
</li>
<li><a href="#licensing">Licensing</a>
</li>
<li><a href="#discuss">Discuss</a> </li>
</ul>
<h4 id="what">What is this?</h4>
<p>SqlWatcher lets you use your web browser to query a SQL Server 2005/2008 database. Big deal so far. But after returning your results to you, SqlWatcher watches the database and notifies you instantly when your query results change, re-running your query and appending the latest results to your web browser as needed.</p>
<p><b>SqlWatcher does not poll for changes</b>, nor does it leave a database connection open, both of which could hammer your database performance. It uses the power of SQL Server&#8217;s <a href="http://msdn.microsoft.com/en-us/library/ms130764.aspx" target="_blank">Query Notifications</a> to let the database engine itself track data changes that would impact your query results. Whether data was added, deleted, or modified, if it touches data that was in your results, or adds new data to it, Query Notifications sees it and pushes a notification out to a <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldependency.aspx" target="_blank">SqlDependency</a> object in SqlWatcher. When SqlWatcher receives a notification, it re-runs your query and appends the latest results to your web browser, allowing you to see your query&#8217;s results before and after every database change.</p>
<p>Query Notifications relies on SQL Server&#8217;s <a href="http://msdn.microsoft.com/en-us/library/ms345108.aspx" target="_blank">Service Broker</a> for reliable asynchronous delivery of these notifications to clients such as SqlWatcher. As a result, Service Broker must be enabled on the database you are trying to watch. If it&#8217;s not, SqlWatcher will attempt to run </p>
<pre>ALTER DATABASE yourdatabase SET ENABLE_BROKER</pre>
<p> beforehand, and
<pre>ALTER DATABASE yourdatabase SET DISABLE_BROKER</pre>
<p> afterwards, but you will need to provide administrator-level credentials in the connection string for this to work.</p>
<h4 id="how">How do I use it?</h4>
<ol>
<li><a href="#download">Download</a> SqlWatcher</li>
<li>Unzip the /distribution folder to a new folder named /SqlWatcher on your web server and create a new application in IIS MMC</li>
<li>Point your browser to http://(your server)/SqlWatcher</li>
<li>Enter the server, database, login, and password to connect to your database</li>
<li>Enter a SELECT query, or a stored procedure call that performs a SELECT. See <a href="http://msdn.microsoft.com/en-us/library/aewzkxxh.aspx" target="_blank">Special Considerations Using Query Notifications (ADO.NET)</a> for the fine print, but wildcards are forbidden and table names must use two-part names. In other words,
<pre>SELECT * FROM customers WHERE last_name LIKE 'Pot%'</pre>
<p> will fail, but
<pre>SELECT id, first_name, last_name FROM dbo.customers WHERE last_name LIKE 'Pot%'</pre>
<p> will work.</li>
<li>Enter the number of updates you wish to see, or 0 for unlimited. Your browser will automatically append each database update as it occurs until Max Notifications is received or you hit ESC in your browser, at which point SqlWatcher will automatically clean up.</li>
<li>Run your application. As you make changes, SqlWatcher will add more data snapshots to your browser. For clarity my example client code is extremely bare-bones, so feel free to fancy it up with some AJAX.</li>
</ol>
<h4 id="documentation">Documentation</h4>
<p>Source code is fully documented. <a href="http://www.codeproject.com/KB/database/chatter.aspx" target="_blank">CodeProject: Using SqlDependency for data change events</a> provides an excellent introduction to, and concrete examples of, working with the SqlDependency class, and was instrumental in getting SqlWatcher operational. SqlWatcher was written in C# in Visual Studio 2008 and requires ASP.NET 2.0. It has no database of its own but can watch any SQL Server 2005/2008 database with Service Broker enabled, or can enable it automatically with an admin-level connection string.</p>
<h4 id="download">Download the code</h4>
<p>Click on the icon to go to the download directory then select the latest version:<br />
<a href="http://code.google.com/p/sqlwatcher/downloads/list"><img alt="Download" src="http://arc90.com/_img/download.gif" /></a></p>
<h4 id="licensing">Licensing</h4>
<p>This arc90 tool is licensed under the <a href="http://www.opensource.org/licenses/bsd-license.php" target="_blank">BSD license</a>.</p>
<h4 id="discuss">Discuss</h4>
<p>Feel free to offer feedback on the <a href="http://blog.arc90.com/2009/02/sqlwatcher_adhoc_database_chan.php">blog</a>, or feature requests/bugs on <a href="http://code.google.com/p/sqlwatcher/issues/list" target="_blank">Google Code</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/V6GlDspg5X8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/02/05/sqlwatcher-ad-hoc-database-change-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/02/05/sqlwatcher-ad-hoc-database-change-monitoring/</feedburner:origLink></item>
		<item>
		<title>Yeller</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/86Np2NxGHJc/</link>
		<comments>http://lab.arc90.com/2009/01/26/yeller/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 21:28:59 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/01/26/yeller/</guid>
		<description><![CDATA[<p>Yeller is a PHP script that lets a group post messages to a single Twitter account using Yammer.</p>]]></description>
			<content:encoded><![CDATA[<p>Yeller is a PHP script that lets a group post messages to a single Twitter account using Yammer. It does this by searching Yammer messages for a special tag (by default #yell) and sending any messages it finds to Twitter. It also pulls replies back from Twitter so the group can participate in conversations.</p>
<p><span id="more-46"></span></p>
<h3>Features</h3>
<ul>
<li>Easy command line interface for setup.</li>
<li>&quot;Signs&quot; messages by the person who sent them.</li>
<li>Individual Twitter @ usernames can be displayed in signatures.</li>
<li>Public tag and signature format can be customized.</li>
</ul>
<p>
Yeller uses Arc90&#8217;s PHP <a href="http://lab.arc90.com/2008/06/php_twitter_api_client.php">Twitter</a> and <a href="http://lab.arc90.com/2008/09/yammer_api_client_library.php">Yammer</a> API Libraries by Matt Williams.
</p>
<p><!--- Extended --></p>
<ul class="contents">
<li><a href="#what">What is this?</a>
<li><a href="#how">How do I use it?</a>
<li><a href="#download">Download the code</a>
<li><a href="#licensing">Licensing</a>
<li><a href="#blog">Discuss</a> </li>
</ul>
<h4 id="what">What is this?</h4>
<p>It&#8217;s a PHP script. PHP 5 or greater is required. It has only been tested on Mac and Linux.</p>
<h4 id="how">How do I use it?</h4>
<h5 id="one">Download and extract the latest version.</h5>
<h5 id="two">Request Yammer OAuth credentials here (you will need the app key and secret during setup): <a href="https://www.yammer.com/client_applications/new">https://www.yammer.com/client_applications/new</a></h5>
<h5 id="three">On the command line switch to the Yeller directory and run &#8216;php Yeller.php setup&#8217;. This will ask you for the necessary information, such as your Twitter username and password and your Yammer OAuth credentials.</h5>
<h5 id="four">Initialize the script by running <em>php Yeller.php run</em>.</h5>
<h5 id="five">Use <em>crontab -e</em> to edit your cron file. Add this line to run the script every 5 minutes: <em>*/5 * * * * cd [YELLER_DIR];  php Yeller.php run</em>. Replace [YELLER_DIRECTORY] with the full path to your Yeller directory.</h5>
<h4 id="download">Download the code</h4>
<p><p>Click on the icon to go to the download directory then select the latest version:</p>
<p><a href="http://code.google.com/p/yeller/downloads/list"><img alt="Download" src="http://arc90.com/_img/download.gif" /></a>
</p>
<h4 id="licensing">Licensing</h4>
<p>This arc90 tool is licensed under the <a href="http://www.opensource.org/licenses/bsd-license.php/">BSD</a> license. </p>
<h4 id="blog">Discuss</h4>
<p>To provide feedback or report bugs please use the <a href="http://code.google.com/p/yeller/issues/list">issue tracker</a> on Google Code.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/86Np2NxGHJc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/01/26/yeller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/01/26/yeller/</feedburner:origLink></item>
		<item>
		<title>JSON CSS: A More Powerful CSS Proof of Concept</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/CiMpoRPzHWI/</link>
		<comments>http://lab.arc90.com/2009/01/09/json-css-a-more-powerful-css-proof-of-concept/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 19:29:56 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Experiments]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/2009/01/09/json-css-a-more-powerful-css-proof-of-concept/</guid>
		<description><![CDATA[<p>JSON CSS is a proof of concept meant to demonstrate what could be accomplished with a more powerful syntax within CSS.</p>]]></description>
			<content:encoded><![CDATA[<p>JSON CSS is a proof of concept meant to demonstrate what could be accomplished with a more powerful syntax within CSS. The current implementation uses the power of <a href="http://www.jquery.com/">jQuery</a> and its plugin architecture to do the heavy lifting. The implementation is not really important though &#8211; the <em>featureset</em> is what matters.</p>
<p>In short, CSS is great at the basics, but there is a lot of opportunity for improvement by adding a few simple programmatic concepts like variables, inheritance, syntactical cascading, and browser detection. We&#8217;re demonstrating that.</p>
<p>To be fair, this is a topic that is <a href="http://www.w3.org/People/Bos/CSS-variables">hotly contested</a>, but a seeing the benefits in action may be useful.</p>
<hr />
<ul>
<li><a href="#what">What is this?</a></li>
<li><a href="#looklike">What does it look like?</a></li>
<li><a href="#why">Why?</a></li>
<li><a href="#demo">Demos</a></li>
<li><a href="#how">How do I use it?</a></li>
<li><a href="#download">Download</a></li>
<li><a href="#documentation">Documentation</a></li>
<li><a href="#licensing">Licensing</a></li>
<li><a href="#blog">Discuss <em>JSON CSS</em></a></li>
</ul>
<h4 id="what">What is this?</h4>
<p>JSON CSS is a proof of concept meant to demonstrate what could be accomplished with a more powerful syntax within CSS.</p>
<h4 id="looklike">What does it look like?</h4>
<p>A simple JSON CSS stylesheet might look like this:</p>
<pre name="code" class="javascript">
{
    "@variables": {
        "demoBgColor": "#FBFAF4"
    },
    "#demoContainer": {
        "background-color": "@{demoBgColor}",
        "border": "1px dotted #CCC",
        "padding": "0.5em",
        "width": "40em",
        "@browser[msie-6]": {
            "width": "400px"
        },
        "h3.header": {
            "text-decoration": "underline"
        },
        "div:first": {
            "font-weight": "bold"
        }
    }
}</pre>
<h4 id="why">Why?</h4>
<p>Because there&#8217;s a lot of potential power that could be harnessed within CSS! Some examples of the benefits that we display with JSON CSS:</p>
<ul>
<li><strong>Crazy awesome selectors</strong> &#8211; &#8220;a[href^=http]&#8221; for absolute links! Sweet!</li>
<li><strong>Variables support</strong> &#8211; You&#8217;ll never have to look up that weird hex color code for cornflower blue again.</li>
<li><strong>In-style browser detection</strong> &#8211; Just put your IE6 browser-specific styles under an &#8220;@browser[msie-6]&#8221; rule and you&#8217;re set.</li>
<li><strong>Syntactical cascading</strong> &#8211; No need to write &#8220;#content .header a&#8221;, just put &#8220;a&#8221; underneath the &#8220;.header&#8221; class rules.</li>
<li><strong>Inheritance</strong> &#8211; @inherit any previously defined selector into another class. Useful for semantic classnames with underlying un-semantic ones (like from a CSS framework).</li>
</ul>
<h4 id="demo">Demos</h4>
<ul>
<li><a href="http://www.arc90.com/_assets/jsoncss/demo/variables/">CSS Variables</a></li>
<li><a href="http://www.arc90.com/_assets/jsoncss/demo/selectors/">Powerful Selectors</a></li>
<li><a href="http://www.arc90.com/_assets/jsoncss/demo/inheritance/">Inheritance</a></li>
<li><a href="http://www.arc90.com/_assets/jsoncss/demo/browserdetection/">Browser Detection</a></li>
<li><a href="http://www.arc90.com/_assets/jsoncss/demo/cascading/">Syntactical Cascading</a></li>
</ul>
<h4 id="how">How Do I Use It?</h4>
<h5 id="one">Download the jQuery plugin.</h5>
<p>JSON CSS is available for download at <a href="http://jsoncss.googlecode.com">Google Code</a>.</p>
<h5 id="two">Include it and jQuery within your HTML&#8217;s &lt;head&gt; element.</h5>
<h5 id="three">Create a sample JSON stylesheet file.</h5>
<p>You&#8217;ll need a simple JSON CSS file to begin with. Something like this will get you started:</p>
<pre name="code" class="javascript">
{
    "@variables": {
        "demoBgColor": "#FBFAF4"
    },
    "#demoContainer": {
        "background-color": "@{demoBgColor}",
        "border": "1px dotted #CCC",
        "padding": "0.5em",
        "h3.header": {
            "text-decoration": "underline"
        }
    }
}
</pre>
<p>This JSON would result in style that looks something like this:</p>
<div id="demoContainer" style="border: 1px dotted rgb(204, 204, 204); padding: 0.5em; background-color: rgb(251, 250, 244);">
<h3 class="header" style="text-decoration: underline;">
<p>		This is the header for the demonstration container.<br />
	</h3>
<p>
		This is text within the demonstration container.
	</p>
<p>
		Take special note of the @variables definition as well as the actual cascading of the header class.
	</p>
</div>
<p><a href="http://jsoncss.googlecode.com">Full documentation will be available on the google code wiki.</a></p>
<h5 id="four">Include your JSON stylesheet into your HTML page.</h5>
<p>Your &lt;head&gt; element should include something like the following:</p>
<pre name="code" class="html">
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.jsoncss.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
//&lt;![CDATA[
	$(function() {
		$.jscss(&#x27;style.json&#x27;);
	});
//]]&gt;
&lt;/script&gt;
</pre>
<h4 id="download">Download</h4>
<p><p>Click on the icon to go to the download directory then select the latest version:</p>
<p><a href="http://code.google.com/p/jsoncss/downloads/list"><img alt="Download" src="http://arc90.com/_img/download.gif" /></a>
</p>
<h4 id="documentation">Documentation</h4>
<p><a href="http://jsoncss.googlecode.com">Full documentation will be available on the wiki at Google Code</a></p>
<h4 id="licensing">Licensing</h4>
<p>This arc90 tool is licensed under a <a href="http://www.opensource.org/licenses/bsd-license.php">BSD</a> license.</p>
<h4 id="discuss">Discuss</h4>
<p>Feel free to offer feedback <a href="http://blog.arc90.com/2009/02/json_css_a_more_powerful_css_p.php">on the blog</a>, or feature requests/bugs on <a href="http://jsoncss.googlecode.com">google code</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/CiMpoRPzHWI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2009/01/09/json-css-a-more-powerful-css-proof-of-concept/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2009/01/09/json-css-a-more-powerful-css-proof-of-concept/</feedburner:origLink></item>
		<item>
		<title>Adding a Drop Shadow to an Element, then Centering It</title>
		<link>http://feedproxy.google.com/~r/Arc90Lab/~3/BxU4R3jrZaQ/</link>
		<comments>http://lab.arc90.com/2008/10/07/adding-a-drop-shadow-to-an-element-then-centering-it/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 18:28:23 +0000</pubDate>
		<dc:creator>Arc90</dc:creator>
				<category><![CDATA[Experiments]]></category>

		<guid isPermaLink="false">http://lab.daniell.acr90-dev-02/?p=44</guid>
		<description><![CDATA[<p>Most drop shadow techniques require floating the element, which undermines the item being centered.</p>]]></description>
			<content:encoded><![CDATA[<p>For a project I&#8217;m working on, I decided to add a drop shadow to centered link and button elements. Most drop shadow techniques require floating the element, which undermines the item being centered. Here&#8217;s how to add a drop shadow (which requires floating) and then center it.</p>
<hr />
<ul>
<li><a href="#what">What is this?</a></li>
<li><a href="#how">How do I use it?</a></li>
<li><a href="#licensing">Licensing</a></li>
<li><a href="#blog">Discuss &quot;Centered inline elements with a drop shadow&quot;</a></li>
</ul>
<h4 id="what">What is this?</h4>
<p>This is a tutorial on how to add a CSS-only drop shadow  to an element (which requires floating) and then center it.  </p>
<h4 id="how">How Do I Use It?</h4>
<p>First, let&#8217;s add a drop shadow to a link or button. </p>
<p>Here&#8217;s our basic HTML code. To make this work, the only unconventional (and arguably non-semantic) code we need to add is a wrapping span around our element. If you require the cleanest code, you could add this with Javascript. </p>
<p><pre  name="code" class="java">
&lt;p class=&quot;center&quot;&gt;
&lt;span&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;link&lt;/a&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=&quot;center&quot;&gt;
&lt;span&gt;
&lt;input type=&quot;button&quot; value=&quot;button&quot; /&gt;
&lt;/span&gt;
&lt;/p&gt;
</pre>
</p>
<p>To add a drop shadow, the CSS will look like this: </p>
<p><pre name="code" class="java">
span {
float: left;
background-color: #CCC;
}
p.buttons input,
p.buttons a {
position: relative;
display: block;
top: -5px;
left: -5px;
}
p.buttons a {
background: #FFF;
border: 1px solid;
padding: 5px;
}
</pre>
</p>
<p>The span tag is our shadow. We float it so it becomes a block level element, and we give it a gray background. Next we make the button or link a block level element. The real trick is adding &quot;position: relative&quot; to the button or link which allows us to offset them. The last code here is just to add some style to the link so it stands out from the drop shadow. </p>
<p>Test this code and you should see something like this (slight variations depending on your browser): </p>
<p style="clear: both;height: 2em;margin-bottom: 2em">
<span style="float: left;background-color: #CCC"><br />
<a href="#">Home</a><br />
</span>
</p>
<p style="clear: both;height: 2em;margin-bottom: 2em">
<span style="float: left;background-color: #CCC"></p>
<p></span>
</p>
<p>Okay, now we want them centered. Because our items are floated, &quot;text-align: center&quot; and &quot;margin: 0 auto&quot; won&#8217;t work. Or will it?</p>
<p>The solution is a combination of things, and of course a hack for IE. What can you do? Here we go: </p>
<p><pre name="code" class="java">
p.center {
clear: both;
margin: 10px auto;
display: table;
}
*+html p.center {width: 1px;}
* html p.center {width: 1px;}
</pre>
</p>
<p>The first line adds &quot;display: table&quot; to the containing paragraph. This will make Firefox, Safari and all the other browsers we love center the contents, when combined with &quot;margin: 0 auto;&quot; &#8211;our usual way of centering block elements in CSS. </p>
<p>The second part of the code is a hack for IE7 and IE6. As IE does not recognize &quot;display: table&quot;, the trick is to give the paragraph a width of 1px. IE will center the paragraph, and subsequently the contents. It works! Note: these hacks have to be on separate lines. </p>
<h5 id="two">Here&#8217;s all the code together in a page. </h5>
<p><pre  name="code" class="java">
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Centered drop shadow example&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
/* Code for centering the containg paragraphs */
p.center {
clear: both;
display: table;
margin: 10px auto;
}
/* IE hacks for centering the containing paragraphs - must be on separate lines / *
+html p.center {width: 1px;}
* html p.center {width: 1px;}
/* Turn the spans in shadows */
p.center span {
background-color: #CCC;
float: left;
}
/* offset the element to have the shadow */
p.center input,
p.center a {
display: block;
left: -5px;
position: relative;
top: -5px;
}
/* some simple styling to make the link stand out */
p.center a {
background: #FFF;
border: 1px solid;
padding: 5px;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p class=&quot;center&quot;&gt;
&lt;span&gt;
&lt;a href=&quot;#&quot; class=&quot;button&quot;&gt;Home&lt;/a&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=&quot;center&quot;&gt;
&lt;span&gt;
&lt;input type=&quot;submit&quot; value=&quot;Home&quot; /&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
</p>
<p>Tested on the Mac and PC in Firefox, IE 6 and 7, Opera, Safari, Chrome and Camino. </p>
<h4 id="licensing">Licensing</h4>
<p>This arc90 experiment is licensed under a <a href="http://www.opensource.org/licenses/bsd-license.php">BSD</a> license.</p>
<h4 id="blog">Discuss</h4>
<p>Feel free to offer feedback <a href="http://blog.arc90.com/2008/09/rise_of_the_twitter_clones.php">over on the blog</a>.</p>
<img src="http://feeds.feedburner.com/~r/Arc90Lab/~4/BxU4R3jrZaQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://lab.arc90.com/2008/10/07/adding-a-drop-shadow-to-an-element-then-centering-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://lab.arc90.com/2008/10/07/adding-a-drop-shadow-to-an-element-then-centering-it/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 0.464 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-02-25 12:34:11 -->
