<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><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/" version="2.0">

<channel>
	<title>WebLinc Labs</title>
	
	<link>http://www.weblinc.com/labs</link>
	<description />
	<lastBuildDate>Wed, 15 May 2013 23:31:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/WeblincBlog" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="weblincblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Who’s Darren Hill?</title>
		<link>http://www.weblinc.com/labs/aboutdarren/</link>
		<comments>http://www.weblinc.com/labs/aboutdarren/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 18:00:22 +0000</pubDate>
		<dc:creator>Kristin Hodgson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=994</guid>
		<description><![CDATA[Perhaps you’d like to get to know a little bit more about Darren Hill, co-Founder and CEO of WebLinc, the eCommerce platform provider for Nasty Gal and Free People, one of URBN&#8217;s well-known brands. Well, you can, in a Philadelphia Business Journal article published on April 19, 2013, where Darren reveals some little known facts [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft  wp-image-1007" style="margin-top: 5px;" src="http://www.weblinc.com/labs/files/2013/04/darren1-300x300.jpg" alt="Photo of Darren Hill" width="100" height="100" />Perhaps you’d like to get to know a little bit more about Darren Hill, co-Founder and CEO of WebLinc, the eCommerce platform provider for Nasty Gal and Free People, one of URBN&#8217;s well-known brands. Well, you can, in a Philadelphia Business Journal article published on April 19, 2013, where Darren reveals some little known facts about himself including his first job, his yardstick of success, his life motto, and some true confessions. <a title="Philadelphia Business Journal " href="http://tinyurl.com/DarrenPBJ" target="_blank">Check it out</a>! Don’t have a subscription? No problem, just email us at <a href="mailto:pr@weblinc.com" target="_blank">pr@weblinc.com</a> and we’ll be happy to email it to you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/aboutdarren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>World Wide WebLinc</title>
		<link>http://www.weblinc.com/labs/weblincworldwide/</link>
		<comments>http://www.weblinc.com/labs/weblincworldwide/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 21:00:13 +0000</pubDate>
		<dc:creator>Kristin Hodgson</dc:creator>
				<category><![CDATA[eCommerce]]></category>
		<category><![CDATA[Philadelphia]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=983</guid>
		<description><![CDATA[In between dreaming up visions for the future of retail, Darren and WebLinc have been busy making their way around the globe, sometimes without even leaving Philadelphia. If you plan to fly Southwest Airlines before the end of April, look for a picture of Darren cleaning the sand from his briefcase in the airline’s Spirit [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1004" style="margin-top: 5px;" src="http://www.weblinc.com/labs/files/2013/04/office-75x75.jpg" alt="WebLinc Main Office" width="75" height="75" />In between dreaming up visions for the future of retail, Darren and WebLinc have been busy making their way around the globe, sometimes without even leaving Philadelphia. If you plan to fly Southwest Airlines before the end of April, look for a picture of Darren cleaning the sand from his briefcase in the airline’s <a title="April Spirit Magazine" href="http://tinyurl.com/DarrenSpirit" target="_blank">Spirit Magazine</a>. You’ll also see a photo of WebLinc’s headquarters kicking off a fantastic article about Philadelphia in the March 2013 edition of the <a title="March US Airways Magazine" href="http://tinyurl.com/WebLincUSAir" target="_blank">US Airways Magazine</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/weblincworldwide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Technically, It’s Philly Tech Week</title>
		<link>http://www.weblinc.com/labs/weblincptw/</link>
		<comments>http://www.weblinc.com/labs/weblincptw/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 20:34:57 +0000</pubDate>
		<dc:creator>Kristin Hodgson</dc:creator>
				<category><![CDATA[eCommerce]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Philadelphia]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=961</guid>
		<description><![CDATA[This is a very eventful week for the tech community in Philadelphia and WebLinc is excited to be part of it! Come see us on April 26th at the Mobile, Marketing, and eCommerce Trends event hosted by URBN at 3 p.m. Darren Hill, co-Founder and CEO of WebLinc eCommerce will share his vision for the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.weblinc.com/labs/weblincptw/philly-tech-week-logo/" rel="attachment wp-att-962"><img class="alignleft size-large wp-image-962" style="margin: 0px 15px 0px 0px" src="http://www.weblinc.com/labs/files/2013/04/Philly-Tech-Week-logo-300x66.png" alt="Philly Tech Week Logo" width="300" height="66" /></a>This is a very eventful week for the tech community in Philadelphia and WebLinc is excited to be part of it! Come see us on April 26th at the <em>Mobile, Marketing, and eCommerce Trends</em> event hosted by URBN at 3 p.m. Darren Hill, co-Founder and CEO of WebLinc eCommerce will share his vision for the future of retail during a 3-5 minute “lightning” talk presentation – <em>One-Retail &#8211; Consolidating the Multi-Channel Retail Experience.</em> He wants to enable and inspire retailers to create and manage a single shopping experience by bringing all points of sale together on a single platform. The benefit? A fully integrated customer experience and a dramatically enhanced merchant&#8217;s view of the customer regardless of whether they&#8217;re using a smart phone, iPad, or shopping in-store. It will be an enlightening conversation (no pun intended). Be sure to stay for the panel discussion afterwards. If you plan to attend the Signature event from 6-9 p.m., we’ll see you there!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/weblincptw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Front end SPOF in the wild</title>
		<link>http://www.weblinc.com/labs/front-end-spof-in-the-wild/</link>
		<comments>http://www.weblinc.com/labs/front-end-spof-in-the-wild/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 15:13:46 +0000</pubDate>
		<dc:creator>Chris Cressman</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[spof]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=938</guid>
		<description><![CDATA[Prologue The sun had long since disappeared behind the tall church steeple outside my office window. The office was dark, and it was a long walk over to that light switch on the other side of the room. Knowing I would soon be overcome by eye strain, I made the difficult decision to go home. [...]]]></description>
			<content:encoded><![CDATA[<h2>Prologue</h2>
<p>The sun had long since disappeared behind the tall church steeple outside my office window. The office was dark, and it was a long walk over to that light switch on the other side of the room. Knowing I would soon be overcome by eye strain, I made the difficult decision to go home.</p>
<p>The train station is a mile away by foot. I&#8217;d have to time it perfectly. So I opened my guide, the <a href="http://septa.org/">SEPTA home page</a>, and waited.</p>
<p>And waited&#8230;</p>
<p>Alas, nothing&#8230; Nothing but a blank white page.</p>
<h2>Chapter 1: Disenchantment</h2>
<p>This is the first time as a web user that I had experienced a front end <a href="http://www.stevesouders.com/blog/2010/06/01/frontend-spof/">single point of failure</a>, or SPOF. The point of failure this time was a script tag trying to load jQuery from Google&#8217;s CDN:</p>
<p><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;</code></p>
<p>This script element was inserted in the <code>&lt;head&gt;</code> of the document. When the request to this 3rd party domain failed (or was delayed longer than I was willing to wait), everything below it (including the entire <code>&lt;body&gt;</code>) was left patiently waiting, and I was left with a blank screen.</p>
<p>The problem, of course, is that script tags generally block the browser&#8217;s HTML parser. This situation could be improved by moving all scripts to the end of the <code>&lt;body&gt;</code>. In that case, the DOM could have at least rendered, but all JavaScript would have still been blocked, waiting for jQuery to show up. jQuery could also be loaded asynchronously to avoid blocking the rest of the page, but any scripts that depend on jQuery would still be left waiting until it arrives.</p>
<h2>Chapter 2: Burlesque</h2>
<p>The irony here is that something done to improve performance ended up crippling the site. Many developers choose to load jQuery from a CDN because, anecdotally, it makes sense. Other users will already have that file cached and will therefore have fewer bytes to download. However, we have <a href="http://www.stevesouders.com/blog/2013/03/18/http-archive-jquery/">data</a> that suggests otherwise. SEPTA is using jQuery 1.7.2 and according to Steve Souders&#8217; latest analysis in March 2012, only 1.1% of sites in his sample were loading that version of jQuery from the Google CDN. Loading JavaScript libraries from a CDN is a performance gamble that rarely pays off.</p>
<p>When you store blocking assets like JavaScript on a 3rd party server, your uptime now depends on that 3rd party server. Unless you have evidence that a JavaScript CDN is right for your app, consider bundling jQuery or other dependencies with your own JavaScript code and loading them from your own server.</p>
<p>Furthermore, JavaScript CDNs are not the only form of front end SPOF. Review <a href="http://zoompf.com/2013/03/the-many-kinds-of-spof">the many kinds of SPOF</a> for a look at others to be aware of.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/front-end-spof-in-the-wild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Big Image – A plugin for image zooming</title>
		<link>http://www.weblinc.com/labs/jquery-big-image/</link>
		<comments>http://www.weblinc.com/labs/jquery-big-image/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 13:10:56 +0000</pubDate>
		<dc:creator>Jenn Voss</dc:creator>
				<category><![CDATA[Lab Experiments]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=850</guid>
		<description><![CDATA[Overview jQuery Big Image is a plugin for image zooming that displays an enlarged image as the user hovers over the corresponding area of an existing image. It works well cross browser (even as far back as IE6) and has built in methods to init, change, and destroy the zoomed image for easy manipulation. Installation [...]]]></description>
			<content:encoded><![CDATA[<h2>Overview</h2>
<p><a href="https://github.com/weblinc/jquery-big-image">jQuery Big Image</a> is a plugin for image zooming that displays an enlarged image as the user hovers over the corresponding area of an existing image. It works well cross browser (even as far back as IE6) and has built in methods to init, change, and destroy the zoomed image for easy manipulation.</p>
<h2>Installation &amp; Setup</h2>
<p>Minimum requirements include an image tag wrapped in an anchor that points to the url of the enlarged image. Then simply include references to jQuery and Big Image, and call bigImage() on the anchor tag.<br />
<a href="http://www.weblinc.com/labs/2013/03/enter-your-zip-code-here/big-image-example-2/" rel="attachment wp-att-911"><img class="alignnone size-full wp-image-911" src="http://www.weblinc.com/labs/files/2013/03/big-image-example1.png" alt="" width="737" height="324" /></a></p>
<h2>Options</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>autostyle</td>
<td>true</td>
<td>Adds position:relative and z-index values to affected DOM elements as well as a 2px border around the maskElement. Set this to &#8216;false&#8217; if you prefer to keep all style information in your CSS files.</td>
</tr>
</tbody>
</table>
<h3>Zoom options</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>width</td>
<td>500</td>
<td>Sets the width of the maskElement.</td>
</tr>
<tr>
<td>height</td>
<td>500</td>
<td>Sets the height of the maskElement.</td>
</tr>
<tr>
<td>maskElement</td>
<td>&lt;div class=&#8221;zoom-mask&#8221;&gt;&lt;/div&gt;</td>
<td>Returns the element that contains the zoomed in image, which gets appended to the &lt;body&gt; tag.</td>
</tr>
</tbody>
</table>
<h3>Lens options</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default Value</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>element</td>
<td>&lt;div/&gt;</td>
<td>Returns the element that serves as a visual indicator of the zoomed in area by highlighting the corresponding portion of the smaller image. It gets appended to the element that bigImage() is called on.</td>
</tr>
<tr>
<td>loadingElement</td>
<td><span class="loading">Loading&#8230;</span></td>
<td>Returns the loadingElement which appears after the user has hovered over the image. It gets appended to the element that bigImage() is called on and is removed from the DOM once the zoomed image has loaded.</td>
</tr>
</tbody>
</table>
<h4>Extended options example</h4>
<p></p><pre class="crayon-plain-tag">$('a.zoom').bigImage({
    autostyle: true,
    zoom: {
        width: 600,
        height: 400,
        maskElement: function() {
            return $('&lt;div /&gt;', { 'class': 'zoom-mask' });
        }
    },
    lens: {
        element: '&lt;span /&gt;',
        loadingElement: '&lt;img src=&quot;loading.gif&quot; /&gt;'
    }
});</pre><p></p>
<h2>Methods</h2>
<h4>init</h4>
<p>init bigImage</p><pre class="crayon-plain-tag">$('a.zoom').bigImage('init');</pre><p></p>
<h4>destroy</h4>
<p>Destroys bigImage and unbinds all events</p><pre class="crayon-plain-tag">$('a.zoom').bigImage('destroy');</pre><p></p>
<h4>changeImage</h4>
<p>Updates the image urls that bigImage was originally called on</p><pre class="crayon-plain-tag">$('a.zoom').bigImage('changeImage', {
	smallImageUrl: $(this).find('img').attr('src'),
	largeImageUrl: $(this).attr('href')
});</pre><p></p>
<h2>Demo &amp; Screenshot</h2>
<p><a href="http://weblinc.github.com/jquery-big-image/">http://weblinc.github.com/jquery-big-image/</a></p>
<p><a href="http://www.weblinc.com/labs/2013/03/enter-your-zip-code-here/big-image-blog-screenshot/" rel="attachment wp-att-859"><img class="alignnone size-full wp-image-859" src="http://www.weblinc.com/labs/files/2013/03/big-image-blog-screenshot.jpg" alt="jQuery Big Image Screenshot" width="600" height="427" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/jquery-big-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chrome dev tools updates</title>
		<link>http://www.weblinc.com/labs/chrome-dev-tools-updates/</link>
		<comments>http://www.weblinc.com/labs/chrome-dev-tools-updates/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 13:05:41 +0000</pubDate>
		<dc:creator>Chris Cressman</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=893</guid>
		<description><![CDATA[A while back, The Chromium Blog covered new features in Chrome 25 Beta, including some improvements to Chrome Developer Tools. Chrome 25 has since been pushed into the stable channel, so let&#8217;s take a closer look at some of the dev tools updates. Console API Firebug&#8217;s console API has become a de facto standard supported [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, <a href="http://blog.chromium.org/">The Chromium Blog</a> covered <a href="http://blog.chromium.org/2013/01/content-security-policy-and-shadow-dom.html">new features in Chrome 25 Beta</a>, including some improvements to Chrome <a href="https://developers.google.com/chrome-developer-tools/">Developer Tools</a>. Chrome 25 has since been pushed into the stable channel, so let&#8217;s take a closer look at some of the dev tools updates.</p>
<h2>Console API</h2>
<p>Firebug&#8217;s <a href="http://getfirebug.com/wiki/index.php/Console_API">console API</a> has become a de facto standard supported by most modern browsers. However, Chrome has not supported the <a href="http://getfirebug.com/wiki/index.php/Console_API#console.clear.28.29"><code>console.clear()</code></a> method until now.</p>
<p>Debugging your code with <a href="http://getfirebug.com/wiki/index.php/Console_API#console.log.28object.5B.2C_object.2C_....5D.29"><code>console.log()</code></a> can be a mess if a disrespectful 3rd party script is logging its entire life story to the console. For these instances, clear the console before logging your own data.</p><pre class="crayon-plain-tag">// Clear out that 3rd party mess
console.clear();

// Log your own data
console.log(...);</pre><p>Another way to make your log statements stand out is to color them. Coloring <code>console.log()</code> statements has been around for a while, but now Chrome supports multiple colors within a single log statement.</p><pre class="crayon-plain-tag">console.log(
    &quot;%c PapayaWhip on Black %c LavenderBlush on DimGray &quot;,
    &quot;color: papayawhip; background-color: black&quot;,
    &quot;color: lavenderblush; background-color: dimgray&quot;
)</pre><p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/chrome-multiple-log-colors/" rel="attachment wp-att-900"><img class="alignnone size-full wp-image-900" src="http://www.weblinc.com/labs/files/2013/03/chrome-multiple-log-colors.png" alt="" width="817" height="606" /></a></p>
<h2>Top toolbar</h2>
<p>Moving above the console, you may have noticed the dev tools icons are gone from the top toolbar.</p>
<p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/chrome-no-icons/" rel="attachment wp-att-901"><img class="alignnone size-full wp-image-901" src="http://www.weblinc.com/labs/files/2013/03/chrome-no-icons.png" alt="" width="667" height="135" /></a></p>
<p>If you love and miss these icons, bringing them back is a checkbox away.</p>
<p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/chrome-icons-checkbox/" rel="attachment wp-att-899"><img class="alignnone size-full wp-image-899" src="http://www.weblinc.com/labs/files/2013/03/chrome-icons-checkbox.png" alt="" width="380" height="275" /></a></p>
<p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/chrome-with-icons/" rel="attachment wp-att-902"><img class="alignnone size-full wp-image-902" src="http://www.weblinc.com/labs/files/2013/03/chrome-with-icons.png" alt="" width="667" height="135" /></a></p>
<p>Use the settings cog in the lower right corner to access dev tools settings.</p>
<h2>Docking toggle</h2>
<p>In addition to toggling the icons on and off, you can toggle the position of the dev tools using the docking toggle icon in the lower left corner. Clicking the button toggles the dev tools pane between 2 positions. By default those positions are (1) the bottom of the main browser window and (2) the right of the main browser window. Click and hold the dock toggle button to open the dev tools in a separate window. Clicking the button again brings the dev tools back into the main window.</p>
<p>The three states of the docking toggle:</p>
<p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/chrome-docking-toggle-states/" rel="attachment wp-att-898"><img class="alignnone size-full wp-image-898" src="http://www.weblinc.com/labs/files/2013/03/chrome-docking-toggle-states.png" alt="" width="99" height="25" /></a></p>
<h2>Emulate CSS media types</h2>
<p>Returning to the dev tools settings, under &#8220;Overrides&#8221;, you will now find an option to emulate CSS media types. This can save a lot of time when writing CSS for alternate media types, particularly print.</p>
<p>Console API docs, screen media:</p>
<p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/console-api-docs-screen-media/" rel="attachment wp-att-905"><img class="alignnone size-full wp-image-905" src="http://www.weblinc.com/labs/files/2013/03/console-api-docs-screen-media.png" alt="" width="742" height="625" /></a></p>
<p>Console API docs, print media:</p>
<p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/console-api-docs-print-media/" rel="attachment wp-att-903"><img class="alignnone size-full wp-image-903" src="http://www.weblinc.com/labs/files/2013/03/console-api-docs-print-media.png" alt="" width="742" height="625" /></a></p>
<p>Note, however, emulating print media produces a different result than print preview.</p>
<p><a href="http://www.weblinc.com/labs/2013/03/chrome-dev-tools-updates/console-api-docs-print-preview/" rel="attachment wp-att-904"><img class="alignnone size-full wp-image-904" src="http://www.weblinc.com/labs/files/2013/03/console-api-docs-print-preview.png" alt="" width="408" height="343" /></a></p>
<p>Print preview hides background colors and images and may change the color of text to produce contrast where needed. Most print stylesheets depend on the browser to make these changes. However, by emulating the print media type, you can make those changes explicitly in your stylesheet and not depend on the assumption that the browser will do it for you.</p>
<h2>Sources editor</h2>
<p>Lastly, the <a href="http://codemirror.net/">CodeMirror</a> editor, replacing the default DevTools editor in the Sources Panel, was updated to version 3.</p>
<p>To see this editor in action, view a short <a href="http://remysharp.com/2012/12/21/my-workflow-never-having-to-leave-devtools/">screencast from Remy Sharp</a>.</p>
<p><a href="http://remysharp.com/2012/12/21/my-workflow-never-having-to-leave-devtools/" rel="attachment wp-att-897"><img class="alignnone size-full wp-image-897" src="http://www.weblinc.com/labs/files/2013/03/remy-sharp-screencast.jpg" alt="" width="612" height="344" /></a></p>
<h2>Availability</h2>
<p>Chrome 25 is now stable, so these updates are available to everyone. To get dev tools updates sooner, run <a href="https://www.google.com/intl/en/chrome/browser/canary.html">Chrome Canary</a>, or even better, run <a href="http://paulirish.com/2012/chrome-canary-for-developers/">Chrome and Canary side by side</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/chrome-dev-tools-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lint JavaScript while you type with SublimeLinter for Sublime Text 2</title>
		<link>http://www.weblinc.com/labs/lint-javascript-while-you-type-with-sublimelinter-for-sublime-text-2/</link>
		<comments>http://www.weblinc.com/labs/lint-javascript-while-you-type-with-sublimelinter-for-sublime-text-2/#comments</comments>
		<pubDate>Tue, 15 Jan 2013 15:46:21 +0000</pubDate>
		<dc:creator>Chris Cressman</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=798</guid>
		<description><![CDATA[SublimeLinter is a package for Sublime Text 2 that applies lint tools to your code while you type. SublimeLinter provides lint tools for many languages, but in this article I will look at JavaScript linting only. Why use a lint tool? You should use a lint tool to check your code for errors and conformance [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/SublimeLinter/SublimeLinter">SublimeLinter</a> is a package for <a href="http://www.sublimetext.com/2">Sublime Text 2</a> that applies lint tools to your code while you type. SublimeLinter provides lint tools for many languages, but in this article I will look at JavaScript linting only.</p>
<p><a href="http://www.weblinc.com/labs/2013/01/introduction-to-jslint/jslint-sublimelinter/" rel="attachment wp-att-794"><img class="alignnone size-full wp-image-794" src="http://www.weblinc.com/labs/files/2013/01/jslint-sublimelinter.png" alt="" width="494" height="210" /></a></p>
<h2>Why use a lint tool?</h2>
<p>You should use a lint tool to check your code for errors and conformance to a style guide. This is particularly important when working on teams, since code will be maintained by multiple developers over time. See my <a title="Introduction to JSLint" href="http://www.weblinc.com/labs/2013/01/introduction-to-jslint/">Introduction to JSLint</a> for a closer look at one JavaScript linter.</p>
<h2>Why SublimeLinter?</h2>
<p>There are several JavaScript linters for Sublime Text 2. Why SublimeLinter? In brief:</p>
<ul>
<li>It runs as you type. There&#8217;s no need to use the mouse or an extra key binding to trigger the linting. However, if you prefer to trigger the linting manually, there is an option to do so.</li>
<li>Inline highlighting shows you exactly where the errors are. Focus on one error at a time by clicking into a highlighted region and reading the message displayed in the status bar. If you find the outlining obtrusive, you can use margin highlighting instead.</li>
<li>Messages are displayed in the status bar&#8211;an existing space. The plugin does not open any new windows or panels to display its output.</li>
</ul>
<p>Installation and configuration are also simple, as outlined below:</p>
<h2>Install a JavaScript engine on your OS</h2>
<p>To use SublimeLinter&#8217;s JavaScript linting tools, you must have a JavaScript engine installed on your OS. Mac OS X includes a JavaScript engine, but Windows generally does not. I&#8217;m writing this on a Windows machine, so I went to the <a href="http://nodejs.org/">Node.js website</a>, clicked &#8220;Install&#8221;, and ran the MSI file to install Node.js. Linux users can generally install Node.js through your OS package manager. You do not need to install any additional Node.js packages&#8211;SublimeLinter bundles the other code it needs for JavaScript linting.</p>
<h2>Install the Package Control package for Sublime Text 2</h2>
<p>As a Sublime Text 2 user, you likely have <a href="http://wbond.net/sublime_packages/package_control">Package Control</a> installed already. If not, follow the instructions on the <a href="http://wbond.net/sublime_packages/package_control/installation">Package Control installation page</a>. Restart Sublime Text 2 after installing.</p>
<p>Although Package Control isn&#8217;t required to install SublimeLinter, installing with Package Control is fast and easy, and Package Control keeps your packages up to date.</p>
<h2>Install the SublimeLinter package for Sublime Text 2</h2>
<p>Open the Sublime Text 2 command palette (Command+Shift+P on Mac OS X, Control+Shift+P on Windows and Linux) and select <strong>Package Control: Install Package</strong>. Then, from the list of available packages, select <strong>SublimeLinter</strong>.</p>
<h2>Watch it work</h2>
<p>Restart Sublime Text 2 and open a JavaScript file. Type some code with an obvious error (like putting a dash in a variable name). SublimeLinter lints your code whenever you stop typing or save the file. The erroneous code you typed should now be outlined. Click into the outlined code to see a message from the lint tool in the Sublime Text status bar at the bottom of the editor.</p>
<h2>Configuration</h2>
<p>To configure which lint tool or which options are used, open the default settings (Preferences-&gt;Package Settings-&gt;SublimeLinter-&gt;Settings &#8211; Default) and your user settings (Preferences-&gt;Package Settings-&gt;SublimeLinter-&gt;Settings &#8211; User). You must make all changes in the user settings file, since changes to the default settings will be reverted if the package is ever updated. Using the default settings as a template, add any customizations you require to your user settings file. Remember to use valid JSON when working within Sublime Text 2 settings files.</p>
<h3>JSHint</h3>
<p>By default, JavaScript linting is handled by <a href="http://www.jshint.com/">JSHint</a>. To pass options to JSHint, add the <strong>jshint_options</strong> setting in your user settings file and pass in your desired options. See the <a href="http://www.jshint.com/docs/">JSHint documentation</a> for a list of options.</p>
<h3>JSLint</h3>
<p>If you&#8217;d prefer to use <a href="http://jslint.com/">JSLint</a>, change the <strong>javascript_linter</strong> setting to &#8220;jslint&#8221;. Use <strong>jslint_options</strong> to pass options to JSLint. See the <a href="http://www.jslint.com/lint.html">JSLint documentation</a> for a list of options.</p>
<h2>Wrap up</h2>
<p>And there you have it&#8211;fast and easy JavaScript linting while you type. Happy linting!</p>
<p>Thanks to Matt Wicks for his contributions to this article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/lint-javascript-while-you-type-with-sublimelinter-for-sublime-text-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to JSLint</title>
		<link>http://www.weblinc.com/labs/introduction-to-jslint/</link>
		<comments>http://www.weblinc.com/labs/introduction-to-jslint/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 15:19:21 +0000</pubDate>
		<dc:creator>Chris Cressman</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=793</guid>
		<description><![CDATA[What is JSLint? JSLint is an open source JavaScript code quality tool. It is designed to catch a variety of errors and enforces a particular style that removes parts of the language that are problematic or error prone when used by non-expert JavaScript developers. Code that passes JSLint is less likely to contain errors and [...]]]></description>
			<content:encoded><![CDATA[<h2>What is JSLint?</h2>
<p><a href="http://www.jslint.com/">JSLint</a> is an <a href="https://github.com/douglascrockford/JSLint">open source</a> JavaScript code quality tool. It is designed to catch a variety of errors and enforces a particular style that removes parts of the language that are problematic or error prone when used by non-expert JavaScript developers. Code that passes JSLint is less likely to contain errors and more likely to be readable and maintainable by JavaScript developers of varying skill levels.</p>
<h3>Style</h3>
<p>JSLint is <a href="http://stackoverflow.com/questions/802050/what-is-opinionated-software">opinionated software</a> written by <a href="http://crockford.com/">Douglas Crockford</a>. JSLint expects your code to be error free and to conform to <a href="http://javascript.crockford.com/code.html">Code conventions for the JavaScript programming language</a>, a style guide written by Crockford. You don&#8217;t necessarily need to study this style guide because JSLint will tell you when you&#8217;ve failed to conform to its guidelines. In my reading, however, I discovered two rules that are anachronistic and not checked by JSLint.</p>
<p>First:</p>
<blockquote><p>It is preferred that each variable be given its own line and comment. They should be listed in alphabetical order.</p></blockquote>
<p>This style has gone out of favor and JSLint now enforces a single <code>var</code> statement, which differs from the code examples shown in the style guide which use multiple <code>var</code> statements.</p>
<p>Also:</p>
<blockquote><p>Do not use $ (dollar sign) &#8230; in names.</p></blockquote>
<p>The ECMAScript specification reserves <code>$</code> for particular uses in names, but due to the popularity of libraries like jQuery and Prototype that use the dollar sign, this recommendation has fallen out of favor as well.</p>
<p>Additionally, Crockford&#8217;s style guide suggests limiting all lines to a length of 80 characters. You must pass <code>maxlen: 80</code> as an option to JSLint in order for JSLint to enforce this convention. See below for more on JSLint options.</p>
<h3>Expectations</h3>
<p>JSLint parses your code to look for specific syntax and idioms. It expects and does not expect certain things. Many of those expectations are described on the <a href="http://www.jslint.com/lint.html">JSLint documentation page</a>. JSLint provides a message and approximate line and column numbers for each potential error or style violation it reports. Many of JSLint&#8217;s messages correspond to expectations listed on the JSLint documentation page, while others do not. If you don&#8217;t understand the messages provided by JSLint, a search on <a href="https://www.google.com/">Google</a> or <a href="http://stackoverflow.com/">Stack Overflow</a> will usually provide an explanation. JSLint has been around for a long time and is used by many people, so its expectations are well documented, just not necessarily in one place.</p>
<p>Image: JSLint expects only one <code>var</code> statement per function:</p>
<p><a href="http://www.weblinc.com/labs/2013/01/introduction-to-jslint/jslint-sublimelinter/" rel="attachment wp-att-794"><img class="alignnone size-full wp-image-794" src="http://www.weblinc.com/labs/files/2013/01/jslint-sublimelinter.png" alt="" width="494" height="210" /></a></p>
<h3>Options &amp; directives</h3>
<p>JSLint allows a certain amount of customization through options and directives. JSLint provides a variety of <a href="http://www.jslint.com/lint.html#options">options</a> to configure JSLint&#8217;s expectations. How you pass options to JSLint depends on how you are running JSLint (more on running JSLint below). You may end up passing an options hash to the JSLint function or editing a JSON file to set options. However, a method that works across all implementations is to add directives within the code you are linting. This is done in the form of comments that begin with <code>global</code>, <code>properties</code>, or <code>jslint</code>.</p>
<p>JSLint directives follow one of two formats:</p><pre class="crayon-plain-tag">/*directive name, name, name */</pre><p>Or:</p><pre class="crayon-plain-tag">/*directive name: value, name: value, name: value */</pre><p></p>
<h4>Global directive</h4>
<p>Use the <a href="http://www.jslint.com/lint.html#global"><code>global</code> directive</a> to allow one or more global variables in your code. This is useful when working with libraries that depend on a global variable such as jQuery or Underscore:</p><pre class="crayon-plain-tag">/*global $, _ */</pre><p>Add a value of <code>true</code> if you expect to modify the value of a global variable. By default, JSLint sets this option to <code>false</code> for each global:</p><pre class="crayon-plain-tag">/*global myGlobal: true */</pre><p></p>
<h4>Properties directive</h4>
<p>Use the <a href="http://www.jslint.com/lint.html#properties"><code>properties</code> directive</a> to allow JSLint to check the spelling of your object properties. See the <a href="http://www.jslint.com/lint.html#properties">documentation</a> for further explanation.</p>
<h4>JSLint directive</h4>
<p>Use the <a href="http://www.jslint.com/lint.html#options"><code>jslint</code> directive</a> to configure JSLint <a href="http://www.jslint.com/lint.html#options">options</a>. For example, you may want to use web browser host objects such as <code>window</code>, <code>document</code>, and <code>alert</code> in your code. You could pass these in as globals using the <code>global</code> directive, or add them all at once using the <code>browser</code> environment option:</p><pre class="crayon-plain-tag">/*jslint browser: true */</pre><p>A <code>jslint</code> directive can be placed at the top of a file to apply the options to the entire file or at the top of a function to apply the options to that function only. Multiple <code>jslint</code> directives can be used.</p>
<p>To know what options are available, refer to the <a href="http://www.jslint.com/lint.html#options">options</a> section of the documentation, or toggle options on and off using the <a href="http://www.jslint.com/">JSLint web app</a>. As you toggle options in the web GUI, the JSLint directive at the bottom of the screen is updated to match. This is a convenient way to access JSLint&#8217;s most commonly used options.</p>
<p>Image: The JSLint options GUI and directive output:</p>
<p><a href="http://www.weblinc.com/labs/2013/01/introduction-to-jslint/jslint-options-web-2/" rel="attachment wp-att-796"><img class="alignnone size-full wp-image-796" src="http://www.weblinc.com/labs/files/2013/01/jslint-options-web1.png" alt="" width="507" height="811" /></a></p>
<h2>Running JSLint</h2>
<p>JSLint is written entirely in JavaScript and can therefore be used anywhere JavaScript can run. For this article, I&#8217;ll simply mention some of the possibilities:</p>
<ul>
<li>Use the <a href="http://www.jslint.com/">web app</a>.</li>
<li>Install a plugin in your code editor.</li>
<li>Run a command line script on your machine.</li>
<li>Add JSLint to a build script.</li>
</ul>
<p>I use the SublimeLinter plugin for Sublime Text 2. I describe the benefits of this plugin and how to install and configure it in <a title="Lint JavaScript while you type with SublimeLinter for Sublime Text 2" href="http://www.weblinc.com/labs/2013/01/lint-javascript-while-you-type-with-sublimelinter-for-sublime-text-2/">another article</a>.</p>
<h2>Alternatives</h2>
<p>We&#8217;ve determined that JSLint is the right tool for our client side team at WebLinc, but other lint tools are available, and one may be a better fit for your team. Perhaps in a future post I&#8217;ll compare these popular lint tools:</p>
<ul>
<li><a href="http://www.jslint.com/">JSLint</a></li>
<li><a href="http://jshint.com/">JSHint</a></li>
<li><a href="https://developers.google.com/closure/utilities/">Closure Linter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/introduction-to-jslint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maintain your chain with jQuery .tap()</title>
		<link>http://www.weblinc.com/labs/maintain-your-chain-with-jquery-tap/</link>
		<comments>http://www.weblinc.com/labs/maintain-your-chain-with-jquery-tap/#comments</comments>
		<pubDate>Mon, 14 Jan 2013 15:14:23 +0000</pubDate>
		<dc:creator>Chris Cressman</dc:creator>
				<category><![CDATA[eCommerce]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=790</guid>
		<description><![CDATA[Method chains are commonplace in jQuery. A typical jQuery pattern is to chain several method calls onto a jQuery object representing a selection from the DOM: [crayon-519435843d06d/] In order to continue a chain, each method must return an object to be the subject of the next method call. If you want to execute a function [...]]]></description>
			<content:encoded><![CDATA[<p>Method chains are commonplace in jQuery. A typical jQuery pattern is to chain several method calls onto a jQuery object representing a selection from the DOM:</p><pre class="crayon-plain-tag">$('#nav li')
    .removeClass('selected')
    .filter(':first')
    .addClass('selected');</pre><p>In order to continue a chain, each method must return an object to be the subject of the next method call. If you want to execute a function that doesn&#8217;t return an object, you have to break your chain. <code>Tap</code> is a method that lets you interrupt the chain to execute a callback, but always returns the object you started with to allow the chain to continue.</p>
<h2>UI example</h2>
<p>Consider the following requirements for a user interface:</p>
<ol>
<li>Make a dialog from a string of HTML.</li>
<li>Run code to init some UI widgets, but only those inside the dialog. This affects the dialog&#8217;s size.</li>
<li>Reposition the dialog since its size has changed.</li>
</ol>
<p>Let&#8217;s assume we have a jQuery plugin to handle the dialog functionality, and we are using another library to init the widgets.</p>
<p>Without tap, the jQuery code for this feature could look something like this:</p><pre class="crayon-plain-tag">var myDialog = $(htmlString).dialog({action: makeDialog});
initWidgets({scope: myDialog});
myDialog.dialog({action: centerDialog});</pre><p>Our <code>initWidgets</code> library method does not return an object, so we need three separate expression statements and a variable to cache the jQuery object we are working with.</p>
<p>With <code>tap</code>, we could do something like this:</p><pre class="crayon-plain-tag">$(htmlString)
    .dialog({action: makeDialog})
    .tap(function () {
        initWidgets({scope: this})
    })
    .dialog({action: centerDialog});</pre><p>Tap provides the the context—the <code>this</code> value—of our original jQuery object to <code>initWidgets</code>, but it also returns the jQuery object so we can continue chaining. In my opinion, this example is easier to read and feels more jQuery-like than the previous example.</p>
<h2>Debugging example</h2>
<p>Tap could also be used when debugging. In the following (contrived) example we log data without breaking out of a method chain:</p><pre class="crayon-plain-tag">$('#main')
    .children()
    .first()
    // insert tap method here to see what we've selected so far
    .tap(function () {
        console.log(this);
    })
    .nextUntil('ul')
    .children()
    // and so on</pre><p></p>
<h2>Implementation</h2>
<p>Tap is not part of the jQuery API, so you&#8217;ll need to add this method to every jQuery object. Here is a minimal implementation:</p><pre class="crayon-plain-tag">$.fn.tap = function (callback) {
    callback.apply(this);
    return this;
};</pre><p>Also refer to tap as implemented in <a href="http://underscorejs.org/#tap">Underscore.js</a> and <a href="http://ruby-doc.org/core-1.9.3/Object.html#method-i-tap">Ruby 1.9.3</a>. Add your preferred implementation as a jQuery plugin and tap those chains!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/maintain-your-chain-with-jquery-tap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your Team Needs an Internal Blog</title>
		<link>http://www.weblinc.com/labs/your-team-needs-an-internal-blog/</link>
		<comments>http://www.weblinc.com/labs/your-team-needs-an-internal-blog/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 14:19:15 +0000</pubDate>
		<dc:creator>James Van Arsdale III</dc:creator>
				<category><![CDATA[Digital Culture]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://www.weblinc.com/labs/?p=630</guid>
		<description><![CDATA[Whether you build software, websites, Mack trucks, or Acme Widgets &#8211; your team of employees need an internal blog. For the sake of clarity, here is how I define the term &#8220;blog&#8221; in this context: a centralized repository of content that is able to be searched, categorized and historically archived. Modern blogging software (WordPress, Blogger, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.weblinc.com/labs/2012/12/your-team-needs-an-internal-blog/team-blog/" rel="attachment wp-att-768"><img class="alignright size-full wp-image-768" title="Your team needs an internal blog" src="http://www.weblinc.com/labs/files/2012/12/team-blog.png" alt="Your team needs an internal blog" width="187" height="187" /></a>Whether you build software, websites, Mack trucks, or Acme Widgets &#8211; your team of employees need an internal blog. For the sake of clarity, here is how I define the term &#8220;blog&#8221; in this context: a centralized repository of content that is able to be searched, categorized and historically archived. Modern blogging software (WordPress, Blogger, etc) is often the best tool for this job.</p>
<p>The features of a blog allow team members to write down their ideas, talk about important changes, as well as post interesting articles that are relevant to the team. A lot of companies handle this by holding meetings or composing emails, but if you&#8217;re not invited &#8211; you&#8217;re not privy to the information. By creating a centralized place where your employees can share their thoughts with their team members, you&#8217;re empowering them to build a better product. Not only are you helping existing team members, but when demand spikes, and you need to add additional resources to the team, you now have a repository of information to help the new resource get up to speed. Often times, adding a resource will help you identify additional topics that need to be covered on the blog.</p>
<p>Here at WebLinc, we utilize an internal blog (per team) to post interesting articles, techniques, and new technology. This allows us to stay on top of ever-changing web technologies. Some members end up participating more than others, but even if a team member isn&#8217;t posting to the blog, they&#8217;re still consuming its content and participating in the team.</p>
<p>The blog is a starting point to help your team communicate and share knowledge. There are plenty of other hurdles to building a better end product, but this will help the discussion get started.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weblinc.com/labs/your-team-needs-an-internal-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
