<?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>Cherrysave &#187; readable code</title>
	<atom:link href="http://www.cherrysave.com/tag/readable-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cherrysave.com</link>
	<description>A simple web design blog</description>
	<lastBuildDate>Tue, 22 Jun 2010 23:53:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The Semantic Web: Speaking to Humans With Readable Code</title>
		<link>http://www.cherrysave.com/web-design/semantic-web/</link>
		<comments>http://www.cherrysave.com/web-design/semantic-web/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 03:58:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[readable code]]></category>
		<category><![CDATA[semantic web]]></category>

		<guid isPermaLink="false">http://www.cherrysave.com/?p=280</guid>
		<description><![CDATA[The semantic web consists of teaching computers to understand the meaning of web content. You should learn the advantages of writing on the semantic web when working on web development projects because search engines (and people) strongly rely and prefer code that makes sense intuitively instead of having to read pages of documentation and confusing inline comments.]]></description>
			<content:encoded><![CDATA[<p>The semantic web consists of teaching computers to understand the meaning of web content. You should learn the advantages of writing on the semantic web when working on web development projects because search engines (and people) strongly rely and prefer code that makes sense intuitively instead of having to read pages of documentation and confusing inline comments.</p><p><a href="http://api.tweetmeme.com/share?url=http://www.cherrysave.com/web-design/semantic-web/"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http://www.cherrysave.com/web-design/semantic-web/" height="61" width="51" /></a></p><p><a id="single_image" href="http://cherrysave.com/wp-content/uploads/2010/01/3448804778_6fc1876655_o.png"><img src="http://cherrysave.com/wp-content/uploads/2010/01/3448804778_6fc1876655_o.png" alt="The Semantic Web Rubik Cube" title="The Semantic Web Rubik Cube" width="291" height="300" class="alignleft size-full wp-image-286" style="margin-right: 10px; margin-left: 10px;"/></a></p>
<h3>What is the Semantic Web?</h3>
<p>So what exactly is the semantic web? It turns out that it is difficult to define it simply, yet I&#8217;ll try anyway. The semantic web is best described as structured data. The main goal is to take the structure that the web and some applications have as a whole &mdash; URLs, categories, tags &mdash; and apply them to the data represented by code. That is, the semantic web envisions an interconnected <a href="http://www.w3.org/2001/sw/SW-FAQ#swgoals">web of data</a>.</p>
<p>Many consider the semantic web to be a founding anchor of <a href="http://www.labnol.org/internet/web-3-concepts-explained/8908/">Web 3.0</a>. British engineer Tim Berners-Lee envisions a web with SVG graphics built on a well-organized and self-descriptive (tagged, friended, categorized) Web 2.0. The semantic web promises to organize the world&#8217;s information in a dramatically more logical way.</p>
<h3>Riding the Semantic Web: Organizing Your Code in a More Cohesive Way</h3>
<p>The current HTML schema doesn&#8217;t have much support for the semantic web. In fact, one of the few ways you can tell computer systems about the actual content of your page and not just the display properties is through the <code>meta</code> tags. Using that, you can tell search engines about things like the title and keywords associated with a piece of content, but you can&#8217;t do much more than that.</p>
<p>Yet, there are some things you can do with the semantic web when you code to take advantage of semantic principals. And the best part is that they tend to be quite simple. Here&#8217;s a few examples of some of the things you can do:</p>
<ul>
<li>For headings, use a heading tag (<code>h1, h2, h3, etc...</code>)</li>
<li>For paragraphs, use a paragraph tag (<code>p</code>)</li>
<li>For lists, use a list item tag (<code>li, ol, ul, etc...</code></li>
</ul>
<p>Like I said, these are really simple principals, yet it can make a huge difference in the readability and clarity of code for both web developers, computers, and end-users. For example, look at the difference between the following two snippets of code:</p>
<h4>Non-semantic</h4>
<pre>&lt;span id="heading-1"&gt;&lt;font size="8" color="black"&gt;&lt;strong&gt;Heading 1&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;</pre>
<h4>Semantic</h4>
<pre>&lt;h1&gt;Heading 1&lt;/h1&gt;</pre>
<p>Obviously, the second snippet is much more simple for people and for computers (read: search engines and data miners) to read, and they should (or could) look about the same in a web browser.</p>
<h3>The Advantages of Writing in Semantic Code</h3>
<p>There are at least two advantages in taking advantage of the semantic web. First, computers can how understand the content of your page and make use of that. For example, in the current iteration of HTML, you can tell search engines the title and content of your page with the meta. In the future, Amazon could tell computers, in code form, the type and style of the products on their web page. The books would be classified as such, dramatically improving the categorization and usability of the internet. The second benefit is that it will improve communication between web developers and designers. Engineers will instantly understand what the code is attempting to model much more so than if one was using the common universal tags.</p>
<p>That&#8217;s all well and good, but I&#8217;m sure you&#8217;re looking for a better way to currently take advantage of the semantic web. XFN (XHTML Friends Network) uses data in the <code>rel</code> attribute to describe relationships between people. For instance, I could link to my friend Creed, whom I&#8217;ve met in real life, in the following way:</p>
<pre>&lt;a href="http://www.creedsblog.us.creedsthoughts.office.doc/" rel="met friend"&gt;</pre>
<p>From the <code>rel</code> tag, you can see that I&#8217;ve met Creed, my friend, in real life (when he was stealing things out of my garage). The key to the semantic web, though, is that computers should be able to easily parse the meaning of those friend relationships. You can use a CSS snipet to do that:</p>
<pre>a[rel~="friend"] {font-weight: bold;}</pre>
<p>That will bold all of your friends via the stylesheet on a given page.</p>
<p>Of course, these are merely the beginnings of the semantic web. There will be undoubtedly more ways to classify and organize data on the web. Keep in touch with these updates by <a href="http://www.cherrysave.com/feed/">subscribing to the RSS feed</a> or <a href="http://twitter.com/simplrdesgn">following me on Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cherrysave.com/web-design/semantic-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
