<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/css/rss20.xsl" type="text/xsl"?>
<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:series="http://organizeseries.com/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
	<channel>
		<title>SitePoint</title>
		<link>http://www.sitepoint.com</link>
		<description>Learn CSS | HTML5 | JavaScript | Wordpress | Tutorials-Web Development | Reference | Books and More</description>
		<lastBuildDate>Wed, 19 Jun 2013 09:28:29 +0000</lastBuildDate>
		<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
		<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SitepointFeed"/>
		<feedburner:info uri="sitepointfeed"/>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/"/>
		<item>
			<title>Native JavaScript Equivalents of jQuery Methods: CSS and Animation</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/i_lgcD_QfcE/</link>
			<comments>http://www.sitepoint.com/jquery-vs-raw-javascript-2-css3-animation/#comments</comments>
			<pubDate>Wed, 19 Jun 2013 09:28:29 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[APIs]]></category>
			<category><![CDATA[Browsers]]></category>
			<category><![CDATA[CSS]]></category>
			<category><![CDATA[CSS3]]></category>
			<category><![CDATA[HTML]]></category>
			<category><![CDATA[HTML5]]></category>
			<category><![CDATA[JavaScript]]></category>
			<category><![CDATA[jQuery]]></category>
			<category><![CDATA[Raw Javascript]]></category>
			<category><![CDATA[animation]]></category>
			<category><![CDATA[HTML5 Dev Center]]></category>
			<category><![CDATA[javascript]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66746</guid>
			<description><![CDATA[Is raw JavaScript too cumbersome? Is jQuery always better? In the second part of his series, Craig looks at code to control CSS classes, styles and animation.]]></description>
			<content:encoded><![CDATA[<p></p><p><a
href="/do-you-really-need-jquery/"><em>Do You Really Need jQuery?</em></a> Sometimes &#8212; especially if you want to support IE6/7/8 using jQuery 1.x. However, modern browser APIs now provide much of the functionality we take for granted in jQuery. In this article, we&#8217;re going to look at methods related to CSS.</p><h2>Class Manipulation</h2><p>One of the most common jQuery tasks is applying a class to a specific element:</p><pre><code>$(&quot;#myelement&quot;).addClass(&quot;myclass&quot;);</code></pre><p>We can achieve the same thing in native JavaScript:</p><pre><code>document.getElementById(&quot;myelement&quot;).className = &quot;myclass&quot;;</code></pre><p>This isn&#8217;t quite the whole story:</p><ol><li>jQuery can apply the class to any number of nodes.</li><li>jQuery appends the new class to existing class definitions, but the native example will overwrite them.</li></ol><p>In native JavaScript, the <code>className</code> property is simply a string. We therefore need a function to replicate how jQuery works, e.g.</p><pre><code>function addClass(node, class) {
	if (!node.length) node = [node];
	for (var n = 0, m = node.length; n &lt; m; n++) {
		if ((&quot; &quot; + node[n].className + &quot; &quot;).indexOf(&quot; &quot;+class+&quot; &quot;) &gt;= 0) {
			node.className += &quot; &quot; + class;
		}
	}
}
// apply myclass to all nodes
addClass(document.getElementById(&quot;myelement&quot;), &quot;myclass&quot;);
</code></pre><p>While this code is smaller and faster than jQuery, we&#8217;re replicating what&#8217;s already available in the library &#8212; there&#8217;s little point.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>Fortunately, modern browsers now offer a new classList property which implements a DOMTokenList &#8212; an array-like collection of all classes applied to a node. The following properties are available:</p><ul><li><strong>length</strong> &#8212; the number of class names applied</li><li><strong>item(<em>index</em>)</strong> &#8212; the class name at a specific index</li><li><strong>contains(<em>class</em>)</strong> &#8212; returns true if a node has that class applied</li><li><strong>add(<em>class</em>)</strong> &#8212; applies a new class to the node</li><li><strong>remove(<em>class</em>)</strong> &#8212; removes a class from the node</li><li><strong>toggle(<em>class</em>)</strong> &#8212; removes or adds a class if it&#8217;s applied or not applied respectively</li></ul><p>We can use this in preference to the clunkier className property:</p><pre><code>document.getElementById(&quot;myelement&quot;).classList.add(&quot;myclass&quot;);</code></pre><p>classList is supported by most browsers except IE9. Fortunately, <a
href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills#classlist">a couple of shims are available</a> which could be conditionally loaded in that browser.</p><h2>Style Manipulation</h2><p>jQuery provides a number of methods to apply specific styles, e.g.</p><pre><code>$("#myelement").css({
	color: "#c00",
	backgroundColor: "#eee",
	width: "200px",
	height: "100px",
	borderColor: "#f00"
});</code></pre><p>The native equivalent:</p><pre><code>var m = document.getElementById("myelement"), c = m.style;
c.color = "#c00";
c.backgroundColor = "#eee";
c.width = "200px";
c.height = "100px";
c.borderColor = "#f00";</code></pre><p>Over 10,000 iterations using cached selectors, the jQuery code executed in 6,670ms. Native JavaScript took 330ms &#8212; it was 20x faster.</p><p>Of course, you shouldn&#8217;t use either unless a value needs to be calculated in some way. It&#8217;s more efficient to define a class of styles in CSS then apply its name to the element.</p><h2>Animation</h2><p>jQuery offers various animated effects out of the box including sliding and fading. Native JavaScript can be faster but none of that matters: <em>CSS3 animation trounces both</em>.</p><p>I was initially skeptical about CSS3 animation. It can never offer fine-grained control (such as stopping an animation after N frames) and trespasses on JavaScript&#8217;s behavioral responsibilities. However, the benefits more than outweigh the drawbacks:</p><ol><li>CSS3 animation is handled by the browser; it will always be faster than JavaScript execution.</li><li>CSS3 animation is easier to use and requires significantly less code.</li><li>CSS3 offers effects such as 3D transformations which would be impractical &#8212; if not impossible &#8212; in JavaScript alone.</li></ol><p>IE9 and below won&#8217;t show the effects but they can degrade gracefully and <a
href="/browser-trends-june-2013/">IE10 should be the dominant version within a few months</a>.</p><p>The CSS3 genie will never go back in the lamp. If you&#8217;re still using jQuery or JavaScript for DOM animation in modern browsers, you&#8217;re probably wasting your time.</p><p>That said, JavaScript can be used to react to CSS3 animations when they start, stop or proceed to the next iteration using <code>animationstart</code>, <code>animationend</code> and <code>animationiteration</code> accordingly. For more information, refer to <a
href="/css3-animation-javascript-event-handlers/">How to Capture CSS3 Animation Events in JavaScript</a>.</p><p>In my next article, we&#8217;ll finish the series by looking at events, Ajax and utility functions.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=i_lgcD_QfcE:BAhaRBKEprw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=i_lgcD_QfcE:BAhaRBKEprw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=i_lgcD_QfcE:BAhaRBKEprw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=i_lgcD_QfcE:BAhaRBKEprw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/i_lgcD_QfcE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/jquery-vs-raw-javascript-2-css3-animation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
			<series:name><![CDATA[Native JavaScript Equivalents of jQuery Methods]]></series:name>
			<feedburner:origLink>http://www.sitepoint.com/jquery-vs-raw-javascript-2-css3-animation/</feedburner:origLink>
		</item>
		<item>
			<title>A Long Time Ago, On a Web Server Far, Far Away…</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/DDxgRpFfofo/</link>
			<comments>http://www.sitepoint.com/a-long-time-ago-on-a-web-server-far-far-away/#comments</comments>
			<pubDate>Wed, 19 Jun 2013 05:02:35 +0000</pubDate>
			<dc:creator>Alex Walker</dc:creator>
			<category><![CDATA[Apple]]></category>
			<category><![CDATA[Programming]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66958</guid>
			<description><![CDATA[Star Wars and web technology. Could this be a closer fit than anyone has previously imagined? SitePoint Group Lead Designer Alex Walker has a bit of fun. Join in.]]></description>
			<content:encoded><![CDATA[<p></p><p><img
class="size-full wp-image-66960" style="text-align:right" align="right" alt="The new Mac Pro: High-end server or Sith consumer good?" title="The new Mac Pro: High-end server or Sith consumer good?" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/mac-pro.jpg" width="231" height="213" /></p><p>I thought this might be fun.</p><p>You may be aware that at last week’s <a
href="https://developer.apple.com/wwdc/">WWDC</a>, Apple announced a shiny, new line of remarkable-looking, high-end Mac Pros.</p><p>While they appear to be great hardware, it was the many comparisons drawn between them and Darth Vader that had me chuckling.</p><ul><li><a
href="http://theorange.co/darth-pro-a-mashup-of-lord-vader-apples-mac-pro/">DARTH PRO: A Mashup of Lord Vader &amp; Apple’ Mac Pro</a></li><li><a
href="http://news.cnet.com/8301-11386_3-57588835-76/apples-new-mac-pro-looks-like-darth-vader-yea-or-nay/">Apple&#8217;s new Mac Pro looks like Darth Vader: Yea or nay?</a></li><li><a
href="http://mashable.com/2013/06/10/mac-pro-looks-like/">25 Things the New Mac Pro Looks Like</a></li></ul><p>I saw them variously described as the &#8216;Sith Lord&#8217;s tissue box&#8217;, the &#8216;Dark side&#8217;s coffee cup&#8217; and &#8216;Darth&#8217;s trashcan&#8217;.</p><p>Let&#8217;s face it, with all those glossy black, simple curves and that finely-honed engineering, it doesn’t require a huge leap of imagination to make that connection.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>But I don&#8217;t think the comparisons end even there.</p><p><a
href="http://news.cnet.com/8301-13579_3-57581319-37/apple-releases-revised-plans-for-its-spaceship-headquarters/">Have you seen Apple’s new corporate headquarters</a>? Tell me that’s not a ‘Death Star v0.1. beta.’ Give it a few years and that thing will be snuffing out planets left and right. Apple is an efficient, high-tech, well-funded and kinda ruthless empire.</p><p>Sound familiar?</p><p>As a webgeek and long-time Star Wars fan, it set me to thinking.</p><p><strong>If web languages/technologies were Star Wars characters, who would they be?<br
/> </strong><br
/> So, for my own entertainment (and hopefully yours) here&#8217;s my personal take on the subject, followed by tongue-in-cheek explanations.</p><p><img
class="size-full wp-image-66959" alt="On a Web Server Far, Far Away ..." src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/languages.png" width="615" height="609" align="alignnone" title="On a Web Server Far, Far Away..." /></p><p>1). IOS = Darth Vader: With that <a
href="http://www.nytimes.com/2011/02/01/technology/01apple.html?_r=0">iron-fisted AppStore control</a>, the closed source code philosophy, and the smooth, industrial design lines, it’s hard to go past Apple as &#8216;the Empire&#8217;.</p><p>BTW: For the record, I am an iPhone &amp; MacBook Pro user.</p><p>It&#8217;s interesting to think that five years ago most would have chosen Microsoft here.</p><p>2). JavaScript = Yoda: It is cross-browser and cross-platform. It is both front-end and back. <em>Flows through all, it does. Wise you must be to its ways</em>.</p><p>3). Rails = Han: Rails guys have sometimes had a reputation for being anti-corporate and even <a
href="https://medium.com/dear-blank/65ba4bcbbae2">a little cocky</a>. Some have used the word ‘cowboy’. Indeed their founder and spiritual leader once went to lengths to describe himself as &#8216;<a
href="http://david.heinemeierhansson.com/posts/39-im-an-r-rated-individual">an R-rated individual</a>&#8216;. Feels like a good fit here.</p><p>4). SASS = Leia: <em>&#8220;Will someone get this big walking carpet out of my way?&#8221;</em> C&#8217;mon, THAT&#8217;S pretty sassy!</p><p>5). HAML = Luke: I admit HTML5 probably fits better for this spot, but it&#8217;s very hard to pass over the HAML/Mark Hammil gag. I couldn&#8217;t. Plus, HAML and SASS are sibling languages.</p><p>6). Linux = Ben Obi Wan: Aged, never fashionable, slightly mysterious and arcane, but also wise and quietly powerful. &#8220;Use the Open Source, Luke.&#8221;</p><p>I did consider SQL here too.</p><p>7). Android = C3PO: I don&#8217;t think it needs much explanation. I considered R2-D2 here, but I believe androids are more human-shaped than a bot like R2. It is true that they are both constantly referred to as &#8216;droids&#8217; in the films though.</p><p>8). PHP = Chewbacca: Reliable sidekick or hulking, shambling mess? You be the judge. It&#8217;s not wise to upset a Wookiee.</p><p>9). Java = Jabba: OK, I admit the name similarities was probably enough for me. Java&#8217;s reputation for sluggishness with its enterprise leanings sealed the deal. Nobody wants to be Jabba.</p><p>Of course, these are all entirely my own views and are COMPLETELY subjective.</p><p>But what do you think?</p><ul><li>Have I missed an obvious one?</li><li>Would R2-D2 fit in somewhere? (I would have liked drawing that one).</li><li>Who is Emperor Palpatine? And Boba Fett?</li></ul><p>P.S. I completely refuse to acknowledge the existence of Jar Jar Binks for the purposes of this discussion &#8212; although Ricky&#8217;s suggestion of IE6 is a beauty!</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=DDxgRpFfofo:UXWs5jYqops:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=DDxgRpFfofo:UXWs5jYqops:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=DDxgRpFfofo:UXWs5jYqops:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=DDxgRpFfofo:UXWs5jYqops:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/DDxgRpFfofo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/a-long-time-ago-on-a-web-server-far-far-away/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/a-long-time-ago-on-a-web-server-far-far-away/</feedburner:origLink>
		</item>
		<item>
			<title>Top 10 Front-End Development Frameworks: Part 2</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/lGPETraI-WM/</link>
			<comments>http://www.sitepoint.com/top-10-front-end-development-frameworks-part-2/#comments</comments>
			<pubDate>Tue, 18 Jun 2013 13:43:29 +0000</pubDate>
			<dc:creator>Ivaylo Gerchev</dc:creator>
			<category><![CDATA[CSS]]></category>
			<category><![CDATA[Frameworks]]></category>
			<category><![CDATA[HTML]]></category>
			<category><![CDATA[JavaScript]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66978</guid>
			<description><![CDATA[Ivaylo Gerchev has compiled a list of 10 frameworks that will help you build responsive websites. The first part focused the Bootstrap family, but there are more to consider.]]></description>
			<content:encoded><![CDATA[<p></p><p>In the first part of this article we&#8217;ve seen some nice frameworks all related to Bootstrap. If you are weary of all this Bootstrap, take a deep breath and get ready for something really different. Let&#8217;s start with the main competitor of Bootstrap &#8211; Foundation.</p><h2>5. Foundation</h2><p><a
href="http://foundation.zurb.com/">Foundation</a> is a powerful, feature-rich, responsive front-end framework. With Foundation you can quickly prototype and build websites or apps that work on any kind of device, with tons of included layout constructs, elements and best practices. It&#8217;s built with mobile first in mind, utilitizes semantic features, and uses Zepto instead of jQuery in order to brings better user experience and faster performance.</p><p>Foundation has a 12-column flexible, nestable grid powerful enough to let you create rapidly multi-device layouts. In terms of features it provides many. There are styles for typography, buttons, forms, and various navigation controls. Many useful CSS components are provided like panels, pricing tables, progress bars, tables, thumbnails, and flex video that can scale properly your video on any device. And, of course, JavaScript plugins including dropdowns, joyride (a simple and easy website tour), magellan ( a sticky navigation that indicates where you are on the page), orbit (a responsive image slider with touch support), reveal (for creating modal dialogs or pop-up windows),  sections (a powerful replacement for traditional accordions and tabs), and tooltips.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>The framework also offers many useful add-ons.</p><ul><li>Stencils &#8211; all UI elements available in Foundation in a form of Omnigraffle stencils and vector PDFs for building wireframes and mock-ups faster and more easily.</li><li>HTML Templates &#8211; handy, ready to go layouts for you to quickly start from and build on. To use them you simply grab the code and drop it between the &lt;body&gt; tags of your page.</li><li>Icon Fonts &#8211; these are custom icon sets of pictographic icons stored in a handy web font.</li><li>SVG Social Icons &#8211; a set of resolution-independent social icons.</li><li>Responsive Tables -  the mechanism of Foundation&#8217;s responsive tables is to take the first column and &#8220;pin&#8221; it to the left of the table, thus allowing you to scroll the other columns under it.</li><li>Off-Canvas Layouts &#8211; these layouts allows you to keep content or navigation on mobile devices hidden until either a larger screen size allows it to be visible or a user takes action to expose it. And when the last happens the content or navigation slides into view.</li></ul><p>As you can see, Foundation is like a treasure-house for web developers/designers. And in order to get only what you need you can use the customizer to build your custom download.</p><h2>6. GroundworkCSS</h2><p><a
href="http://groundwork.sidereel.com/">GroundworkCSS</a> is a new, fresh addition to the front-end frameworks family. It&#8217;s a fully responsive HTML5, CSS and JavaScript toolkit built with the power of Sass and Compass which gives you the ability to rapidly prototype and build websites and apps that work on virtually any device.</p><p>It offers an extremely flexible, nestable, fraction-based, fluid grid system that makes creating any layout possible. GroundworkCSS has some really expressive features like tablets and mobile grids which maintain the grid column structure instead of collapsing the grid columns into individual rows when the viewport is below 768 or 480 pixels wide. Another cool feature is a jQuery ResponsiveText plugin which allows you to have dynamically sized text that adapts to the width of the viewport: extremely useful for scalable headlines and building responsive tables.</p><p>The framework includes a rich set of UI components like tabs, responsive data tables, buttons, forms, responsive navigation controls, tiles (a beautiful alternative to radio buttons and other boring standard form elements), tooltips, modals, Cycle2 (a powerful, responsive content slider), and many more useful elements and helpers. It also offers a nice set of vector social icons and a full suite of pictographic icons included in FontAwesome.</p><p>To see the framework in action you can use the resizer at the top center of the browser window. This way you can test the responsiveness of the components against different sizes and viewports while exploring the framework&#8217;s features.</p><p>GroundworkCSS is very well documented with many examples, and to get you started quickly the framework also provides you with several responsive templates. The only thing I consider as a weakness is the missing of a way to customize your download.</p><h2>7. Gumby</h2><p><a
href="http://gumbyframework.com/">Gumby</a> is simple, flexible, and robust front-end framework built with Sass and Compass.</p><p>Its fluid-fixed layout self-optimizes the content for desktop and mobile resolutions. It support multiple types of grids, including nested ones, with different column variations . Gumby has two PSD templates that get you started designing on 12 and 16 column grid systems.</p><p>The framework offers feature-rich UI Kit which includes buttons, forms, mobile navigation, tabs, skip links, toggles and switches, drawers, responsive images, retina images, and more. Following the latest design trends the UI elements have Metro style flat design but you can use Pretty style with gradient design too, or to mix up both styles as you wish. An awesome set of responsive, resolution independent Entypo icons, for you to use in your web projects, is completely integrated into the Gumby Framework.</p><p>Gumby has also a very good customizer with color pickers which helps you to build your custom download with ease.</p><h2>8. HTML KickStart</h2><p><a
href="http://www.99lime.com/elements/">HTML KickStart</a> is a HTML5, CSS and jQuery-powered toolkit for easily creating any type of layout. It provides clean, standards-compliant and cross-browser mark-up.</p><p>The framework has styles for grids, typography, forms, buttons, tables or lists and cross-browser web elements like a JavaScript slideshow, tabs, breadcrumb navigation, menus with sub-menus, tooltips, and more.</p><p>You can use <a
href="http://www.99lime.com/uikit/">99Lime UIKIT</a> which has all the UI elements of HTML KickStart ready to be used in your wireframes.</p><h2>9. IVORY</h2><p><a
href="http://weice.in/ivory/">IVORY</a> is a lightweight, simple and powerful framework that can handle responsive layouts from 320px to 1200px widths. It is packed with 12-column fluid width grid, styles for typography and some essential UI components like buttons, toggle-switches, accordions, tabs, tooltips, and more.</p><p>IVORY is a perfect choice when you need a simple and flexible, multi device solution, and your design doesn&#8217;t requires extra functionality which other frameworks offer.</p><h2>10. Kube</h2><p>Lastly, if you need a solid, yet simple base without needless complexity and extras, for your new project, <a
href="http://imperavi.com/kube/">Kube</a> can be the right choice. Kube is a minimal, responsive and adaptive framework with no imposed styling which gives you the freedom to create. It offers basic styles for grids, forms, typography, tables, buttons, navigation, and other stuff like links or images.</p><p>The framework contains one compact CSS file for building responsive layouts with ease and two JS files for implementing tabs and buttons in your designs. If you are looking for maximum flexibility and customization, you can download developer version which includes LESS files, with variables, mixins and modules.</p><h2>Conclusion</h2><p>I hope that now, after reading this article, you have a better perspective on the different choices available to you for your next projects. I&#8217;ve tried to put here the most popular, feature-rich, well-structured and promising frameworks which I know at the time of this writing. But as you already know things get changed with the speed of the light. So, if you know of some other cool framework not listed here, please share your knowledge in the comments thus making this article even more useful.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=lGPETraI-WM:jG2M4cBeBXY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=lGPETraI-WM:jG2M4cBeBXY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=lGPETraI-WM:jG2M4cBeBXY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=lGPETraI-WM:jG2M4cBeBXY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/lGPETraI-WM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/top-10-front-end-development-frameworks-part-2/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
			<series:name><![CDATA[Top 10 Front-End Development Frameworks]]></series:name>
			<feedburner:origLink>http://www.sitepoint.com/top-10-front-end-development-frameworks-part-2/</feedburner:origLink>
		</item>
		<item>
			<title>Google Retires Chrome Frame</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/HSZAIDUbMwE/</link>
			<comments>http://www.sitepoint.com/google-retires-chrome-frame/#comments</comments>
			<pubDate>Mon, 17 Jun 2013 16:58:39 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[Browsers]]></category>
			<category><![CDATA[Google]]></category>
			<category><![CDATA[HTML]]></category>
			<category><![CDATA[HTML5]]></category>
			<category><![CDATA[News]]></category>
			<category><![CDATA[Open source]]></category>
			<category><![CDATA[chrome]]></category>
			<category><![CDATA[Chrome Frame]]></category>
			<category><![CDATA[Google Tutorials & Articles]]></category>
			<category><![CDATA[HTML5 Dev Center]]></category>
			<category><![CDATA[microsoft]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66896</guid>
			<description><![CDATA[Chrome Frame, the plug-in which made IE6, 7 and 8 users think they had a modern browser, is coming to an end. Craig discusses its history and why it's a relief to see the project die.]]></description>
			<content:encoded><![CDATA[<p></p><p>Another day, another Google system bites the dust. <a
href="http://blog.chromium.org/2013/06/retiring-chrome-frame.html">Google is retiring Chrome Frame</a>. While an exact end date is yet to be announced, support and updates will cease in early 2014.</p><p>Chrome Frame is a <a
href="/google-chrome-frame-final-released/">free plug-in for IE6, 7 and 8</a> which effectively runs the Chrome (webkit) rendering engine within the oldIE browser. Web developers could send a meta tag or HTTP header to force the browser into Chrome mode while legacy sites and applications retained the default IE view for compatibility.</p><p>It was a great idea, although the plug-in was <a
href="/microsoft-google-chrome-frame-security/">slammed by Microsoft</a> as being a &#8220;security risk&#8221; and Mozilla claimed it could <a
href="/mozilla-microsoft-slam-google-chrome-frame/">&#8220;fragment the web&#8221;</a>. Both may have been legitimate concerns but, in the end, neither came to pass.</p><p>Google has decided there&#8217;s no need for Chrome Frame in the modern post-oldIE era:</p><blockquote><p> In 2009, many people were using browsers that lagged behind the leading edge. In order to reach the broadest base of users, developers often had to either build multiple versions of their applications or not use the new capabilities at all.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>Today, most people are using modern browsers that support the majority of the latest web technologies. Better yet, the usage of legacy browsers is declining significantly and newer browsers stay up to date automatically, which means the leading edge has become mainstream.</p></blockquote><p>Chrome Frame development was only viable while oldIEs remained important. Today, <a
href="/browser-trends-june-2013/">IE6 and 7 account for less than 1% of users</a>. IE8 is relatively high with just under 9%, but it&#8217;s dropping almost 1% every month and will become largely irrelevant by 2014 (especially when Microsoft drop XP support).</p><p>Google has never revealed Chrome Frame download or usage figures although you will find them in your Analytics statistics. On SitePoint, it&#8217;s used by 0.1% of users although that&#8217;s unlikely to be typical across the web.</p><p>The Google blog states: <em>if you are a developer with an app that points users to Chrome Frame, please prompt visitors to upgrade to a modern browser</em>. Personally, I don&#8217;t think that&#8217;s necessary. oldIE users are bombarded with messages &#8212; they&#8217;re unlikely to be using IE6, 7 or 8 because they prefer it. Of course, I hope those users upgrade or switch to a better browser. If they can&#8217;t, they can retain Chrome Frame indefinitely &#8212; Google won&#8217;t magically uninstall it from their machine.</p><p>Chrome Frame was novel solution to the oldIE problem. We may never know whether it received a widespread distribution but, as Google point out:</p><blockquote><p> It&#8217;s unusual to build something and hope it eventually makes itself obsolete, but in this case we see the retirement of Chrome Frame as evidence of just how far the web has come.</p></blockquote><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=HSZAIDUbMwE:EwtaHf6JGRQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=HSZAIDUbMwE:EwtaHf6JGRQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=HSZAIDUbMwE:EwtaHf6JGRQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=HSZAIDUbMwE:EwtaHf6JGRQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/HSZAIDUbMwE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/google-retires-chrome-frame/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/google-retires-chrome-frame/</feedburner:origLink>
		</item>
		<item>
			<title>Where Did Coderbits Come From?</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/Zr8X0Wpdvto/</link>
			<comments>http://www.sitepoint.com/coderbits/#comments</comments>
			<pubDate>Mon, 17 Jun 2013 14:47:49 +0000</pubDate>
			<dc:creator>Scott Smith</dc:creator>
			<category><![CDATA[Business]]></category>
			<category><![CDATA[Community]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66947</guid>
			<description><![CDATA[Scott Smith founded Coderbits as a way to both simplify and hone the way developers can present themselves, drawing on publicly available information to build an aggregated professional profile. ]]></description>
			<content:encoded><![CDATA[<p></p><p><em>Even as web developers and designers produce more and more sophisticated ways of presenting clients&#8217; products and services online, we are limited in how we can present ourselves to future clients. We can build our own websites, of course, but we&#8217;re often still limited to less sophisticated ways of showing ourselves off: resumes and portfolios that are essentially digital copies of a paper-based approach. Isn&#8217;t there a more dynamic way? This is what Coderbits claims to do. We asked founder and CEO Scott Smith to explain.</em></p><h2>What is Coderbits?</h2><p><a
href="https://coderbits.com/">Coderbits</a> is a site that builds intelligent portfolios for software developers and designers. Coderbits tackles the problem of traditional resumes being inadequate at verifying the skills, traits, and knowledge software developers and designers possess.</p><p>As a director of software development, I found that using resumes for the purpose of identifying quality candidates fell short. Instead of using resumes to determine which candidates to interview, I was instead forced to hold pre-screen interviews and tests. Both actions wasted my time and that of the candidates in order to determine which candidates to call in for interviews. Sites like LinkedIn provided very little value as well being based on the same premise of resumes. The content is unverified and subjective.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>As a software developer, I realized the many sites and services I utilized daily already contained the information needed to automatically build a portfolio that shows what software developers and designers know, what we&#8217;ve done, and what our interests are.</p><p>Coderbits was founded to leverage that information and empower software developers and designers to easily build a knowledge portfolio and at the same time help employers hire with confidence.</p><h2>How does it work?</h2><p>Building a portfolio on coderbits was designed to be simple and require as little input as possible. The Builder is where users are able to link to 60+ sites. Where available, Coderbits offers account linking via OAuth. This is the simplest and easiest way for users to link to an account. When OAuth is not available, linking is done by typing in the account username. Once the account is linked the true magic happens &#8211; aggregation.</p><p>Profile aggregation occurs when an account is first linked and then on a regular automated schedule. The process involves us going out to linked accounts, gathering up all the bits, merging them into one of many portfolio categories, calculating core skills, interests, and traits, automatically building social connections, awarding many of the 500+ badges, and finally creating a full portfolio.</p><p>Because we perform aggregation on a schedule, portfolios are always accurate and up-to-date. When things are added or removed from linked accounts, the portfolio is updated accordingly.</p><h2>Work Transparently</h2><p>A mantra of ours here at Coderbits is to Work Transparently. We like to promote this to encourage to people to work in this way &#8211; but what does that mean exactly? It means you should try and find ways to work that makes the work available publicly.</p><p>For example, if you are deciding which MOOC to sign up for and take courses, you would want to choose ones that make your information available on a public profile. The ideal one to choose would be the one with public profiles and public APIs so you or others can get to your information programmatically.</p><p>In this situation you are still benefiting from the service offering and allowing the work you do there to be visible as well.</p><h2>Fun Facts</h2><p>Being open, available, and transparent with our users has been key to building a successful service. The input and ideas we receive has proven invaluable.</p><p>The Posts feature was originally created for users to submit bugs, feedback, and get help. By usage it has morphed into a community of highly skilled and informed individuals who are willing to share knowledge through professional tips, designs, and content.</p><p>The value our users get from Coderbits goes beyond what we had originally planned:</p><ol><li>Find new sites and services. We are a discovery engine for them.</li><li>See the public perception of your skill sets and where you need to improve.</li><li>Motivate yourself to do, learn, and share more.</li><li>Connect, find, and engage with other developers and designers.</li><li>Test your Twitter API integration using accounts without any followers ;)</li></ol><p>Here are a couple of visual demonstrations of  the percentile distribution of Coderbits members by programming languages in which they specialize and online  entities in which they have a presence.</p><p><img
class="alignnone size-full wp-image-66950" alt="programming languages" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/graph2.png" width="522" height="320" /></p><p><img
class="alignnone size-full wp-image-66951" alt="online entities" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/graph1.png" width="521" height="317" /></p><p>Coderbits has just emerged from beta and is now available to you. <a
href="https://coderbits.com/">Come on over</a> and see what you think.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Zr8X0Wpdvto:edlrpOjCo7A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Zr8X0Wpdvto:edlrpOjCo7A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Zr8X0Wpdvto:edlrpOjCo7A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=Zr8X0Wpdvto:edlrpOjCo7A:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/Zr8X0Wpdvto" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/coderbits/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/coderbits/</feedburner:origLink>
		</item>
		<item>
			<title>Chrome Extensions: Bridging the Gap Between Layers</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/Z49xn3hgeLM/</link>
			<comments>http://www.sitepoint.com/chrome-extensions-bridging-the-gap-between-layers/#comments</comments>
			<pubDate>Mon, 17 Jun 2013 13:55:34 +0000</pubDate>
			<dc:creator>Maxime Lefrançois</dc:creator>
			<category><![CDATA[Browsers]]></category>
			<category><![CDATA[JavaScript]]></category>
			<category><![CDATA[chrome]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66934</guid>
			<description><![CDATA[When building a Chrome extension, Maxime Lefrançois found communication between multiple iframes, the current DOM, the Chrome Background Javascript file and other layers not the easiest thing to do.]]></description>
			<content:encoded><![CDATA[<p></p><p>Building a Chrome extension is meant to be easy and in many ways, it is. The documentation is really well done and has loads and loads of examples. Also, it’s quite easy to inspect any of the ones you’ve installed already to see the magic going on behind. Another big plus is that it’s all Javascript, CSS and HTML with the added bonus of the Chrome API for the extra nibble of magic.</p><p>Recently, I had to develop a toolbar for my company that would have to read the currently viewed page, show some SEO information, do some AJAX calls and so on. Not really hard, but I did stumble on a problem that was not really well documented (if at all).</p><p>Before going further, if you’re not totally familiar with Chrome extension development, I suggest you go read <a
href="http://developer.chrome.com/extensions/overview.html">this overview</a>. You’ll understand more about the complexity between the multiple layers of the architecture.</p><h2>The problem</h2><p>I decided to load my extension’s UI elements (like the toolbar and miscellaneous popups) through injected <i>iframes </i>in every web page. With that in mind, the communication between multiple <i>iframes</i>, the current DOM, the Chrome Background Javascript file and other layers that Chrome offers was not the easiest thing to do.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>In fact, the problem resided with the use of <i>iframes</i>. I had to send lots of data through <i>JSON</i> objects from the Background layer to any of the <i>iframes</i> and vice versa. Manipulating an <i>iframe</i> is not possible from the Content Script injected in the page, because of the <b>cross-domain</b> restriction.</p><p>For example, the page URL currently viewed is</p><p><i>http://www.example.com</i></p><p>and the injected iframe URLs are</p><p><i>chrome-extensions://uniqueidmadeoutoflotsandlotsofletters</i></p><p>Communication between both is impossible because cross-domain communication is a big NO-NO.</p><h2>Why use iframes, then?</h2><p>Well, <i>iframes</i> are the only way (currently) to isolate a chunk of Javascript, CSS and HTML without being influenced by the current web page style and behavior.</p><p>Also, I was stubborn enough to think there was probably a way to communicate between all the layers in a graceful manner. Even though I could not find an answer on Google or StackOverflow.</p><h2>What’s the solution?</h2><p>When using the Chrome API method <i>chrome.tabs.sendMessage</i> to send a message from the Background layer, the message is sent to <b>ALL</b> frames, not just the one that has the ContentScript injected.</p><p>I don’t know why I didn’t think of that first!</p><p>Since it’s the ContentScript that injects the <i>iframes</i>, they <b>ALSO</b> have access to the Chrome API.</p><p>So, the <i>iframes</i> can talk to their parent ContentScript with the default DOM method <i>window.parent.postMessage</i>, talk to the Background layer with <i>chrome.extension.sendRequest</i> and they can also listen to the Background layer messages with the <i>chrome.extension.onMessage.addListener </i>method<b>.</b></p><h2>How to make it happen?</h2><p>The idea is simple: I create a set of <b>Receptionists</b> that will handle all the transfers of messages from one layer to another.</p><p>Currently, this is how I’ve setup each layer&#8217;s roles :</p><h3>Background (see background.js)</h3><p>Can receive messages from ContentScript and either redirect them to the proper <i>iframe</i> or process the message.</p><p>Can send messages to all frames (ContentScript and <i>iframes</i>).</p><h3>ContentScript (see inject.js)</h3><p>Can receive messages from both the Background layer and the <i>iframes</i>.</p><p>When coming from an <i>iframe</i> (through the default <i>window.postMessage</i> method) it redirects the message to the Background if specified. If not specified, it processes the message.</p><p>Can send messages only to the Background.</p><h3>Iframe (see iframe.js)</h3><p>Can receive messages from the only the Background layer, then checks if it was meant for him and then processes the message.</p><p>Can send messages to the ContentScript with <i>window.parent.postMessage</i>.</p><p>So in other words:</p><p>-          Background talks to ContentScript and <i>iframes</i>, but only listens to ContentScript.</p><p>-          ContentScript listens to Background and <i>iframes</i>, but only talks to Background.</p><p>-          <i>Iframes</i> talks to ContentScript and listen to Background.</p><p>Side note: I understand that Background could also listen to <i>iframe</i> messages, but in my example I’ve skipped this concept since it was not necessary.</p><h3>Differentiating the iframes</h3><p>Every <i>iframe </i>has a unique ID (called <i>view</i> in my example later below) so it’s easy to redirect the messages to a particular <i>iframe</i>. A simple way to do so is by adding an  attribute in the URL when loading the <i>iframe</i>, like this:</p><pre class="brush: jscript; title: ; notranslate">chrome.extension.getURL('html/iframe/comment.html?view=comment’);</pre><p><b>Messages setup</b></p><p>The messages passed are simple objects containing two properties:</p><p>-          message</p><p>-          data</p><p>Every layer (Background, ContentScript and IFrame) has a <b>tell</b> method that sends the message with both properties.</p><pre class="brush: jscript; title: ; notranslate">tell(‘tell-something’, {attribute1:’a’, attribute2:’b’});</pre><p>When an <em>iframe</em> sends a message, the current <em>iframe </em><strong>view ID</strong> is also sent as a <em>source</em> property in <em>data</em>.</p><pre class="brush: jscript; title: ; notranslate">tell(‘tell-parent-something’, {source:’comment’});</pre><p>When a message needs to be sent to a particular <i>iframe</i>, a <i>view </i>property is added with the right <b>view ID</b> in <i>data</i>.</p><pre class="brush: jscript; title: ; notranslate">tell(‘tell-to-an-iframe’, {
    view:’comment’,
    title:’hello world!’
});</pre><p>If a message needs to be sent to all <i>iframes</i>, I used the “*” wildcard for that.</p><pre class="brush: jscript; title: ; notranslate">tell(‘tell-to-all-iframes’, {view:’*’, title:’foo bar’});</pre><p>If no view is specified, it’s the ContentScript/Background that should process the message.</p><h2>Now, the example (finally)!</h2><p>I’ve created a simple extension for liking pages that I call <b>iHeart</b> (you can find the source on my <a
href="https://github.com/ffto/iHeart-Chrome-Extension">github</a>).</p><p><img
class="alignnone size-full wp-image-66941" alt="example" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure16.png" width="576" height="465" /></p><p>It’s a simple button with a heart on the left side of the screen. When clicked, the user can add a comment and save it. The pages saved will be then listed in the extension popup button:</p><p><img
class="alignnone size-full wp-image-66942" alt="heart button" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/heartlist.png" width="86" height="43" /></p><h2>The gritty details</h2><p>Every layer has its own <i>telling</i> and <i>listening</i> methods:</p><h3>Background</h3><p><b>Telling</b></p><pre class="brush: jscript; title: ; notranslate">_this.tell = function (message, data){
    var data = data || {};
    chrome.tabs.getSelected(null, function (tab){
        if (!tab) return;
        chrome.tabs.sendMessage(tab.id, {
            message   : message,
            data : data
        });
    });
};</pre><p><b>Listening</b></p><pre class="brush: jscript; title: ; notranslate">function onPostMessage (request, sender, sendResponse){
    if (!request.message) return;
    if (request.data.view){
        _this.tell(request.message, request.data);
        return;
    }
    processMessage(request);
};</pre><h3>ContentScript</h3><p><b>Telling</b></p><pre class="brush: jscript; title: ; notranslate">function tell (message, data){
    var data = data || {};
    // send a message to &quot;background.js&quot;
    chrome.extension.sendRequest({
        message : message,
        data : data
    });
};</pre><p><b>Listening</b></p><pre class="brush: jscript; title: ; notranslate">// messages coming from iframes and the current webpage
function dom_onMessage (event){
    if (!event.data.message) return;
    // tell another iframe a message
    if (event.data.view){
        tell(event.data);
    }else{
        processMessage(event.data);
    }
};
// messages coming from &quot;background.js&quot;
function background_onMessage (request, sender, sendResponse){
    if (request.data.view) return;
    processMessage(request);
};</pre><h3>Iframe</h3><p><strong>Telling</strong></p><pre class="brush: jscript; title: ; notranslate">_this.tell = function (message, data){
var data = data || {};
data.source = _view;
window.parent.postMessage({
        message   : message,
        data : data
    }, '*');
};</pre><p><b>Listening</b></p><pre class="brush: jscript; title: ; notranslate">function background_onMessage (request, sender, sendResponse){
    // make sure the message was for this view (you can use the &quot;*&quot; wildcard to target all views)
    if (
        !request.message ||
        !request.data.view ||
        (request.data.view != _view &amp;&amp; request.data.view != '*')
    ) return;
    // call the listener callback
    if (_listener) _listener(request);
};</pre><p>The communication process is quite simple. When you visit a web page and like what you see (it can be anything really, it’s what you like, I won’t judge), you then click on the <b>iHeart </b>button. Then, the button tells to open up the comment <i>iframe.</i></p><h3>js/iframe/heart.js</h3><pre class="brush: jscript; title: ; notranslate">function heart_onClick (event){
    $('.heart').addClass('active');
    _iframe.tell('heart-clicked');
};</pre><p>It then processes the message in the ContentScript and opens the comment popup.</p><h3>js/inspect.js</h3><pre class="brush: jscript; title: ; notranslate">function processMessage (request){
if (!request.message) return;
    switch (request.message){
        case 'iframe-loaded':
            message_onIframeLoaded(request.data);
            break;
        case 'heart-clicked':
            message_onHeartClicked(request.data);
            break;
        case 'save-iheart':
            message_onSaved(request.data);
            break;
    }
};
...
function message_onHeartClicked (data){
    var comment = getView('comment');
    comment.iframe.show();
    tell('open-comment', {
        view:'comment',
        url:window.location.href,
        title:document.title
    });
};</pre><p>The comment popup shows up and displays the current web page title below the comment box.</p><p><b>js/iframe/comment.js</b></p><pre class="brush: jscript; title: ; notranslate">function onMessage (request){
    switch (request.message){
        case 'open-comment':
            message_onOpenComment(request.data);
            break;
        case 'website-is-hearted':
            message_onIsHearted(request.data);
            break;
    }
};
...
function message_onOpenComment (data){
    $('.page-title').html(data.title);
};</pre><p>When the save button is pressed, the comment <i>iframe</i> sends the info back to the ContentScript.</p><p><b>js/iframe/comment.js</b></p><pre class="brush: jscript; title: ; notranslate">function save_onClick (event){
    var comment = $('#comment').val() || '';
    _iframe.tell('save-iheart', {
         comment   : comment
    });
};</pre><p>The ContentScript hides the comment <i>iframe</i> and tell the Background to save the whole thing.</p><p><b>js/inject.js</b></p><pre class="brush: jscript; title: ; notranslate">function message_onSaved (data){
    var comment = getView('comment');
    comment.iframe.hide();
    tell('save-iheart', {
        url:window.location.href,
        title:document.title,
        comment:data.comment
    });
};</pre><p>And finally, Background finalizes all the details by saving the website in an array.</p><p><b>js/background.js</b></p><pre class="brush: jscript; title: ; notranslate">function onPostMessage (request, sender, sendResponse){
    if (!request.message) return;
    if (request.data.view){
        _this.tell(request.message, request.data);
        return;
    }
    switch (request.message){
        case 'save-iheart':
        message_onSaved(request.data);
        break;
    case 'all-iframes-loaded':
        message_allIframesLoaded(request.data);
        break;
    }
};
…
function message_onSaved (data){
    _websites.push({
        url           : data.url,
        title         : data.title,
        comment       : data.comment
    });
};</pre><h2>And … the receptionists did their job</h2><p>That’s pretty much it. That’s my solution to a communication problem between multiple types of layers and it wasn&#8217;t too hard …</p><p>Now, if I could resolve as easily the communication problems in my personal relationship, that would be great, thanks :P</p><p>The example could be taken way way further by dealing with validations of data, saving the liked web pages in a database, dealing with resizing of <i>iframes</i> content dynamically, adding some animation to the extension to make it more fun to use. All of that is great and already do-able, but it’s out of scope of this article.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Z49xn3hgeLM:4ftmzm2ID6A:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Z49xn3hgeLM:4ftmzm2ID6A:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Z49xn3hgeLM:4ftmzm2ID6A:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=Z49xn3hgeLM:4ftmzm2ID6A:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/Z49xn3hgeLM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/chrome-extensions-bridging-the-gap-between-layers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/chrome-extensions-bridging-the-gap-between-layers/</feedburner:origLink>
		</item>
		<item>
			<title>Top 10 Front-End Development Frameworks</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/y0FFfgRul5w/</link>
			<comments>http://www.sitepoint.com/top-10-front-end-development-frameworks/#comments</comments>
			<pubDate>Sun, 16 Jun 2013 11:38:58 +0000</pubDate>
			<dc:creator>Ivaylo Gerchev</dc:creator>
			<category><![CDATA[CSS]]></category>
			<category><![CDATA[Frameworks]]></category>
			<category><![CDATA[HTML]]></category>
			<category><![CDATA[JavaScript]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66903</guid>
			<description><![CDATA[Ivaylo Gerchev has compiled a list of 10 frameworks that will help you build responsive websites. This article focuses on the Bootstrap family, with more coming in a second part.]]></description>
			<content:encoded><![CDATA[<p></p><p><em>(Editor&#8217;s note: purely for reasons of length and readability, this article is the first of two parts. This one focuses on the Bootstrap family, more will be profiled in the second part.)</em></p><p>As the Web matures and the range of mobile devices we use to access it rapidly grows, our jobs as web designers and developers get considerably more complicated.</p><p>A decade ago things were much simpler. Then, it was almost certain that most of our users were visiting our sites while sitting at their desk, looking at a large monitor. 960 pixels was more or less considered as a good width for a web page. Our main care was dealing with the dozen or so desktop browsers and jumping through a few extra browser hacks to support quirky old versions of Internet Explorer. But now, with the boom of handheld electronic devices in the last five to six years, everything has changed. We&#8217;ve seen the introduction of smartphones and tablets of all different sizes, eReaders, browsers on TVs and many others. The diversity is only going to increase each day.</p><p>Soon, more people will be accessing the Web on their mobile and alternate devices than on a desktop computer. In fact, already a significant number of people use their mobile phones as their only access to the Internet. That means it is important for us designers and developers to understand how to deal with this entire mobile world. And although, as of this writing, we haven&#8217;t entirely figured out how to make all the content we are accustomed to seeing at our desk provide an equally pleasing experience on our handheld devices, the technologies and tools for doing that get better.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p>One of the primary strategies we use when we deal with unknown viewport size is the so-called responsive web design. It&#8217;s a mechanism for providing custom layouts to devices based on the size of the browser window. By default, most browsers on small devices such as smartphones and tablets shrink a web page down to fit the screen and provide ways for zooming and moving around the page. Although it technically works, it is not such a great experience. The text is too small to read, the links too small to tap, and all that zooming and panning around is more or less distracting.</p><p>The technique of responsive web design is to serve a single HTML document to all devices by applying different style sheets based on the screen size in order to provide the most optimized layout for that device. For example, when the page is viewed on a large desktop browser, the content can be placed into multiple columns with normal navigation elements. But when that same page is viewed on a small smartphone screen, it appears in one column with large links for easy tapping. You can see just how responsive web design works at the <a
href="http://mediaqueri.es/">Media Queries</a> gallery site. Just open a design in your browser and then resize the window very narrow and very wide, and watch as the layout changes based on the window size.</p><p>So far we&#8217;ve seen that, at least for now, responsive web design is an sufficient solution for fighting with the growing device diversity, but what are the actual tools and technologies to implement it in our designs? Do we have to be web gurus to handle it or will just the essential skills we already have be enough? Are there any tools that can help us?</p><p>This is where front-end development frameworks come into play. Responsive web design is not so hard to implement but it can be a little bit tricky to make it all work on all targeted devices. Frameworks make this job easier. They allow you to create responsive, standard-compliant websites with minimum effort while at the same time keeping everything simple and consistent. Frameworks give you a lot of benefits such as speed and simplicity, consistency across different devices, and much  more. One of the most important advantages is that they are so easy to use that even a person with minimal knowledge can utilize them without any problem.</p><p>In brief, if you are serious in today&#8217;s web development then using frameworks is a must and not an option. Nowadays your site must be extremely flexible in order to satisfy different browsers, tablets, smartphones and a whole bunch of other handheld devices.</p><p>A front-end web development framework is simply a collection of production ready HTML/CSS/JavaScript components that we can use in our designs. There are many frameworks out there but some of them stand out from the crowd. For your facilitation below you will find outlined some of the most powerful and popular frameworks available today. Bear in mind that these are not just CSS grids or so, but instead full-featured front-end development frameworks.</p><h2>1. Bootstrap</h2><p><a
href="http://twitter.github.io/bootstrap/index.html">Bootstrap</a> is definitely the most popular and widely used framework, nowadays. It&#8217;s a beautiful, intuitive and powerful web design kit for creating cross browser, consistent and good looking interfaces. It offers many of the popular UI components with a plain-yet-elegant style, a grid system and JavaScript plugins for common scenarios.</p><p>It is built with LESS and consists of four main parts:</p><ul><li>Scaffolding &#8211; global styles, responsive 12-column grids and layouts. Bear in mind that Bootstrap doesn&#8217;t include responsive features by default. If your design needs to be responsive you have to enable this functionality manually.</li><li>Base CSS &#8211; this includes fundamental HTML elements like tables, forms, buttons, and images, styled and enhanced with extensible classes.</li><li>Components &#8211; collection of reusable components like dropdowns, button groups, navigation controls (tabs, pills, lists, breadcrumbs, pagination), thumbnails, progress bars, media objects, and more.</li><li>JavaScript &#8211; jQuery plugins which bring the above components to life, plus transitions, modals, tool tips, popovers, scrollspy (for automatically updating nav targets based on scroll position), carousel, typeahead (a fast and fully-featured autocomplete library), affix navigation, and more.</li></ul><p>Bootstrap is already powerful enough to empower any web interface. But in order to make more use of it and making the development process easier, you can find plenty of tools and resources that complement it. Some of them are listed below:</p><ul><li><a
href="http://addyosmani.github.io/jquery-ui-bootstrap/">jQuery UI Bootstrap</a> - an awesome resource for jQuery and Bootstrap fans that combines the power of both. It brings nicely the slickness of Bootstrap to jQuery UI widgets.</li><li><a
href="https://github.com/commadelimited/jQuery-Mobile-Bootstrap-Theme">jQuery Mobile Bootstrap Theme</a> - similar to the jQuery UI theme above, this is a theme built for jQuery Mobile. It is a handy resource if you have a web front-end built with Bootstrap and want to offer a similar look for mobile.</li><li><a
href="http://exacttarget.github.io/fuelux/">Fuel UX</a> - this extends Bootstrap with additional lightweight JavaScript controls. It&#8217;s easy to install, customize, update, and optimize.</li><li><a
href="http://stylebootstrap.info/">StyleBootstrap.info</a> - Bootstrap has its own customizer but StyleBootstrap is a more detailed one with color pickers and the ability to style each component differently</li><li><a
href="http://bootswatchr.com/">BootSwatchr</a> - a Bootstrap theme roller that shows the immediate results of your changes. For every generated style, the application generates a unique URL in case you want to share it with others or return and edit anytime later.</li><li><a
href="http://bootswatch.com/">Bootswatch</a> - a nice set of free themes for Bootstrap.</li><li><a
href="http://bootsnipp.com/">Bootsnipp</a> - a good collection of design elements and HTML snippets for Bootstrap. It offers also form and button builders.</li><li><a
href="http://www.layoutit.com/">LayoutIt</a> - drag and drop interface builder based on the elements and components of Bootstrap. It helps you to compose your design visually by placing and arranging different elements into your layout via drag and drop and then allows you to edit their properties. You get the base code and then expand it. Simple and easy.</li></ul><h2>2. Fbootstrapp</h2><p><a
href="http://ckrack.github.io/fbootstrapp/">Fbootstrapp</a> is based on Bootstrap and gives you the same functionality for Facebook iframe apps and designs. It includes base CSS and HTML for all standard components like typography, forms, buttons, tables, grids, navigation, and more, styled in the typical Facebook look and feel.</p><h2>3. BootMetro</h2><p><a
href="http://aozora.github.io/bootmetro/">BootMetro</a> is a framework inspired by the Metro UI CSS, which is built on top of Bootstrap, for creating Metro/Windows 8-styled websites. It includes all Bootstrap&#8217;s features plus some additional extras like tiled pages, an application bar, and more.</p><h2>4. Kickstrap</h2><p>Simply put, <a
href="http://getkickstrap.com/">Kickstrap</a> is a kind of Bootstrap on steroids. It uses Bootstrap as its base and extends it with many apps, themes and extras. This makes the framework a complete kit for building websites without the need to install anything. Just put it in your site and you are ready to go.</p><p>Apps are just bundles of JavaScript and CSS files that run together as a package after your page has finished loading. Some of the apps included by default are Knockout.js, Retina.js, Firebug Lite, and Updater. And you can add many more.</p><p>Themes give you the ability to differentiate from most Bootstrap websites&#8217; standard look and feel.</p><p>Extras are fan-created additions to extend Bootstrap UI library. They usually use the same or similar syntax.</p><h2>And Next Time&#8230;</h2><p>Here we conclude our journey in the land of Bootstrap related frameworks. Stay tuned for the next part where more frameworks are waiting for you.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=y0FFfgRul5w:ItRNPIoEWJ0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=y0FFfgRul5w:ItRNPIoEWJ0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=y0FFfgRul5w:ItRNPIoEWJ0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=y0FFfgRul5w:ItRNPIoEWJ0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/y0FFfgRul5w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/top-10-front-end-development-frameworks/feed/</wfw:commentRss>
			<slash:comments>22</slash:comments>
			<series:name><![CDATA[Top 10 Front-End Development Frameworks]]></series:name>
			<feedburner:origLink>http://www.sitepoint.com/top-10-front-end-development-frameworks/</feedburner:origLink>
		</item>
		<item>
			<title>12 Free Google Reader Alternatives</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/GejDO0B1jx4/</link>
			<comments>http://www.sitepoint.com/12-free-google-reader-alternatives/#comments</comments>
			<pubDate>Fri, 14 Jun 2013 16:02:28 +0000</pubDate>
			<dc:creator>Craig Buckler</dc:creator>
			<category><![CDATA[Google]]></category>
			<category><![CDATA[News]]></category>
			<category><![CDATA[Software]]></category>
			<category><![CDATA[feed]]></category>
			<category><![CDATA[Google Tutorials & Articles]]></category>
			<category><![CDATA[news]]></category>
			<category><![CDATA[reader]]></category>
			<category><![CDATA[rss]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66403</guid>
			<description><![CDATA[Time is running out to find an alternative to Google Reader. Fortunately, Craig has a total of twelve suggestions -- you may even find an option you prefer...]]></description>
			<content:encoded><![CDATA[<p></p><p>Many of us don&#8217;t want <a
href="/goodbye-google-reader/">Google Reader to die</a> but it&#8217;s time to face reality. Google is abandoning the service on July 1, 2013 and no amount of pleading will dissuade them. It&#8217;s a huge blow for those who depend on the service such as journalists and people who prefer concise news feeds.</p><p>Google Reader may have been late to the party but it killed the market for commercial and ad-based RSS readers. Fortunately, some survived and a few new players have arrived&hellip;</p><h2>Desktop and Mobile App RSS Readers</h2><p>There are number of desktop programs, mobile apps and browser add-ons for viewing RSS feeds:</p><p><strong><a
href="http://www.feedly.com/">Feedly</a></strong><br
/> Feedly has probably gained the most from Reader&#8217;s demise. It&#8217;s available as a Firefox add-on and an app for Android and iOS. However, it currently depends on Google Reader&#8217;s back-end so there could be issues on July 1.</p><p><strong><a
href="https://www.pulse.me/">Pulse</a></strong><br
/> Pulse will import Google and other RSS feeds but it doesn&#8217;t feel quite like other readers. It&#8217;s primarily an iOS and Android app &#8212; an early web version is available although I found it a little unstable.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p><strong><a
href="http://www.rssowl.org/">RSSOwl</a></strong><br
/> RSSOwl is a multi-platform Java-based desktop application. It&#8217;s open source and has many powerful features including synchronization facilities. However, synchronization uses the Google Reader API so it may not remain an option much longer.</p><p><strong><a
href="https://addons.mozilla.org/en-US/firefox/addon/brief/">Brief</a></strong><br
/> Another Firefox add-on which looks good and imports Google XML subscriptions. However, there&#8217;s no synchronization between different installations.</p><p><strong><a
href="http://www.opera.com/">Opera</a></strong><br
/> If you use Opera&#8217;s email client, you&#8217;ll be pleased to hear there&#8217;s a <a
href="http://www.opera.com/help/tutorials/mail/news/">built-in RSS Reader</a>. Whether this remains following Blink integration is another matter.</p><p>I&#8217;m not keen on OS-based RSS Reader applications: you won&#8217;t always be at your PC and cross-device synchronization can be difficult. Fortunately, there are a few&hellip;</p><h2>Web-based RSS Readers</h2><p>The alternatives include:</p><p><strong><a
href="http://www.bloglines.com/">Bloglines</a></strong><br
/> Ironically, Bloglines was Google Reader&#8217;s biggest causality. The service is back with new owners and offers a similar Google-like summary of headlines and a reasonable mobile experience.</p><p><strong><a
href="http://www.inoreader.com/">InoReader</a></strong><br
/> InoReader is the closest to a Google Reader experience, especially since you can sign up using your Google Account and import all feeds and starred articles with a single click. The mobile site works well, but it&#8217;s no match for the speed of a native app. InoReader is my favorite web-based application at this time.</p><p><strong><a
href="http://theoldreader.com">The Old Reader</a></strong><br
/> I&#8217;m not sure about the name, but The Old Reader provides a good-looking interface, easy sign-up, feed import and a responsive design for mobile. It&#8217;s a beta product and a little buggy but remains usable.</p><p><strong><a
href="https://www.commafeed.com/">Comma Feed</a></strong><br
/> A lightweight reader which looks similar &#8212; but better &#8212; than The Old Reader. It also provides a Google importer and a responsive view for mobile devices.</p><p><strong><a
href="http://goodnoows.com/">Good Noows</a></strong><br
/> Good Noows has been around some time and is more attractive than Bloglines with a variety of feed viewing options. However, it&#8217;s a heavier application and doesn&#8217;t work well on mobile.</p><p><strong><a
href="http://www.newsblur.com/">NewsBlur</a></strong><br
/> NewsBlur&#8217;s servers suffered when Google announced Reader&#8217;s death but the service seems stable now. The website is supplemented by mobile apps but you&#8217;ll need to pay a subscription to unlock some restrictions.</p><p><strong><a
href="http://multiplx.com/">MultiPLX</a></strong><br
/> MultiPLX is a new (beta) product which offers Google Reader import and list or card views. It looks interesting, but stability may be a concern for a little while.</p><h2>Nah &#8212; Any Other Options?</h2><p>I&#8217;m yet to be convinced any of these are as good as Google Reader on multiple devices. Several of the OS-based apps lack synchronization or attempt to present glossy magazine style layouts. Some of the web alternatives are better but whether they have a long-term future remains to be seen.</p><p>One of my current favorites is <strong><a
href="http://tt-rss.org/redmine/projects/tt-rss/wiki">Tiny Tiny RSS</a></strong>. It&#8217;s an open source PHP and MySQL/PostgreSQL application you need to host yourself. Installation is reasonably straight-forward assuming you&#8217;re comfortable configuring databases and cron jobs. It imports Google&#8217;s XML file and there are several <a
href="https://play.google.com/store/apps/details?id=org.ttrssreader">Android apps</a> which can connect to your server.</p><p><a
href="http://tt-rss.org/redmine/projects/tt-rss/wiki">Tiny Tiny RSS</a> is a reasonable alternative to Google Reader and, even if development ceased, there&#8217;s no danger your service will stop working.</p><p>There&#8217;s one chink of light in the gloom following Google Reader&#8217;s expiration: it will open the market to more competitors. Companies including Digg are frantically polishing their own RSS Readers in an attempt to entice those from Google. This list may be very different in a few months.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=GejDO0B1jx4:y0Wsq2mNPdE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=GejDO0B1jx4:y0Wsq2mNPdE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=GejDO0B1jx4:y0Wsq2mNPdE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=GejDO0B1jx4:y0Wsq2mNPdE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/GejDO0B1jx4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/12-free-google-reader-alternatives/feed/</wfw:commentRss>
			<slash:comments>28</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/12-free-google-reader-alternatives/</feedburner:origLink>
		</item>
		<item>
			<title>Learn Ruby on Rails</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/qc9OKMY9KO4/</link>
			<comments>http://www.sitepoint.com/learn-ruby-on-rails/#comments</comments>
			<pubDate>Fri, 14 Jun 2013 07:03:12 +0000</pubDate>
			<dc:creator>Fernando Tinoco</dc:creator>
			<category><![CDATA[Programming]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66824</guid>
			<description><![CDATA[Ruby on Rails is the web development framework of the moment, powering GitHub, Twitter, Hulu and many more successful apps and websites. The arrival of Rails 4 is the perfect time to learn it. SitePoint&#8217;s newest ebook, &#8216;Jump Start Rails&#8217;, from Andy Hawthorne, will get you up to speed with Ruby on Rails in just [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Ruby on Rails is the web development framework of the moment, powering GitHub, Twitter, Hulu and many more successful apps and websites. The arrival of Rails 4 is the perfect time to learn it.</p><p>SitePoint&#8217;s newest ebook, <a
href="https://learnable.com/books/jsrails1">&#8216;Jump Start Rails&#8217;</a>, from Andy Hawthorne, will get you up to speed with Ruby on Rails in just a weekend.</p><p>Andy has also prepared the <a
href="https://learnable.com/courses/build-your-first-rails-app-2784">&#8216;Build your first Rails&#8217;</a> app online course to take you from creating a complete Ruby on Rails 4 app with a log in system all the way to deploying it to Heroku, a leading Rails application hosting environment, in a couple of hours.</p><p>Also, our all time great, 10 part tutorial from Patrick Lenz can be found here: <a
href="http://www.sitepoint.com/learn-ruby-on-rails-the-ultimate-beginner-tutorial/">Learn Ruby on Rails: the Ultimate Beginner&#8217;s Tutorial.</a></p><p>If you are looking for more advanced topics such as this great <a
href="http://rubysource.com/an-introduction-to-sass-in-rails/">Introduction to Sass in Rails</a>, head over to <a
href="http://rubysource.com/">RubySource</a> for fresh tutorials and to discover new Ruby gems.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=qc9OKMY9KO4:QD2RO1VX1Xg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=qc9OKMY9KO4:QD2RO1VX1Xg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=qc9OKMY9KO4:QD2RO1VX1Xg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=qc9OKMY9KO4:QD2RO1VX1Xg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/qc9OKMY9KO4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/learn-ruby-on-rails/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/learn-ruby-on-rails/</feedburner:origLink>
		</item>
		<item>
			<title>Regular Expressions – Gotta Love Them</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/L9TJ4-5nDvs/</link>
			<comments>http://www.sitepoint.com/regular-expressions-gotta-love-em/#comments</comments>
			<pubDate>Fri, 14 Jun 2013 06:01:10 +0000</pubDate>
			<dc:creator>Sarah Hawk</dc:creator>
			<category><![CDATA[Community]]></category>
			<category><![CDATA[JavaScript]]></category>
			<category><![CDATA[Perl]]></category>
			<category><![CDATA[Programming]]></category>
			<category><![CDATA[regex]]></category>
			<category><![CDATA[regular expressions]]></category>
			<category><![CDATA[talk with the experts]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66839</guid>
			<description><![CDATA[The subject of our Talk with the Experts session this week was Regular Expressions. Forum staff Thom Parkin and Allan H did a fantastic job of explaining the tricky subject.]]></description>
			<content:encoded><![CDATA[<p></p><p>This morning I handed over the reigns of our regular Talk with the Experts sessions to Fernando, who did a sterling job of running the chat, the subject of which was Regular Expressions. Our experts today were SitePoint forum staff members Thom Parkin and Allan H, who did an amazing job of explaining a concept that most programmers find pretty sticky.</p><p>Here is a list of resources that came out of the session:</p><p><a
title="What is a RegEx?" href="http://en.wikipedia.org/wiki/Regular_expression">What is a Regular Expression?</a><br
/> <a
title="How to create a RegEx" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions">How to create a RegEx</a><br
/> <a
title="Syntax" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp">Syntax and parameters</a></p><p>And if you like puzzles&#8230; you may or may not like these&#8230;</p><p><a
title="Crossword" href="http://www.coinheist.com/rubik/a_regular_crossword/grid.pdf">A RegEx crossword</a><br
/> <a
title="Crossword" href="http://regexcrossword.com/" target="_blank">And another crossword<br
/> </a><a
title="Crossword" href="http://www.regexcrosswords.com/" target="_blank">And another one</a></p><p>If you missed the session today because you didn&#8217;t know about it then make sure you <a
title="Email reminders" href="https://www.facebook.com/sitepoint/app_115462065200508" target="_blank">sign up for email reminders of future sessions here</a>.</p><p>And without further ado – a transcript of the session:</p><p><span
class="irc-date">[23:00]</span> <span
class="irc-black">&lt;nandotinoco&gt; Welcome to those people that have just joined. Thom Parkin (@ParkinT) is our expert today. He is a staff member of the SitePoint forums and is here to talk about Regular Expressions</span></p><p><span
class="irc-date">[23:01]</span> <span
class="irc-black">&lt;ParkinT&gt; AllanH is also a staff member of the Sitepoint forums and will be an expert today.</span></p><p><span
class="irc-date">[23:02]</span> <span
class="irc-black">&lt;ParkinT&gt; This topic is just TOO BIG for one person.  </span></p><p><span
class="irc-date">[23:03]</span> <span
class="irc-black">&lt;johnlacey&gt; Where would you recommend a complete beginner with next to no experience with regular expressions start? lol</span></p><p><span
class="irc-date">[23:03]</span> <span
class="irc-black">&lt;AllanH&gt; There are different &#8220;flavors&#8221; of regex. we&#8217;d like to discuss Perl Compatible Regular Expressions</span></p><p><span
class="irc-date">[23:03]</span> <span
class="irc-black">&lt;ParkinT&gt; Regular Expressions are universal among most programming languages.  However, the implementation varies among the languages too</span></p><p><span
class="irc-date">[23:03]</span> <span
class="irc-black">&lt;ParkinT&gt; We would like to keep the discussion at a very broad and generic level.</span></p><p><span
class="irc-date">[23:04]</span> <span
class="irc-black">&lt;ParkinT&gt; Exactly, Allan.</span></p><p><span
class="irc-date">[23:04]</span> <span
class="irc-black">&lt;AllanH&gt; Apache mod rewrite, PHP, Javascript, and of course Perl use PCRE</span></p><p><span
class="irc-date">[23:04]</span> <span
class="irc-black">&lt;ParkinT&gt; The purpose and intent of RegEx is to parse, match, find-and-replace characters and strings.</span></p><p><span
class="irc-date">[23:04]</span> <span
class="irc-black">&lt;adams&gt; why i must learn regular expression in programming ?</span></p><p><span
class="irc-date">[23:05]</span> <span
class="irc-black">&lt;ParkinT&gt; Great question.</span></p><p><span
class="irc-date">[23:05]</span> <span
class="irc-black">&lt;ParkinT&gt; Actually, you are not REQUIRED to learn RegEX</span></p><p><span
class="irc-date">[23:05]</span> <span
class="irc-black">&lt;ParkinT&gt; You are not required to learn IF or Switch statements.</span></p><p><span
class="irc-date">[23:05]</span> <span
class="irc-black">&lt;Jerry&gt; How close are GAWK REs to PCRE?</span></p><p><span
class="irc-date">[23:05]</span> <span
class="irc-black">&lt;ParkinT&gt; It is just another tool that can (often) help you.</span></p><p><span
class="irc-date">[23:05]</span> <span
class="irc-black">&lt;AllanH&gt; There are good string functions but at times they are not powerful enough</span></p><p><span
class="irc-date">[23:05]</span> <span
class="irc-black">&lt;johnlacey&gt; It&#8217;s really about pattern recognition, isn&#8217;t it? I&#8217;ve seen regular expressions to check that email addresses match an expected format and also in .htaccess redirects&#8230;</span></p><p><span
class="irc-date">[23:06]</span> <span
class="irc-black">&lt;ParkinT&gt; That&#8217;s right.</span></p><p><span
class="irc-date">[23:06]</span> <span
class="irc-black">&lt;AllanH&gt; And not always so easy</span></p><p><span
class="irc-date">[23:06]</span> <span
class="irc-black">&lt;AllanH&gt; I&#8217;ve seen some that get what they want and are happy</span></p><p><span
class="irc-date">[23:07]</span> <span
class="irc-black">&lt;ParkinT&gt; I am not sure how close GAWK&#8217;s implementation is to PCRE.</span></p><p><span
class="irc-date">[23:07]</span> <span
class="irc-black">&lt;AllanH&gt; &#8230; until they also get what they want to NOT get</span></p><p><span
class="irc-date">[23:07]</span> <span
class="irc-black">&lt;Jerry&gt; So true, Allan</span></p><p><span
class="irc-date">[23:08]</span> <span
class="irc-black">&lt;johnlacey&gt; So could you give us an example of a (simple) regular expression? </span></p><p><span
class="irc-date">[23:08]</span> <span
class="irc-black">&lt;ParkinT&gt; That could be said about all software code, eh?</span></p><p><span
class="irc-date">[23:08]</span> <span
class="irc-black">&lt;Jerry&gt; Most times it&#8217;s easier to figure out the problem when you get too much than when you don&#8217;t get anything</span></p><p><span
class="irc-date">[23:08]</span> <span
class="irc-black">&lt;ParkinT&gt; JohnLacey asked an excellent question&#8230;</span></p><p><span
class="irc-date">[23:08]</span> <span
class="irc-black">&lt;AllanH&gt; True enough, I guess regex is part science and part art</span></p><p><span
class="irc-date">[23:09]</span> <span
class="irc-black">&lt;ParkinT&gt; Email validation is the &#8220;classic&#8221; use case for RegEx but I don&#8217;t think it is a very good example.</span></p><p><span
class="irc-date">[23:09]</span> <span
class="irc-black">&lt;AllanH&gt; I started with the PHP documentation</span></p><p><span
class="irc-date">[23:09]</span> <span
class="irc-black">&lt;johnlacey&gt; Because an email address can fit the prescribed format, but still not exist?</span></p><p><span
class="irc-date">[23:10]</span> <span
class="irc-black">&lt;AllanH&gt; Read it and still refer to it often</span></p><p><span
class="irc-date">[23:10]</span> <span
class="irc-black">&lt;ParkinT&gt; Parsing data to determine, for example, all the digits AFTER a decimal point might be an example of a &#8220;simple&#8221; RegEx.  Allan, do you agree?</span></p><p><span
class="irc-date">[23:10]</span> <span
class="irc-black">&lt;AllanH&gt; Yes, and something that might come up</span></p><p><span
class="irc-date">[23:11]</span> <span
class="irc-black">&lt;ParkinT&gt; Suppose I have this string:</span></p><p><span
class="irc-date">[23:11]</span> <span
class="irc-black">&lt;ParkinT&gt; 3.14159</span></p><p><span
class="irc-date">[23:11]</span> <span
class="irc-black">&lt;ParkinT&gt; Using RegEx you look for patterns, as johnlacey mentioned.</span></p><p><span
class="irc-date">[23:11]</span> <span
class="irc-black">&lt;ParkinT&gt; Allan, correct me where I mis-state anything&#8230;</span></p><p><span
class="irc-date">[23:12]</span> <span
class="irc-black">&lt;ParkinT&gt; The decimal point becomes the &#8220;anchor&#8221; in our evaluation.  We want to see what comes AFTER it.</span></p><p><span
class="irc-date">[23:12]</span> <span
class="irc-black">&lt;AllanH&gt; and can&#8217;t or don&#8217;t want to cast it as a float?</span></p><p><span
class="irc-date">[23:13]</span> <span
class="irc-black">&lt;ParkinT&gt; DRAT.  I cannot type slashes in this chat.</span></p><p><span
class="irc-date">[23:13]</span> <span
class="irc-black">&lt;adams&gt; /\\</span></p><p><span
class="irc-date">[23:13]</span> <span
class="irc-black">&lt;Jerry&gt; \/foo\/</span></p><p><span
class="irc-date">[23:13]</span> <span
class="irc-black">&lt;ParkinT&gt; Are there control characters that I am not aware of?? I think I just turned off all the power to New York City!!</span></p><p><span
class="irc-date">[23:13]</span> <span
class="irc-black">&lt;AllanH&gt; If you knew how many numbers were always in front you could use string funtions</span></p><p><span
class="irc-date">[23:14]</span> <span
class="irc-black">&lt;ParkinT&gt; &#8220;IF&#8221; you knew.  Right.</span></p><p><span
class="irc-date">[23:14]</span> <span
class="irc-black">&lt;ParkinT&gt; Suppose you don&#8217;t</span></p><p><span
class="irc-date">[23:14]</span> <span
class="irc-black">&lt;Jerry&gt; backslash before fwdslash</span></p><p><span
class="irc-date">[23:14]</span> <span
class="irc-black">&lt;ParkinT&gt; Thanks.  That wil further complicate this!!!</span></p><p><span
class="irc-date">[23:14]</span> <span
class="irc-black">&lt;AllanH&gt; But for our sake we NEED to get that decimal!</span></p><p><span
class="irc-date">[23:15]</span> <span
class="irc-black">&lt;ParkinT&gt; \/\d*[.](\d*)\/</span></p><p><span
class="irc-date">[23:15]</span> <span
class="irc-black">&lt;ParkinT&gt; NO.  The preceding slashes appear too.</span></p><p><span
class="irc-date">[23:15]</span> <span
class="irc-black">&lt;ParkinT&gt; Here&#8217;s how I would approach it.  The slash &#8216;d&#8217; represents any &#8216;digit&#8217; (Numeric)</span></p><p><span
class="irc-date">[23:16]</span> <span
class="irc-black">&lt;ParkinT&gt; We know there is an UNKNOWN number of digits BEFORE the decimal point.</span></p><p><span
class="irc-date">[23:16]</span> <span
class="irc-black">&lt;ParkinT&gt; slash d followed by the star  \d*</span></p><p><span
class="irc-date">[23:16]</span> <span
class="irc-black">&lt;AllanH&gt; isn&#8217;t &#8220;.&#8221; a &#8220;wildcard&#8221;?</span></p><p><span
class="irc-date">[23:16]</span> <span
class="irc-black">&lt;ParkinT&gt; Next is the decimal itself.  However, a dot is a command character in RegEx so we need to define it as EXPLICIT</span></p><p><span
class="irc-date">[23:17]</span> <span
class="irc-black">&lt;ParkinT&gt; Exactly, AllanH</span></p><p><span
class="irc-date">[23:17]</span> <span
class="irc-black">&lt;ParkinT&gt; But if you put characters in square brackets they are evaluated as literals</span></p><p><span
class="irc-date">[23:17]</span> <span
class="irc-black">&lt;ParkinT&gt; So [.] would represent the dot</span></p><p><span
class="irc-date">[23:17]</span> <span
class="irc-black">&lt;AllanH&gt; and only ONE dot</span></p><p><span
class="irc-date">[23:18]</span> <span
class="irc-black">&lt;ParkinT&gt; Next is the data we are trying to capture.  So we must surround it with braces () to represent a group.</span></p><p><span
class="irc-date">[23:18]</span> <span
class="irc-black">&lt;ParkinT&gt; and that data will ALSO be a set of digits with an unknown length (\d*)</span></p><p><span
class="irc-date">[23:19]</span> <span
class="irc-black">&lt;ParkinT&gt; But suppose we are not even sure there are ANY digits before the decimal?</span></p><p><span
class="irc-date">[23:19]</span> <span
class="irc-black">&lt;AllanH&gt; the &#8220;star&#8221; means zero or more</span></p><p><span
class="irc-date">[23:19]</span> <span
class="irc-black">&lt;ParkinT&gt; In that case this \d*[.](\d*) would not work</span></p><p><span
class="irc-date">[23:19]</span> <span
class="irc-black">&lt;ParkinT&gt; YOu are correct.  I was confusing the star and the question mark;</span></p><p><span
class="irc-date">[23:20]</span> <span
class="irc-black">&lt;ParkinT&gt; which means ONe or more.  Bad example.  I should have used the ? and then explained the star.   *embarrassed.</span></p><p><span
class="irc-date">[23:20]</span> <span
class="irc-black">&lt;ParkinT&gt; To better answer the original question, here are some &#8216;essentials&#8217; of the Regular Expression.</span></p><p><span
class="irc-date">[23:21]</span> <span
class="irc-black">&lt;ParkinT&gt; As AllanH pointed out, the star means zero or more and refers to the set that preceded it.</span></p><p><span
class="irc-date">[23:21]</span> <span
class="irc-black">&lt;AllanH&gt; I like the Mozilla Docs for Javascript reference</span></p><p><span
class="irc-date">[23:21]</span> <span
class="irc-black">&lt;ParkinT&gt; Do you have a link?</span></p><p><span
class="irc-date">[23:22]</span> <span
class="irc-black">&lt;AllanH&gt; <a
href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions</a></span></p><p><span
class="irc-date">[23:22]</span> <span
class="irc-black">&lt;ParkinT&gt; That is great!  We can go home now!!</span></p><p><span
class="irc-date">[23:22]</span> <span
class="irc-black">&lt;AllanH&gt; <a
href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp</a></span></p><p><span
class="irc-date">[23:22]</span> <span
class="irc-black">&lt;AllanH&gt; Maybe not, Docs aren&#8217;t the easiest thing to digest</span></p><p><span
class="irc-date">[23:23]</span> <span
class="irc-black">&lt;AllanH&gt; eg. <a
href="http://www.pcre.org/pcre.txt">http://www.pcre.org/pcre.txt</a></span></p><p><span
class="irc-date">[23:23]</span> <span
class="irc-black">&lt;ParkinT&gt; RegEx is hard for most people because it can be very intimidating.</span></p><p><span
class="irc-date">[23:24]</span> <span
class="irc-black">&lt;johnlacey&gt; I know I&#8217;m only on my second coffee of the day, and my brain is exploding a little just reading the Mozilla documentation. lol</span></p><p><span
class="irc-date">[23:24]</span> <span
class="irc-black">&lt;ParkinT&gt; Like anything, if you approach it gently &#8211; one bite at a time &#8211; and practice in small doses&#8230;</span></p><p><span
class="irc-date">[23:24]</span> <span
class="irc-black">&lt;ParkinT&gt; The syntax is weird and the choice of characters make it very confusing to read.</span></p><p><span
class="irc-date">[23:24]</span> <span
class="irc-black">&lt;AllanH&gt; I only have and still do learn on a &#8220;need to know&#8221; basis.</span></p><p><span
class="irc-date">[23:25]</span> <span
class="irc-black">&lt;johnlacey&gt; Do regular rexpressions vary between languages, or are they pretty universal? </span></p><p><span
class="irc-date">[23:25]</span> <span
class="irc-black">&lt;ParkinT&gt; There are many tools (online and desktop) that will evaluate RegEx.  They let you &#8220;Poke and try&#8221; different patterns</span></p><p><span
class="irc-date">[23:25]</span> <span
class="irc-black">&lt;ParkinT&gt; As I said earlier &#8220;Regular Expressions are universal among most programming languages.  However, the implementation varies among the languages too &#8220;</span></p><p><span
class="irc-date">[23:26]</span> <span
class="irc-black">&lt;ParkinT&gt; There are general syntax rules that do not vary among languages.</span></p><p><span
class="irc-date">[23:26]</span> <span
class="irc-black">&lt;AllanH&gt; I think once you get the basic syntax down they&#8217;re pretty much alike, at least enough so that you can figure out how to do what you need to by referring to the Docs</span></p><p><span
class="irc-date">[23:26]</span> <span
class="irc-black">&lt;ParkinT&gt; Ruby, for example, will recognize RegEx in almost anyplace a string could be used.</span></p><p><span
class="irc-date">[23:27]</span> <span
class="irc-black">&lt;AllanH&gt; and if it ain&#8217;t binary it&#8217;s text</span></p><p><span
class="irc-date">[23:29]</span> <span
class="irc-black">&lt;AllanH&gt; I think a lot of the &#8220;</span></p><p><span
class="irc-date">[23:30]</span> <span
class="irc-black">&lt;AllanH&gt; I think a lot of the &#8220;tools&#8221; eg. match, replace, split &#8211; are similar across languages too</span></p><p><span
class="irc-date">[23:30]</span> <span
class="irc-black">&lt;nandotinoco&gt; A lot of web developers first get exposed to RegEx when fixing a bug on an .htaccess file or trying to figure out URL redirections. Do you have any tips or a trick for those cases?</span></p><p><span
class="irc-date">[23:30]</span> <span
class="irc-black">&lt;ParkinT&gt; Absolutely!!</span></p><p><span
class="irc-date">[23:31]</span> <span
class="irc-black">&lt;ParkinT&gt; My first response to that question, nandotinoco, is &#8220;StackOverflow&#8221; !!</span></p><p><span
class="irc-date">[23:31]</span> <span
class="irc-black">&lt;ParkinT&gt; tongue-in-cheek</span></p><p><span
class="irc-date">[23:31]</span> <span
class="irc-black">&lt;AllanH&gt; You could try asking in the <a
href="http://www.sitepoint.com/forums/forumdisplay.php?97-Server-Configuration-Apache-amp-URL-Rewriting">http://www.sitepoint.com/forums/forumdisplay.php?97-Server-Configuration-Apache-amp-URL-Rewriting</a> forum</span></p><p><span
class="irc-date">[23:32]</span> <span
class="irc-black">&lt;nandotinoco&gt; That&#8217;s better ;-)</span></p><p><span
class="irc-date">[23:32]</span> <span
class="irc-black">&lt;ParkinT&gt; Those rewrites seem to be a beast of their own.</span></p><p><span
class="irc-date">[23:32]</span> <span
class="irc-black">&lt;johnlacey&gt; I&#8217;ve seen examples where they check for domain.com/directory and change it to domain.com/directory/ </span></p><p><span
class="irc-date">[23:32]</span> <span
class="irc-black">&lt;AllanH&gt; Apache has things like &#8220;flags&#8221; that can get tricky at times, but syntax is similar</span></p><p><span
class="irc-date">[23:33]</span> <span
class="irc-black">&lt;AllanH&gt; Yes, gotta love &#8220;friendly URLs&#8221;</span></p><p><span
class="irc-date">[23:33]</span> <span
class="irc-black">&lt;ParkinT&gt; That&#8217;s right.  By capturing groups and then reapplying what was captured you can completely rearrange things</span></p><p><span
class="irc-date">[23:34]</span> <span
class="irc-black">&lt;AllanH&gt; and being able to redirect an HTTP request from an old page to the new page</span></p><p><span
class="irc-date">[23:35]</span> <span
class="irc-black">&lt;ParkinT&gt; If you want to sharpen your RegEx skills there are numerous puzzles and crosswords online that use Regular Expressions.</span></p><p><span
class="irc-date">[23:36]</span> <span
class="irc-black">&lt;johnlacey&gt; Could you like us to one of those puzzles? Sounds like fun (but also a challenge). </span></p><p><span
class="irc-date">[23:36]</span> <span
class="irc-black">&lt;johnlacey&gt; link us* </span></p><p><span
class="irc-date">[23:37]</span> <span
class="irc-black">&lt;ParkinT&gt; Searching&#8230;</span></p><p><span
class="irc-date">[23:37]</span> <span
class="irc-black">&lt;AllanH&gt; How much performance difference do you think there is between using [a-zA-Z] &#8230;. [a-z] \/i and [\w] ?</span></p><p><span
class="irc-date">[23:38]</span> <span
class="irc-black">&lt;AllanH&gt; my feeling is use what&#8217;s easiest to read when starting out, then work in the more elegant as you progress</span></p><p><span
class="irc-date">[23:38]</span> <span
class="irc-black">&lt;ParkinT&gt; That&#8217;s a question that is hard to answer, probably varies among languages and &#8211; I bet &#8211; would be very slight.</span></p><p><span
class="irc-date">[23:39]</span> <span
class="irc-black">&lt;ParkinT&gt; Here is one that I admit I have not been able to complete:  <a
href="http://www.coinheist.com/rubik/a_regular_crossword/grid.pdf">http://www.coinheist.com/rubik/a_regular_crossword/grid.pdf</a></span></p><p><span
class="irc-date">[23:39]</span> <span
class="irc-black">&lt;johnlacey&gt; Thanks ParkinT </span></p><p><span
class="irc-date">[23:39]</span> <span
class="irc-black">&lt;ParkinT&gt; But, better for beginning, I just found this in a Google search: <a
href="http://regexcrossword.com/">http://regexcrossword.com/</a></span></p><p><span
class="irc-date">[23:40]</span> <span
class="irc-black">&lt;AllanH&gt; a line that&#8217;s say 30 characters long but readable vs. the same effect from one that&#8217;s 8 characters long but needs to be mentally &#8220;translated&#8221;</span></p><p><span
class="irc-date">[23:40]</span> <span
class="irc-black">&lt;ParkinT&gt; And, this one looks interesting&#8230; <a
href="http://www.regexcrosswords.com/">http://www.regexcrosswords.com/</a></span></p><p><span
class="irc-date">[23:40]</span> <span
class="irc-black">&lt;ParkinT&gt; I agree, AllanH.</span></p><p><span
class="irc-date">[23:41]</span> <span
class="irc-black">&lt;ParkinT&gt; Developers tend to favor &#8216;elegance&#8217; and &#8216;cleverness&#8217; a bit too much.</span></p><p><span
class="irc-date">[23:41]</span> <span
class="irc-black">&lt;ParkinT&gt; I am quite guilty as charged.</span></p><p><span
class="irc-date">[23:41]</span> <span
class="irc-black">&lt;ParkinT&gt; Concise is a good thing to strive for.  But readability is important because MAINTAINING code is critical (and very expensive).</span></p><p><span
class="irc-date">[23:41]</span> <span
class="irc-black">&lt;AllanH&gt; and as you say, in terms of performance, negligible difference</span></p><p><span
class="irc-date">[23:42]</span> <span
class="irc-black">&lt;AllanH&gt; but we DO like to show off ;)</span></p><p><span
class="irc-date">[23:42]</span> <span
class="irc-black">&lt;ParkinT&gt; If another developer (or even the future you) has difficulty deciphering the intent of an expression..</span></p><p><span
class="irc-date">[23:42]</span> <span
class="irc-black">&lt;ParkinT&gt; that translates into time which is money.</span></p><p><span
class="irc-date">[23:42]</span> <span
class="irc-black">&lt;ParkinT&gt; LOL  ABSOLUTELY.</span></p><p><span
class="irc-date">[23:42]</span> <span
class="irc-black">&lt;johnlacey&gt; I completely agree &#8211; readability is so important.</span></p><p><span
class="irc-date">[23:43]</span> <span
class="irc-black">&lt;AllanH&gt; lol add a comment that&#8217;s longer than the verbose code</span></p><p><span
class="irc-date">[23:43]</span> <span
class="irc-black">&lt;ParkinT&gt; Perhaps we should take a lesson from those puzzles on line (pun intended) and build a Regular Expression course on Learnables.</span></p><p><span
class="irc-date">[23:44]</span> <span
class="irc-black">&lt;grrowl&gt; irt \w compared to [a-z], \w is actually slower because it matches a LOT more than just a-z, including many other language&#8217;s &#8220;word&#8221; characters</span></p><p><span
class="irc-date">[23:44]</span> <span
class="irc-black">&lt;AllanH&gt; @ParkinT one for the MC?</span></p><p><span
class="irc-date">[23:46]</span> <span
class="irc-black">&lt;AllanH&gt; true indeed a &#8220;word&#8221; to Perl is not always an English word</span></p><p><span
class="irc-date">[23:47]</span> <span
class="irc-black">&lt;AllanH&gt; eg. my_function</span></p><p><span
class="irc-date">[23:47]</span> <span
class="irc-black">&lt;ParkinT&gt; At the same time, &#8220;what&#8217;s a few milliseconds among friends?&#8221;</span></p><p><span
class="irc-date">[23:48]</span> <span
class="irc-black">&lt;grrowl&gt; yes, the performance difference is very small&#8230; unless you&#8217;re specifically optimising that case, always go for the most readable code</span></p><p><span
class="irc-date">[23:49]</span> <span
class="irc-black">&lt;AllanH&gt; So I wonder what I would consider to be the basic essential things to &#8220;get&#8221; first. escape character comes to mind ;)</span></p><p><span
class="irc-date">[23:50]</span> <span
class="irc-black">&lt;AllanH&gt; and ^ start and $ end</span></p><p><span
class="irc-date">[23:50]</span> <span
class="irc-black">&lt;ParkinT&gt; In my experience the &#8216;basics&#8217; are those things you use most often.</span></p><p><span
class="irc-date">[23:50]</span> <span
class="irc-black">&lt;ParkinT&gt; Yes.  Start and end.  The quantity ? * + {.}</span></p><p><span
class="irc-date">[23:50]</span> <span
class="irc-black">&lt;ParkinT&gt; And (what I call) the shortcuts:  \w \W \s \S </span></p><p><span
class="irc-date">[23:51]</span> <span
class="irc-black">&lt;ParkinT&gt; \d</span></p><p><span
class="irc-date">[23:51]</span> <span
class="irc-black">&lt;ParkinT&gt; and the NOT  ^</span></p><p><span
class="irc-date">[23:51]</span> <span
class="irc-black">&lt;AllanH&gt; I use quantifiers all the time</span></p><p><span
class="irc-date">[23:51]</span> <span
class="irc-black">&lt;AllanH&gt; and character classes</span></p><p><span
class="irc-date">[23:51]</span> <span
class="irc-black">&lt;ParkinT&gt; It is important because MOST RegEx implementations are very greedy</span></p><p><span
class="irc-date">[23:52]</span> <span
class="irc-black">&lt;ParkinT&gt; Without the quantifiers you could match far beyond the point you intended.</span></p><p><span
class="irc-date">[23:53]</span> <span
class="irc-black">&lt;AllanH&gt; true how many times have I seen a thread where the OP wanted a single a tag but was getting the first a tag to the last</span></p><p><span
class="irc-date">[23:53]</span> <span
class="irc-black">&lt;ParkinT&gt; To follow up on an earlier comment, I have found this to be very, very instructive:  <a
href="http://regexcrossword.com/challenges/tutorial/puzzles/1">http://regexcrossword.com/challenges/tutorial/puzzles/1</a></span></p><p><span
class="irc-date">[23:54]</span> <span
class="irc-black">&lt;ParkinT&gt; Click on the HELP in the top navigation area</span></p><p><span
class="irc-date">[23:56]</span> <span
class="irc-black">&lt;ParkinT&gt; The history of Regular Expressions is very interesting.  It began before computers in any form like we know them today.</span></p><p><span
class="irc-date">[23:57]</span> <span
class="irc-black">&lt;ParkinT&gt; According to Wikipedia (<a
href="http://en.wikipedia.org/wiki/Regular_expression)" class="broken_link">http://en.wikipedia.org/wiki/Regular_expression)</a> around 1950.  I would venture to guess NONE of us here were around then.  And *I* am pretty old !!</span></p><p><span
class="irc-date">[23:58]</span> <span
class="irc-black">&lt;ParkinT&gt; Thanks to all of you for taking time to participate.</span></p><p><span
class="irc-date">[23:58]</span> <span
class="irc-black">&lt;ParkinT&gt; Sitepoint and Learnables represents an incredibly rich resource for modern web developers.</span></p><p><span
class="irc-date">[23:59]</span> <span
class="irc-black">&lt;nandotinoco&gt; Yes, unless anyone wants to ask a final question we should wrap the discussion up here.</span></p><p><span
class="irc-date">[23:59]</span> <span
class="irc-black">&lt;ParkinT&gt; If there is something about which you are passionate or feel very comfortable talking about, let us know.</span></p><p><span
class="irc-date">[23:59]</span> <span
class="irc-black">&lt;ParkinT&gt; An &#8216;expert&#8217; is often only the one who is willing to talk about it out loud.</span></p><p><span
class="irc-date">[23:59]</span> <span
class="irc-black">&lt;nandotinoco&gt; Thanks so much for your time AllanH and ParkinT and for sharing some of your knowledge</span></p><p><span
class="irc-date">[0:00]</span> <span
class="irc-black">&lt;AllanH&gt; I wanted to add that regex questions can be asked in other forums too</span></p><p><span
class="irc-date">[0:00]</span> <span
class="irc-black">&lt;ParkinT&gt; Sitepoint forums!!</span></p><p><span
class="irc-date">[0:00]</span> <span
class="irc-black">&lt;AllanH&gt; <a
href="http://www.sitepoint.com/forums/forumdisplay.php?34-PHP">http://www.sitepoint.com/forums/forumdisplay.php?34-PHP</a></span></p><p><span
class="irc-date">[0:00]</span> <span
class="irc-black">&lt;AllanH&gt; <a
href="http://www.sitepoint.com/forums/forumdisplay.php?15-JavaScript-amp-jQuery">http://www.sitepoint.com/forums/forumdisplay.php?15-JavaScript-amp-jQuery</a></span></p><p><span
class="irc-date">[0:00]</span> <span
class="irc-black">&lt;AllanH&gt; <a
href="http://www.sitepoint.com/forums/forumdisplay.php?36-Perl-amp-Python">http://www.sitepoint.com/forums/forumdisplay.php?36-Perl-amp-Python</a></span></p><p><span
class="irc-date">[0:01]</span> <span
class="irc-black">&lt;nandotinoco&gt; For sure. The forums are always there as a great resource. Thanks to everyone else for joining us. Next week we&#8217;re talking SASS</span></p><p><span
class="irc-date">[0:01]</span> <span
class="irc-black">&lt;ParkinT&gt; Next week we GET SASSY</span></p><p><span
class="irc-date">[0:02]</span> <span
class="irc-black">&lt;AllanH&gt; You&#8217;re most welcome nandotinoco, Thanks all</span></p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=L9TJ4-5nDvs:R5sHLiiREv4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=L9TJ4-5nDvs:R5sHLiiREv4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=L9TJ4-5nDvs:R5sHLiiREv4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=L9TJ4-5nDvs:R5sHLiiREv4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/L9TJ4-5nDvs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/regular-expressions-gotta-love-em/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/regular-expressions-gotta-love-em/</feedburner:origLink>
		</item>
		<item>
			<title>It’s Not Yours, It’s Mine: Framing Help Content with Personal Pronouns</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/JxKmUFHeyV4/</link>
			<comments>http://www.sitepoint.com/its-not-yours-its-mine-framing-help-content-with-personal-pronouns/#comments</comments>
			<pubDate>Fri, 14 Jun 2013 01:21:23 +0000</pubDate>
			<dc:creator>Georgina Laidlaw</dc:creator>
			<category><![CDATA[Content strategy]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66776</guid>
			<description><![CDATA[Do you respond better to "Open My Help File" or "Open Your Help File"? Does it make a difference? Georgia Laidlaw gets up close and personal with pronouns.]]></description>
			<content:encoded><![CDATA[<p></p><p>In an intriguing post earlier this year, Dustin Curtis <a
href="http://dcurt.is/yours-vs-mine">made the case for using the second-person possessive determiner</a>—<em>your</em>—when addressing users through the interface.</p><p>His post raises some interesting arguments for and against using &#8220;mine&#8221; (as in My Account, My Settings) and &#8220;your&#8221; (Your Profile, Your History), particularly in system interfaces.</p><p>Basically his arguments revolve around the issue of whether the interface is an extension of the user, or a tool that the user&#8217;s interacting with. And he ultimately decides the latter.</p><p>It&#8217;s an interesting discussion, but there are a couple of special cases where it can be helpful to cast the interface as an extension of the user. And one of them is Help content.</p><h2>It&#8217;s not yours, it&#8217;s mine</h2><p>The argument for having Help content take the first person (I, my, mine) rather than the second (you, yours) might seem obvious: help content is often presented as FAQs, and user questions are of course cast in the first person.</p><h3>FAQs</h3><p>Take a look at the recently reworked <a
href="http://99designs.com/help">99designs&#8217; help content</a> and imagine these questions in the second person:<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><ul><li>How do I write a good design brief?</li><li>What package should I choose for my contest?</li><li>How do I leave comments in my contest?</li></ul><p>These questions fit the first person because we know they&#8217;re asked in the first person. They read exactly as our inner voice says them. So to rephrase them in the second person would be passable at best, and incredibly jarring at worst.</p><h3>Help</h3><p>If you choose to build a Help Centre or Support page, though, things might well end up being less personal. Google&#8217;s <a
href="https://support.google.com/drive/">Drive help page</a> is a case in point. It follows Curtis&#8217;s tool-for-interaction arguments and presents the help as topics or subjects, in the second person:</p><ul><li>Install Google Drive on your computer</li><li>Enter links in a spreadsheet</li><li>Organize your files</li></ul><p>These shorter, topic-style headings can be easier to scan and comprehend, but what they gain in directness they pay for with personality. Google does a great job of presenting itself as a massive, impersonal behemoth, and its Drive help pages are no exception.</p><h3>Support</h3><p><a
href="http://evernote.com/">Evernote</a> strikes an interesting compromise between these two options. Its footer shows three support resource categories: Support Home, Knowledge Base and Forum.</p><p><a
href="http://evernote.com/contact/support/">Support Home</a> provides access to all Help resources, and it&#8217;s presented in the second person. Here, we&#8217;re interacting with the tool.</p><p
style="text-align: center"><a
href="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/Evernotesupporthome.png"><img
class="aligncenter  wp-image-66777" alt="Evernotesupporthome" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/Evernotesupporthome.png" width="603" height="433" /></a></p><p>The <a
href="http://evernote.com/contact/support/kb/#/product/evernote">Knowledge Base</a> acts sort of like an index and reveals that articles within the knowledge base itself are presented like the FAQs mentioned earlier—in the first person. To my mind, this provides a human aspect to the help content, especially in the context of a page that contains other less personal elements like guide titles and device category names.</p><p
style="text-align: center"><a
href="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/EvernoteKBhome.png"><img
class="aligncenter  wp-image-66778" alt="EvernoteKBhome" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/EvernoteKBhome.png" width="591" height="430" /></a></p><p>Finally, the <a
href="http://discussion.evernote.com/">Forums</a> take the whole FAQ idea that step further, with—as you&#8217;d expect—real questions being asked by real people. The question threads are arranged by topic, and the formulation of thread titles is as casual as you&#8217;d expect.</p><p>The most interesting point here? The forum thread titles frequently <em>imply</em> the first person, but don&#8217;t use the personal pronoun I.</p><p><a
href="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/Evernoteforum.png"><img
class="aligncenter size-full wp-image-66779" alt="Evernoteforum" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/Evernoteforum.png" width="366" height="123" /></a></p><p>Nonetheless, we get the full gamut of help with Evernote, from brand-built Guides, to brand-provided help seen through the lens of a user (FAQs), to the brand&#8217;s actual customers asking for and giving one another help, as well as getting it from Evernote staff.</p><h2>Help: it&#8217;s not just about you</h2><p>As these examples show, help is one area where the I/you debate can get tricky. The approach you use will likely depend on the way you&#8217;re framing or presenting your help content—as quick access to common issues (a la 99designs), or as thorough product documentation (as with Drive). (As a side note, this <a
href="http://www.g2meyer.com/usablehelp/singles/117.html">old but still very relevant post</a> makes the point against FAQs as product documentation.)</p><p>Beyond that issue, the way you present your help might also reflect something of your brand.</p><p>99designs is friendly, and it targets small businesses and entrepreneurs. Personal, helpful FAQs make sense here.</p><p>Google is a massive, formal web giant with a massive audience. Cold, impersonal help that gives the impression of having been set in stone by a legion of experts doesn&#8217;t seem inappropriate for this brand.</p><p>And Evernote strikes a balance between friendly and authoritative, maintaining a warmth in its help content despite using a range of means to organize and provide access to it. Evernote has extremely detailed help, and it could easily have gone the way of Google in presenting it. But it didn&#8217;t.</p><p>Do you refer to users as &#8220;I&#8221; or &#8220;you&#8221; in your help content? How does that reflect—and reflect on—your brand? I&#8217;d love to hear your thoughts in the comments.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=JxKmUFHeyV4:k70KQx4zFBg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=JxKmUFHeyV4:k70KQx4zFBg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=JxKmUFHeyV4:k70KQx4zFBg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=JxKmUFHeyV4:k70KQx4zFBg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/JxKmUFHeyV4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/its-not-yours-its-mine-framing-help-content-with-personal-pronouns/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/its-not-yours-its-mine-framing-help-content-with-personal-pronouns/</feedburner:origLink>
		</item>
		<item>
			<title>How to Explain SEO to a Sixth Grader</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/Klo14aVuDGI/</link>
			<comments>http://www.sitepoint.com/how-to-explain-seo-to-a-sixth-grader/#comments</comments>
			<pubDate>Wed, 12 Jun 2013 13:30:35 +0000</pubDate>
			<dc:creator>John Tabita</dc:creator>
			<category><![CDATA[Business]]></category>
			<category><![CDATA[Freelancing]]></category>
			<category><![CDATA[General business]]></category>
			<category><![CDATA[Marketing]]></category>
			<category><![CDATA[clients]]></category>
			<category><![CDATA[freelance]]></category>
			<category><![CDATA[freelancing]]></category>
			<category><![CDATA[sales]]></category>
			<category><![CDATA[selling]]></category>
			<category><![CDATA[selling your services]]></category>
			<category><![CDATA[small business]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66761</guid>
			<description><![CDATA[If your 12-year-old doesn't understand how SEO works, chances are neither will your client.]]></description>
			<content:encoded><![CDATA[<p></p><p>I’m not a technical SEO person, but I understand the technicalities of SEO well enough.</p><p
style="padding-left: 30px">Search engines use complex (and jealously guarded) mathematical formulas called algorithms to determine how sites rank, which is why no legitimate SEO firm can guarantee results. Many, however, resort to “black hat” SEO, which breaks the established rules and will eventually get your site banned from Google and the other search engines.</p><p
style="padding-left: 30px">Search engines do not actually search the web—they search their index (i.e, database) of the web. Web pages get placed in their index by automated computer programs, called spiders or bots, which crawl the web and add pages to their index. Until these bots find and index your site, there’s no way to appear in the search results.</p><p
style="padding-left: 30px">Obtaining top ranking in the search results requires both on-page and off-page optimization. On-page optimization is everything done to the individual pages of the site so that Google understands what each page is about. This starts with keyword research to determine the best converting keywords you can rank well for, given the competitiveness of your market. These keywords are then used in the title, heading, and throughout the pages of your site.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p
style="padding-left: 30px">Off-page optimization involves building backlinks from other authoritative websites to improve your PageRank, which is a link analysis metric applied by Google that assigns a rank to …</p><p
style="padding-left: 30px">Excuse me, Mr. Customer; you seem to be staring off into space. You say I lost you at “algorithms”? But I haven’t even gotten to canonicalization of URLs. Well okay, let me begin again …</p><h2>Algorithms, Spiders, and Bots—Oh My!</h2><p>I’m tasked with the job of teaching sales reps how to explain the complexity of SEO with simplicity; otherwise, they’ll never be able to sell it. The problem is, as technically correct as the above might be, is doesn’t answer the burning (and often unasked) question each and every prospect you encounter will have:</p><p><span
style="font-size: 18px;font-weight:bold;font-style:italic">“How will this help me make more money?”</span></p><p>To answer that question in a way that a sixth-grader can understand, you must sell SEO using The Concept of Expertise. It goes something like this.</p><p
style="padding-left: 30px">Someone who&#8217;s a recognized authority in a field tends to make more money than an amateur, wouldn’t you agree? Because an expert is more likely to be recommended by others and command higher prices, right? Can you tell me someone you consider an expert or authority in his field?</p><p
style="padding-left: 30px">What are some of the qualifications that make this person an expert in your eyes?</p><ul
style="padding-left: 30px"><li
style="padding-left: 30px">Years of experience in a field</li><li
style="padding-left: 30px">Recommendations from others</li><li
style="padding-left: 30px">Endorsements from top industry experts</li><li
style="padding-left: 30px">Depth, breadth, and quality of knowledge</li></ul><p
style="padding-left: 30px">SEO is just like that. It’s the work that goes into making <strong>your website</strong> an authority in the eyes of search engines like Google, so that they’ll “recommend” it to its users, by ranking you higher than your competition.</p><p
style="padding-left: 30px">Just like offline expertise, SEO requires both time and work. No one becomes an expert overnight, and certainly not without working at it.</p><p
style="padding-left: 30px">Right now, as far as Google’s concerned, your website is an amateur, so it isn’t going to recommend you. My job is to make it—and by extension, you—into an authority, so that they will. Does that make sense?</p><h2>Never Answer a Question Your Prospect Isn’t Asking</h2><p>That simple analogy may be all your prospect needs. But here’s where we get it wrong. We think the <em>more</em> we explain, the <em>better</em> the other person will understand.</p><p>Not so. If your prospect isn’t asking for more information, stop talking.</p><p>Sure, you could go on to explain how “years of experience” equates to the <strong>age of his website</strong>; how “recommendations from others” is like the <strong>number of inbound links from other related sites</strong>; that “endorsements from top industry experts” are <strong>quality links from other authoritative websites</strong>; and how “depth, breadth, and quality of knowledge” is comparable to the <strong>size of the website</strong> and amount of information found there. But why should you, unless he asks?</p><p>Always be prepared to explain the details. But keep in mind that you and I live and breathe this stuff; our prospects do not. The best approach is to spoon-feed them information until they’re satisfied. Confused prospects do not buy; so beware of over-explaining yourself out of a sale.</p><p>So how do you “explain SEO to a sixth grader”? What have you used that’s worked successfully? Post your experiences in the comments below.</p><p
style="text-align: right"><a
href="http://www.sxc.hu/profile/svilen001" target="_blank"><em>Image credit</em></a></p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Klo14aVuDGI:uWlnNUKFnRM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Klo14aVuDGI:uWlnNUKFnRM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=Klo14aVuDGI:uWlnNUKFnRM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=Klo14aVuDGI:uWlnNUKFnRM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/Klo14aVuDGI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/how-to-explain-seo-to-a-sixth-grader/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/how-to-explain-seo-to-a-sixth-grader/</feedburner:origLink>
		</item>
		<item>
			<title>Getting Started with Firefox OS: Hosted and Packaged Apps</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/5GsoPoBMuAk/</link>
			<comments>http://www.sitepoint.com/getting-started-with-firefox-os-hosted-and-packaged-apps/#comments</comments>
			<pubDate>Wed, 12 Jun 2013 13:16:09 +0000</pubDate>
			<dc:creator>Jeff Friesen</dc:creator>
			<category><![CDATA[BuildMobile]]></category>
			<category><![CDATA[Mobile]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66787</guid>
			<description><![CDATA[Jeff Friesen continues his introduction to the Firefox OS mobile operating system by delving into the world of hosted apps and packages apps.]]></description>
			<content:encoded><![CDATA[<p></p><p>Mozilla&#8217;s Firefox OS runs Web apps instead of native apps. In <a
href="http://www.sitepoint.com/getting-started-with-firefox-os/">Part 1</a> of my two-part series on getting started with this mobile operating system, I introduced Firefox OS and discussed setting up an environment for developing Web apps.</p><p>This article ends the series by introducing you to hosted and packaged apps, which are the two Web app categories supported by Firefox OS. I show you how to create each kind of app, and how to distribute the app via <a
href="https://marketplace.firefox.com/">Firefox OS Marketplace</a>.</p><h2>Discovering Hosted Apps</h2><p>Firefox OS supports <em>hosted apps</em>, which are websites turned into Web apps &#8212; the website is the app. Millions of websites already exist that can be easily turned into hosted apps, giving Firefox OS an exceptional competitive advantage.</p><h3>Creating a Hosted App</h3><p>Creating a hosted app is easy. From the dashboard, enter a website&#8217;s URL and click the <em>Add URL</em> button. For example, I entered my TutorTutor website&#8217;s <code>http://tutortutor.ca</code> URL, as shown in Figure 1.</p><p><img
class="alignnone size-full wp-image-66788" alt=" Enter a URL and click Add URL." src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure12.jpg" width="815" height="504" /><div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><p><strong>Figure 1:</strong> Enter a URL and click <em>Add URL</em>.</p><p>In response to clicking <em>Add URL</em>, the simulator starts running and displays part of my website&#8217;s main page &#8212; see Figure 2.</p><p><img
class="alignnone size-full wp-image-66789" alt="Drag the mouse over the simulator screen to view more of this Web page" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure22.jpg" width="981" height="660" /></p><p><strong>Figure 2:</strong> Drag the mouse over the simulator screen to view more of this Web page.</p><p>The dashboard creates a manifest file (discussed shortly) with default values and then <a
href="https://developer.mozilla.org/en-US/docs/Tools/Firefox_OS_Simulator#Manifest-validation">validates</a> it. According to Figure 2, validation resulted in a single warning message:</p><pre>app submission to the Marketplace needs at least an 128 icon</pre><p>The error message refers to my not having specified an icon for this app. Firefox OS Marketplace requires a submitted app to have a minimum of one icon whose dimensions are at least 128-by-128 pixels.</p><p>In the absence of an icon, the dashboard creates a default application icon for the home screen. When creating the app shown in Figure 2, the dashboard obtained this icon from my website&#8217;s <code>favicon.ico</code> file and scaled it up, as shown in Figure 3.</p><p><img
class="alignnone size-full wp-image-66790" alt=" An application icon based on favicon.ico was generated for tutortutor.ca." src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure32.jpg" width="366" height="601" /></p><p><strong>Figure 3:</strong> An application icon based on <code>favicon.ico</code> was generated for tutortutor.ca.</p><p>Every hosted and packaged app requires a <em>manifest</em>, a JSON file named <code>manifest.webapp</code>. The manifest provides information about the app such as version, name, description, icon location, and locale strings. The dashboard creates a manifest when it isn&#8217;t specified.</p><p>For example, Listing 1 presents a simple <code>manifest.webapp</code> file that describes my website&#8217;s <a
href="http://tutortutor.ca/cgi-bin/makepage.cgi?/software/Aquarium">Aquarium</a> page as a hosted app.</p><pre>{
  "name": "Aquarium",
  "description": "Observe several swimming fish.",
  "launch_path": "/cgi-bin/makepage.cgi?/software/Aquarium"
}</pre><p><strong>Listing 1:</strong> The <code>name</code> and <code>description</code> fields are required for hosted and packaged apps.</p><p>The <code>name</code> field identifies the app&#8217;s name, which is displayed on the simulator. The <code>description</code> field describes the app and has a maximum length of 1024 characters. The <code>launch_path</code> field identifies the location of the Web resource to be loaded.</p><table
border="1"><tbody><tr><th
bgcolor="#0000c0"><span
style="color: #ffffff;">Note</span></th></tr><tr><td>To learn more about the app manifest, check out Mozilla&#8217;s <a
href="https://developer.mozilla.org/en-US/docs/Web/Apps/Manifest">App manifest</a> and <a
href="https://developer.mozilla.org/en-US/docs/Web/Apps/FAQs/About_app_manifests">FAQs about app manifests</a> documentation.</td></tr></tbody></table><p>I uploaded this <code>manifest.webapp</code> file to my website&#8217;s root directory. However, before I could use the dashboard to add this app, I had to add the following MIME type to my Web server and associate it with the <code>.webapp</code> file extension:</p><pre>application/x-web-app-manifest+json</pre><p>App manifests must be served with a <code>Content-Type</code> header of <code>application/x-web-app-manifest+json</code>. Although not currently enforced by Firefox, it is enforced by Firefox OS Marketplace.</p><p>After accomplishing this task, I entered <code>http://tutortutor.ca/manifest.webapp</code> into the dashboard &#8212; see Figure 4.</p><p><img
class="alignnone size-full wp-image-66791" alt="Enter a manifest URL and click Add Manifest" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure41.jpg" width="816" height="502" /></p><p><strong>Figure 4:</strong> Enter a manifest URL and click <em>Add Manifest</em>.</p><p>In response to clicking <em>Add Manifest</em>, the simulator starts running and displays part of my website&#8217;s Aquarium page &#8212; see Figure 5.</p><p><img
class="alignnone size-full wp-image-66792" alt="rag the mouse over the simulator screen to view more of the aquarium" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure5.jpg" width="975" height="671" /></p><p><strong>Figure 5:</strong> Drag the mouse over the simulator screen to view more of the aquarium.</p><p>The dashboard validates the manifest, resulting in a &#8220;<code>Missing 'icons' in Manifest.</code>&#8221; warning message because I didn&#8217;t specify an <code>icons</code> field in the manifest. As a result, the dashboard chooses a default icon (there is no <code>favicon.ico</code> file in the launch path) &#8212; see Figure 6.</p><p><img
class="alignnone size-full wp-image-66793" alt="A default application icon is generated for Aquarium" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure6.jpg" width="368" height="603" /></p><p><strong>Figure 6:</strong> A default application icon is generated for Aquarium.</p><p>This app should have its own icon. According to the <a
href="http://www.mozilla.org/en-US/styleguide/products/firefoxos/icons/">Firefox OS app icons</a> page, the application icon is a 60-by-60-pixel image provided in 24-bit PNG format.</p><p>This page provides a list of do&#8217;s and don&#8217;ts, examples, and templates for creating your icons. I chose a blue rounded circle template along with a PNG-based overlay, created a small rectangular thumbnail image of an aquarium, and combined these images via an online tool.</p><p>Continuing, I named this file <code>60.png</code>, created an <code>/icons</code> directory on my Web server, and uploaded this file to that directory. Then, I modified the <code>manifest.webapp</code> file to look as follows, and uploaded it to my Web server&#8217;s root directory:</p><pre>{
  "name": "Aquarium",
  "description": "Observe several swimming fish.",
  "launch_path": "/cgi-bin/makepage.cgi?/software/Aquarium",
  "icons":
  {
    "60":  "/icons/60.png"
  }
}</pre><p>I started the simulator and observed the new icon on the home screen that&#8217;s shown in Figure 7.</p><p><img
class="alignnone size-full wp-image-66794" alt="My app icon consists of a rectangular aquarium image over a circle background" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure7.jpg" width="368" height="600" /></p><p><strong>Figure 7:</strong> My app icon consists of a rectangular aquarium image over a circle background.</p><h3>Distributing a Hosted App</h3><p>After creating a hosted app, you&#8217;ll want to distribute it, most likely through Firefox OS Marketplace. In this section, I&#8217;ll walk you this process, starting with steps for completing the app.</p><p>Firefox OS Marketplace requires that your app have at least a single icon, whose dimensions are at least 128-by-128 pixels. Therefore, you should create this icon and store it in an appropriate location on your Web server (and update <code>manifest.webapp</code>, appropriately).</p><p>There are a few other fields that you might want to specify in the manifest. For example, you might want to specify <code>developer</code> and <code>version</code> fields. Listing 2 shows you my final manifest file for the Aquarium app.</p><pre>{
  "name": "Aquarium",
  "description": "Observe several swimming fish.",
  "version": "1.0",
  "launch_path": "/cgi-bin/makepage.cgi?/software/Aquarium",
  "developer":
  {
    "name": "Jeff Friesen",
    "url": "http://tutortutor.ca"
  },
  "icons":
  {
    "128": "/icons/128.png",
    "60":  "/icons/60.png"
  }
}</pre><p><strong>Listing 2:</strong> I&#8217;ve added developer and version information to this manifest.</p><p>My final manifest references two icons. The 128-by-128-pixel icon in <code>128.png</code> is used by Firefox OS Marketplace when presenting the app, and the 60-by-60-pixel icon in <code>60.png</code> appears on the simulator home screen as the app icon.</p><p>Another item to consider is what the user will initially see when clicking the Aquarium icon. Figure 8 shows you that the aquarium shown in Figure 5 is not what the user initially sees.</p><p><img
class="alignnone size-full wp-image-66795" alt="The user doesn't initially see the aquarium with swimming fish. The page must be dragged until the aquarium is in view" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure8.jpg" width="370" height="597" /></p><p><strong>Figure 8:</strong> The user doesn&#8217;t initially see the aquarium with swimming fish. The page must be dragged until the aquarium is in view.</p><p>I created my website before smartphones and tablets became widespread and haven&#8217;t yet redesigned this site to make it mobile friendly. I could use <a
href="http://en.wikipedia.org/wiki/Media_queries">media queries</a> and <a
href="http://responsivedesign.ca/">responsive design</a> for this task.</p><table
border="1"><tbody><tr><th
bgcolor="#0000c0"><span
style="color: #ffffff;">Note</span></th></tr><tr><td>Mozilla provides extensive documentation on <a
href="https://developer.mozilla.org/en-US/docs/tag/Responsive%20Design">responsive design</a>.</td></tr></tbody></table><p>After completing your app, you can submit it to Firefox OS Marketplace. Begin by pointing your browser to the <a
href="https://marketplace.firefox.com/developers/submit/">submission page</a> and log in with your free Persona account.</p><p><img
class="alignnone size-full wp-image-66796" alt="You need to log in via your free Persona account" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure9.jpg" width="820" height="554" /></p><p><strong>Figure 9:</strong> You need to log in via your free Persona account.</p><p>After signing in, choose a device type, which would be Firefox OS, and enter the app manifest URL &#8212; see Figure 10.</p><p><img
class="alignnone size-full wp-image-66797" alt="Choose the Firefox OS device type and enter the app's manifest URL." src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure10.jpg" width="813" height="667" /></p><p><strong>Figure 10:</strong> Choose the Firefox OS device type and enter the app&#8217;s manifest URL.</p><p>The marketplace attempts to validate the app. When it reports validation successful, click the <em>Continue</em> button to fill out app details &#8212; see Figure 11.</p><p><img
class="alignnone size-full wp-image-66798" alt="The screen displays my 128-by-128-pixel icon. The description is taken from the manifest's description field" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure111.jpg" width="980" height="667" /></p><p><strong>Figure 11:</strong> The screen displays my 128-by-128-pixel icon. The description is taken from the manifest&#8217;s <code>description</code> field.</p><p>I&#8217;m not going to proceed because I don&#8217;t feel that Aquarium is ready for publication &#8212; I should employ responsive design to provide a better viewing experience when the user is taken to the page.</p><h2>Discovering Packaged Apps</h2><p>Firefox OS also supports <em>packaged apps</em>, which are Zip files containing all app assests: HTML, CSS, JavaScript, images, manifests, and so on. Unlike hosted apps, they are downloaded onto the device.</p><p>Packaged apps can access sensitive APIs and must be verified by the stores where they&#8217;re distributed. A store reviews the app and, if acceptable, signs the Zip file with the app&#8217;s private key, assuring the app&#8217;s users that the app has been reviewed for security and other issues.</p><p>There are three kinds of packaged apps:</p><ul><li><em>Privileged:</em> A privileged app is approved by the Firefox OS Marketplace via a special process. It provides more safety for users when an app wants access to certain sensitive APIs on a device, and is equivalent to a native app on a platform such as iOS or Android.</li></ul><ul><li><em>Certified:</em> A certified app is intended for a critical system function (e.g., a smartphone&#8217;s default dialer or system settings app). It&#8217;s used for critical functions on a Firefox OS phone, and isn&#8217;t intended for third-party apps &#8212; most app developers can disregard certified apps.</li></ul><ul><li><em>Plain Packaged:</em> A plain packaged app is a regular packaged app. It cannot use certain sensitive Web APIs. Firefox OS Marketplace signs it, but doesn&#8217;t perform the special authentication process used for privileged or certified apps.</li></ul><p>For more information on packaged apps (and especially how they differ from hosted apps), check out Mozilla&#8217;s <a
href="https://marketplace.firefox.com/developers/docs/packaged">Packaged Apps</a> document.</p><h3>Creating a Packaged App</h3><p>Creating a packaged app is also easy. To begin, you should set up a simple file and directory structure. For example, I created the following file and directory structure for a packaged app that obtains and displays the current geographic location:</p><pre>icons
   60.png
   128.png
js
   app.js
   jquery-1.10.1.min.js
index.html
manifest.webapp</pre><p>Listing 3 presents the contents of <code>index.html</code>.</p><pre>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Where am I?&lt;/title&gt;
      &lt;script src="js/jquery-1.10.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/app.js"&gt;&lt;/script&gt;
      &lt;style&gt;
      @media (orientation: landscape)
      {
         #map { float: right }
         #left { float: left }
      }
      &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="left"&gt;
      &lt;button id="whereami"&gt;
        Where am I?
      &lt;/button&gt;
      &lt;p&gt;
      Geolocation coordinates:
      &lt;p&gt;
      &lt;span id="latitude"&gt;&lt;/span&gt;
      &lt;p&gt;
      &lt;span id="longitude"&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;p&gt;
      &lt;div id="map"&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;</pre><p><strong>Listing 3:</strong> The <code>index.html</code> file is the app&#8217;s starting point.</p><p>Listing 3 describes the HTML that drives the app. The header includes a title (which a Firefox OS device may or may not use), a <code>script</code> tag that imports jQuery, a <code>script</code> tag that imports the app&#8217;s JavaScript logic, and a <code>style</code> tag (discussed shortly).</p><p>The app displays a button, followed by a <code>Geolocation coordinates:</code> label, followed by a couple of spans for displaying latitude and longitude, followed by a div for presenting a map image of the current location. These user-interface elements look okay in portrait mode.</p><p>In landscape mode, most of the map is cut off and there is excessive whitespace on the right. To improve the user interface, I&#8217;ve added a <code>style</code> tag whose media query floats the elements over the screen when the device is in landscape mode.</p><p>Listing 4 presents the contents of <code>app.js</code>.</p><pre>$(function()
{
   if (!("geolocation" in navigator))
   {
      $("#latitude").text("geolocation not available");
      return;
   }
   function getGeoData()
   {
      function success(position)
      {
         var latitude = position.coords.latitude;
         var longitude = position.coords.longitude;
         $("#latitude").text("Latitude: "+latitude);
         $("#longitude").text("Longitude: "+longitude);
         var img = new Image();
         img.src = "http://maps.googleapis.com/maps/api/staticmap?center="+
                   latitude+","+longitude+"&amp;zoom=13&amp;size=300x300&amp;sensor=false";
         var node = document.getElementById("map");
         node.removeChild(node.firstChild);
         node.appendChild(img);
      }
      function error(err)
      {
         $("#latitude").text("unavailable");
      }
      navigator.geolocation.getCurrentPosition(success, error);
   }
   $("#whereami").click(getGeoData);
});</pre><p><strong>Listing 4:</strong> The <code>app.js</code> file defines the app&#8217;s logic.</p><p>Listing 4 checks that the <code>navigator.geolocation</code> property exists, outputting a <code>geolocation not available</code> message when this property doesn&#8217;t exist. Also, it registers a click handler with the <code>whereami</code> button to invoke <code>getGeoData()</code> when the button is clicked.</p><p>The <code>getGeoData()</code> function first defines <code>success()</code> and <code>error()</code> functions to be called when the location can be obtained or not (perhaps the user doesn&#8217;t give permission). It then executes <code>navigator.geolocation.getCurrentPosition(success, error);</code>.</p><p>The user is asked to grant/deny permission. When granted and nothing goes wrong, <code>success()</code> is called with a <code>position</code> argument whose latitude and longitude are extracted and displayed. Also, a Google-based map for this position is obtained and displayed.</p><p>Listing 5 presents the contents of <code>manifest.webapp</code>.</p><pre>{
  "name": "Where am I?",
  "description": "This app tells you where you're located.",
  "version": "1.0",
  "launch_path": "/index.html",
  "developer":
  {
    "name": "Jeff Friesen",
    "url": "http://tutortutor.ca"
  },
  "icons":
  {
    "128": "/icons/128.png",
    "60":  "/icons/60.png"
  },
  "permissions":
  {
    "geolocation":
    {
      "description": "Needed to tell the user where they are"
    }
  }
}</pre><p><strong>Listing 5:</strong> Permission is needed to access the Geolocation API.</p><p>An app needs permission to access the Geolocation API. The name of this permission is <code>geolocation</code>, and it must appear as a subfield of a <code>permissions</code> field.</p><table
border="1"><tbody><tr><th
bgcolor="#0000c0"><span
style="color: #ffffff;">Note</span></th></tr><tr><td>Mozilla&#8217;s <a
href="https://developer.mozilla.org/en-US/docs/Web/Apps/App_permissions?redirectlocale=en-US&amp;redirectslug=Apps%2FApp_permissions">App permissions</a> document describes <code>geolocation</code> and also provides a complete list of permissions.</td></tr></tbody></table><p>Figure 12 shows the app running in portrait mode.</p><p><img
class="alignnone size-full wp-image-66799" alt="The 'Where am I?' app in portrait mode." src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure121.jpg" width="370" height="604" /></p><p><strong>Figure 12:</strong> The &#8216;Where am I?&#8217; app in portrait mode.</p><p>Figure 13 shows the app running in landscape mode.</p><p><img
class="alignnone size-full wp-image-66800" alt="The 'Where am I?' app in landscape mode" src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure13.jpg" width="530" height="439" /></p><p><strong>Figure 13:</strong> The &#8216;Where am I?&#8217; app in landscape mode.</p><h3>Distributing a Packaged App</h3><p>Before you can distribute a packaged app, you need to zip its file and directory structure into a Zip archive. For example, I archived &#8216;Where am I?&#8217;s file and directory structure (repeated below) into <code>whereami.zip</code>:</p><pre>icons
   60.png
   128.png
js
   app.js
   jquery-1.10.1.min.js
index.html
manifest.webapp</pre><p>You can now submit this packaged app to Firefox OS Marketplace. As when submitting a hosted app, point your browser to the <a
href="https://marketplace.firefox.com/developers/submit/">submission page</a> and log in with your free Persona account.</p><p>fter signing in, choose a device type, which would be Firefox OS. Then, click the <em>Packaged</em> tab, click the subsequent <em>Select a file&#8230;</em> button, and select the packaged app&#8217;s Zip file &#8212; see Figure 14.</p><p><img
class="alignnone size-full wp-image-66801" alt="The Zip file is automatically validated." src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/figure14.jpg" width="798" height="605" /></p><p><strong>Figure 14:</strong> The Zip file is automatically validated.</p><p>Click the <em>Continue</em> button and fill out app details on the resulting page. After filling out these details, click the <em>Continue</em> button again to have the app reviewed.</p><h2>Conclusion</h2><p>I&#8217;ve introduced hosted and packaged apps, and have shown you how to create and distribute each kind of Web app. To learn more about Firefox OS and app development, check out Mozilla&#8217;s extensive documentation at the following sites:</p><ul><li><a
href="https://marketplace.firefox.com/developers/">Firefox Marketplace Developer Hub</a></li><li><a
href="https://developer.mozilla.org/en-US/">Mozilla Developer Network</a></li></ul><p>Firefox OS&#8217;s focus on Web apps makes it an interesting alternative to Android, iOS, and other native-app-oriented mobile operating systems. With Firefox OS starting to gain momentum, now is a great time to start writing (and eventually monetizing) Web apps for this platform.</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=5GsoPoBMuAk:sXIBRzidjc4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=5GsoPoBMuAk:sXIBRzidjc4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=5GsoPoBMuAk:sXIBRzidjc4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=5GsoPoBMuAk:sXIBRzidjc4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/5GsoPoBMuAk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/getting-started-with-firefox-os-hosted-and-packaged-apps/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
			<series:name><![CDATA[Getting Started with Firefox OS]]></series:name>
			<feedburner:origLink>http://www.sitepoint.com/getting-started-with-firefox-os-hosted-and-packaged-apps/</feedburner:origLink>
		</item>
		<item>
			<title>Not Your Grandfather’s Open-source</title>
			<link>http://feedproxy.google.com/~r/SitepointFeed/~3/CEIp9NoMnkQ/</link>
			<comments>http://www.sitepoint.com/not-your-grandfathers-open-source/#comments</comments>
			<pubDate>Wed, 12 Jun 2013 12:31:40 +0000</pubDate>
			<dc:creator>Eran Galperin</dc:creator>
			<category><![CDATA[Open source]]></category>
			<category><![CDATA[Software Development]]></category>
			<guid isPermaLink="false">http://www.sitepoint.com/?p=66783</guid>
			<description><![CDATA[Veteran software engineer Eran Galperin looks at where open-source software development has been, where it is now and where it could go from here.]]></description>
			<content:encoded><![CDATA[<p></p><p>Open-source development is on the rise and the effects can be felt throughout the software development world. Hand in hand with the growth of the software engineering community, open-source has become mainstream over the last couple of decades, and is now one of the main building blocks of most software projects.</p><p>Business opportunities around open-source have evolved as well. Household names such as Redhat, MySQL and WordPress have shown that with the correct positioning and business model, open-source can be a huge business. Big companies and venture capital have taken note as well, funneling budgets and resources into open-source.</p><p>A common misconception about open-source is that it means code that is available for zero cost. The “Free” part of “Free open-source” talks about freedom (as in “free speech”) and not about zero cost (as in “free beer”) – the freedom to read, modify and redistribute the code. While there is natural resistance to spending money on something you are used to getting for free, commercially supporting open-source has only benefits in the long run.</p><p>Adding a commercial element to open-source leads to more funds being available to develop and improve open-source products, and for providing professional level support and integration services. This, in turn, reduces the total-cost-of-ownership – the costs associated with using and maintaining an open-source project that might have been provided “as-is” without commercial support.<div
id='div-gpt-ad-1328644474660-10' style='width:728px; height:90px;'> <script type='text/javascript'>googletag.cmd.push(function() { googletag.display('div-gpt-ad-1328644474660-10'); });</script> </div></p><h2>The economics of open-source</h2><p>Many look at the successes of Redhat and MySQL as outliers, and still consider open-source as a volunteer process. Hobbyist / volunteer open-source development will always be a big part of what open-source is, but many projects &#8211; as they reach a certain level of maturity and popularity &#8211; need to find some level of commercial support or face being bogged down by issue reports and feature requests, while core team members eventually move on to gigs that actually pay the bills.</p><p>At that point, open-source projects typically evolve in one of several ways:</p><ol><li>Project owners release control of the project to the community, and hopefully a team of contributors forms organically to maintain the project over time.</li><li>A big company, such as Google or Microsoft, takes ownership of the project and provides paid engineers to work on it full-time.</li><li>A dual-licensing model emerges where higher levels of support or features are included in commercial licenses only. This is often termed as “Commercial Open-Source”.</li></ol><p>The first option is certainly viable but can be risky – without someone taking ownership of a project, many times development by committee hits a wall and trails off as disagreements about direction and lack of accountability derail an otherwise well-meant effort.</p><p>The second option is not really something you can plan for – great when it happens but not something you can count on for sustaining an open-source project.</p><p>The third option is what I believe would be the future of most open-source project, as they transition from a hobby to a professional pursuit.  Using a dual-license model, with commercial licensing supporting the development of both community and enterprise versions. It’s a model that companies such as Redhat and MySQL used very effectively in building billion dollar businesses and enterprise grade products.</p><p>A professional approach to developing open-source products benefits even you, as the end user. The initial cost might rise (especially compared to *zero*), but the overall costs (the total-cost-of-ownership) are significantly reduced.</p><p>How many times did you use an open-source project that had a show-stopping issue (for you) that has been opened for over 2 years? Did you ever think to yourself – “I would pay the developer to fix this bug only so I could use this otherwise great product”? What about new features or customization that would take the original developer a fraction of the time to add compared to you and your team? This kind of thinking process happens every day at a score of software houses around the world. Wouldn’t it be great if that option actually existed?</p><h2>A big opportunity in a huge market. Are you excited yet?</h2><p>The software market is huge and growing fast, as software penetrates every aspect of our daily lives. As the industry matures and becomes more professional, so do the products that drive it – and especially open-source. With several big names and a host of small successes already in the books, commercial open-source products constantly prove this model works well, and benefits all sides involved.</p><p>Building a successful business is not easy regardless of the field, and it’s the same story with open-source products. The opportunity is there, and the time is now – as there are still relatively few professional open-source offerings, especially compared to the huge range of software projects that could benefit from it.</p><p>Most likely you have never considered building a business from releasing code. If I have opened your mind a bit for new business opportunities as a software developer, then my goal in writing this article has been achieved.</p><p>If you have any questions or comments – hit me up in the comments. Let&#8217;s talk about it!</p><div
class='after-content-widget-1'><div
id="sitepointcontextualcontentmanagerwidget-5" class="widget widget_sitepointcontextualcontentmanagerwidget"><style>.targettedEOF { width: 688px; font-family: "Open Sans", Helvetica, Arial, sans-serif; padding: 20px 2px 15px 20px; background-color: #DBF5FF; }
.targettedEOF .targettedEOFcolA { float: left; padding: 0; width: 440px; line-height: 1; }
.targettedEOF .targettedEOFcolB { float: left; padding: 0; width: 245px; }
.targettedEOF .targettedEOFbtn { clear: both; padding: 0; }
.targettedEOF h2 { margin-top: 0; font-size: 18px; font-weight: bold; margin-bottom: 0.7em; }
.targettedEOF p { margin-bottom: 1em; line-height: 1.467em; font-size: 15px;  }
.targettedEOF .sptolbCTA { border: 0 none; border-bottom: 2px solid #85bb41; background-color: #91c352; color: white; margin: 0; padding: 1em 1em; border-radius: 4px; vertical-align: middle; text-align: center; font-weight: 700; font-size: 17px; display: inline-block; line-height: 0; text-shadow: -1px -1px 1px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none;
}
.targettedEOF .sptolbCTA:hover { color: white; }
.targettedEOF .targettedEOFbtn p { padding: 0; margin: 0; }</style><div
class="targettedEOF"><div
class="targettedEOFcolA"> <a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails" style="line-height: 1;"><img
src="http://www.sitepoint.com/wp-content/uploads/1/files/2013/06/learn-ruby-on-rails-online.jpg" width="423"/></a></div><div
class="targettedEOFcolB"><h2><a
href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Get Started with<br
/>Ruby on Rails</a></h2><p>Github, Twitter and Hulu. All huge. All successful. All Rails.</p><p>Learn the web development framework of the moment with our newest book and course.</p><p
style="padding-bottom:0; margin-bottom:0; "><a
class="sptolbCTA" href="https://learnable.com/learn-ruby-on-rails?utm_source=SitePoint&utm_medium=EndofArticleTargetedPlacement&utm_campaign=LearnRubyonRails">Learn Rails</a></p></div><div
class="targettedEOFbtn"></div></div><div
class="dfp-ad show-desktop"><div
id="div-gpt-ad-1340873946991-4" style="width: 728px; height: 90px;"> <script type="text/javascript">googletag.cmd.push(function() { googletag.display("div-gpt-ad-1340873946991-4"); });</script> </div></div></div></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=CEIp9NoMnkQ:P5CyKNQlv2k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=CEIp9NoMnkQ:P5CyKNQlv2k:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/SitepointFeed?a=CEIp9NoMnkQ:P5CyKNQlv2k:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/SitepointFeed?i=CEIp9NoMnkQ:P5CyKNQlv2k:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/SitepointFeed/~4/CEIp9NoMnkQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.sitepoint.com/not-your-grandfathers-open-source/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
			<feedburner:origLink>http://www.sitepoint.com/not-your-grandfathers-open-source/</feedburner:origLink>
		</item>
	</channel>
</rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 18/38 queries in 0.159 seconds using memcached
Object Caching 1871/1903 objects using memcached

Served from: www.sitepoint.com @ 2013-06-19 02:28:39 -->