<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chris Stead &#187; CSS</title>
	<atom:link href="http://www.chrisstead.com/archives/category/coding/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chrisstead.com</link>
	<description>Web, the Universe and everything</description>
	<lastBuildDate>Fri, 23 Mar 2012 18:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Content: It&#8217;s All About Objects</title>
		<link>http://www.chrisstead.com/archives/276</link>
		<comments>http://www.chrisstead.com/archives/276#comments</comments>
		<pubDate>Thu, 25 Mar 2010 21:35:56 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Site Architecture]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://www.chrisstead.com/?p=276</guid>
		<description><![CDATA[When I wrote my first post about object-oriented content, I was thinking in a rather small scope. I said to myself, &#8220;I need content I can place where I need it, but I can edit once and update everything at the same time.&#8221; The answer seemed painfully clear: I need objects. Something funny happened between [...]]]></description>
			<content:encoded><![CDATA[<p>When I wrote my first post about <a href="http://www.chrisstead.com/archives/112" target="_blank">object-oriented content</a>, I was thinking in a rather small scope.  I said to myself, &#8220;I need content I can place where I need it, but I can edit once and update everything at the same time.&#8221; The answer seemed painfully clear: I need objects.</p>
<p>Something funny happened between then and now.  I realized that content is already made up of objects.  All at once, I discovered I was one with all of the content scattered across the web.  It was a very zen moment I&#8217;m not sure I could recreate on my best day.</p>
<p>See, we are already working with content objects everywhere, but we just haven&#8217;t noticed.  Take Twitter for instance.  Twitter specializes in the content object. It&#8217;s a very small object, but it&#8217;s there all the same.  Take, for instance, a <a href="http://twitter.com/cm_stead/status/11044627560" target="_blank">tweet</a> from my <a href="http://twitter.com/cm_stead" target="_blank">feed</a>.</p>
<p>My one tweet is both content on its own and it is part of my feed which is also content.  The same can be said for blog posts, RSS feeds, Facebook status updates, YouTube videos, that picture of your cat and any other of a number of things scattered across the web.<span id="more-276"></span></p>
<p>The funny thing is, these pieces of content are already broken up for you and made ready for consumption.  So, let&#8217;s head back to your site for a moment.  That footer information you have posted on every page is managed as an object.  This can be further demonstrated by the fact that CSS uses the box model to manage the content on your page.  Those boxes are objects.</p>
<p>This is getting a little esoteric.  Let&#8217;s bring things back around for a moment, shall we?</p>
<p>Content is more than just the sum of its parts, i.e. words, images and video.  Content is something so real it can almost be touched.  It&#8217;s a building block.  Without content, the web would be nothing and the only reason the web is something WITH content is because content is something.</p>
<p>Still a little weird, right?  When you build a site, you could simply throw content at the screen without containers.  This would result in a rambling page with no breaks, no sense and no way to logically decipher it.  This would be something akin to the center of the sun: lots of elements, really dense and really REALLY hard to live around.</p>
<p>In order to make the content more presentable to the user, we break it up into pieces we can manage and format.  As soon as you have done this, you no longer simply have words and other garbage on a page, you now have divisions, paragraphs and images. Outside the page, those divisions are meaningless.</p>
<p>Says who?</p>
<p>If a paragraph from a book were written, longhand, on a sheet of paper, it doesn&#8217;t lose the quality of being a paragraph, it simply loses its association with the book from whence it came.  This means the content structure is actually meaningful outside of the original context.</p>
<p>This is really useful when you deconstruct and reconstruct a page.  All of a sudden you aren&#8217;t trying to figure out where to put this image and that word.  Instead, you are filling a bucket.  That bucket happens to have a name, and that name is &#8216;page.&#8217;  The best part of this whole exercise is, we have now separated content from the page it lived in.  </p>
<p>Why do this?</p>
<p>Once you&#8217;ve broken the content out of the page, it doesn&#8217;t really matter where the content comes from.  This means you can start drawing smart boxes on your page and simply filling them with the content you want.  Need an RSS feed? I&#8217;ll draw a box for that.  Want a piece of home-grown content? I&#8217;ll draw a box for that too.  After all of the box drawing is done, you can start pulling in pieces from all over the web and putting them right into your site.</p>
<p>Much of this isn&#8217;t new.  We&#8217;ve been dropping content into sites like this for years.  Where this can get really interesting is when you are working on blended content/application sites.  All of a sudden something really magical happens.  Functions aren&#8217;t programs which live off in a separate ecosystem.  The functions become OBJECTS!</p>
<p>When your functions become objects, they stop being scary and just become part of the content flow.  Forms go here, dynamic items go there and the page comes together.  By simply realigning ourselves and looking at content as objects, instead of words, images, feeds, functions and all the other odds and ends available to us in spades, putting a site together becomes something of a spiritual experience.  All of the wonders of the web come together to form a cohesive whole.</p>
<p>For your next project, go crazy.  Imagine you are playing with blocks and throw away your content notions altogether.  Use the APIs available in the wild and build a smarter page.  The magic of the web is the fact that everything exists a mere request away.  Think about objects and build your site.  Make the web a better place.</p>
<p>&copy;2012 <a href="http://www.chrisstead.com">Chris Stead</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.chrisstead.com/archives/276/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Degrading Behavior: Graceful Integration</title>
		<link>http://www.chrisstead.com/archives/226</link>
		<comments>http://www.chrisstead.com/archives/226#comments</comments>
		<pubDate>Fri, 26 Feb 2010 17:00:26 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Site Architecture]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://www.chrisstead.com/?p=226</guid>
		<description><![CDATA[There has been a lot of talk about graceful degradation. In the end it can become a lot of lip service. Often people talk a good talk, but when the site hits the web, let&#8217;s just say it isn&#8217;t too pretty. Engineers and designers work together, or divided as the case may be, to create [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of talk about graceful degradation.  In the end it can become a lot of lip service.  Often people talk a good talk, but when the site hits the web, let&#8217;s just say it isn&#8217;t too pretty.</p>
<p>Engineers and designers work together, or divided as the case may be, to create an experience that users with all of their faculties and a modern browser can enjoy.  While this goes down, the rest of the world is left feeling a bit chilly.</p>
<p>What happens is, the design starts with the best of intentions and, then, the interactivity bug takes hold.  What comes out is something that is almost usable when slightly degraded, but totally non-functional when degraded to the minimum.<span id="more-226"></span></p>
<p>In the end, of course, the user needs must be considered.  Having a graphically intensive site doesn&#8217;t hurt if you are a design firm, but might not be the best option for a company dealing with medical customers.</p>
<p>My suggestion, however, is simple.  Instead of degrading your site as the user needs become greater, start with a site that is usable at the lowest common denominator and work up.</p>
<p>Understand who your audience is and prepare to serve those of them who have the greatest needs.  Build a site that is attractive and works if the user can only view it through a program that reads for them.</p>
<p>Once your site has been built and is fully functional, build up.  Integrate functions to serve the users that have some needs, but aren&#8217;t in the highest-need area on the spectrum.</p>
<p>Continue on this path until you have integrated all of the latest and greatest, bleeding-edge functions that your highest-ability users can interact with.</p>
<p>As you build this way, be sure that you are simply enhancing the function that is already on the screen.  As you add enhancements, you should be able to remove them cleanly and still get the same experience you started with.</p>
<p>I call this approach graceful integration.  Each progressive step, you integrate more functionality and interaction, preserving the layer just below as a separate user interaction.</p>
<p>Each progressive enhancement should be separate and easily disabled.  The granularity of your enhancements can be as large as a two-step approach: all or nothing.  You may also enhance your site in a careful way that allows for several levels of degradation depending on the user and their distinct needs.</p>
<p>A natural separation of user interaction happens when HTML is written, CSS is added and Javascript acts upon the subsequent design.  This three-tier separation, you can use the work that will be done regardless to define your user interaction in a clean way.</p>
<p>One of the best quotes I&#8217;ve heard regarding graceful degradation, in paraphrase, is, &#8220;if you show it with Javascript, hide it with Javascript.&#8221;  I offer this with no source as I can&#8217;t recall where I heard it.  If you know/are the author of this, stand up and reap the rewards.</p>
<p>The attitude in this quote represents the core of graceful integration.  As you pile the Javascript on, be sure you manage its behavior with Javascript.  Don&#8217;t use CSS to manage something that is going to be handled with Javascript.  If you must, prepare a style sheet that defines scripted behavior, but set the object classes with Javascript.</p>
<p>There are other benefits you&#8217;ll gain from this approach.  Not only will your users appreciate the time and care you put into their experience, so will the search engines.</p>
<p>As search spiders crawl your site, they won&#8217;t see any CSS that looks to be doing something sneaky like hiding text from the viewer.  Spiders have gotten smarter and they recognize when something fishy is going on.  As you are already doing something good for your users, you get this bonus for free.</p>
<p>For those of you looking for snippets of code, the best thing you could know and rely on is the &#8220;noscript&#8221; tag.  This is a tag which defines the behavior of the page for users without Javascript.  I use this quote a bit to display extra form controls when Javascript has been disabled or is unavailable to the user.  You can use it like the following:</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
     //your script logic goes here<br />
&lt;/script&gt;<br />
&lt;noscript&gt;<br />
&lt;!&#8211; HTML elements go here like style definitions or form controls. &#8211;><br />
&lt;/noscript&gt;</p>
<p>You can also use noscript by itself scattered throughout the page to display page elements that might, otherwise, be missing for some of your users.</p>
<p>In the end, behavior on your site should be defined by the HTML first, the CSS second and the Javascript third.  Should you choose to go to a finer granularity, don&#8217;t forget to double check your users can still use all of the layers effectively.  Be mindful of your users, integrate function into your site in stages and make the web a better place.</p>
<p>&copy;2012 <a href="http://www.chrisstead.com">Chris Stead</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.chrisstead.com/archives/226/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

