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

<channel>
	<title>habdas.org</title>
	<atom:link href="http://www.habdas.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.habdas.org</link>
	<description>A tech blog from the Silicon Prairie</description>
	<lastBuildDate>Thu, 30 May 2013 07:42:28 +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>
		<item>
		<title>The Holy Grail: Full-stack JavaScript MVC with Rendr</title>
		<link>http://www.habdas.org/holy-grail-full-stack-javascript-mvc-rendr/</link>
		<comments>http://www.habdas.org/holy-grail-full-stack-javascript-mvc-rendr/#comments</comments>
		<pubDate>Wed, 01 May 2013 02:13:06 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Rich Internet Application]]></category>

		<guid isPermaLink="false">http://www.habdas.org/?p=3818</guid>
		<description><![CDATA[<p>Spike at Airbnb just mentioned during a live TechTalk webcast that the Rendr framework they built was open sourced earlier this month: https://github.com/airbnb/rendr. The framework leverages Node.js and Backbone.js to allow full-stack JavaScript MVC using a common set of code–greatly improving time to content, improving crawability, and reduces overall application complexity. During the talk, Meteor and [...]</p><p>The post <a href="http://www.habdas.org/holy-grail-full-stack-javascript-mvc-rendr/">The Holy Grail: Full-stack JavaScript MVC with Rendr</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Spike at Airbnb just mentioned during a live TechTalk webcast that the Rendr framework they built was open sourced earlier this month: <a href="https://github.com/airbnb/rendr">https://github.com/airbnb/rendr</a>. The framework leverages Node.js and Backbone.js to allow full-stack JavaScript MVC using a common set of code–greatly improving time to content, improving crawability, and reduces overall application complexity.</p>
<p>During the talk, Meteor and Derby were mentioned, and Mojito *sigh*. And Stitch was also mentioned, as a part of the stack they&#8217;re using. So anyway, there you have it. The Holy Grail <a href="/holy-grail-rich-internet-applications/">I talked about</a>. It&#8217;s out, but admittedly, according to Spike, not quite &#8220;finished&#8221;. Caveat emptor.</p>
<p>Later in the talk Spike mentions they were heavily inspired by Chaplin, which you can set up quickly by reading my recent post on <a title="Developing modern web applications on Windows with Vagrant" href="http://www.habdas.org/developing-modern-web-applications-on-windows-vagrant/">developing modern web applications</a>.</p>
<p>The post <a href="http://www.habdas.org/holy-grail-full-stack-javascript-mvc-rendr/">The Holy Grail: Full-stack JavaScript MVC with Rendr</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/holy-grail-full-stack-javascript-mvc-rendr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing modern web applications on Windows with Vagrant</title>
		<link>http://www.habdas.org/developing-modern-web-applications-on-windows-vagrant/</link>
		<comments>http://www.habdas.org/developing-modern-web-applications-on-windows-vagrant/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 00:09:17 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[Rich Internet Application]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.habdas.org/?p=3757</guid>
		<description><![CDATA[<p>I earlier this month I spent way too much time writing an article on how to SFTP to Ubuntu Server with Sublime Text. The purpose of the SFTP effort was to set myself up for developing modern web applications on a new Windows 8 machine I bought to play SimCity 2013. And after getting everything working I realized [...]</p><p>The post <a href="http://www.habdas.org/developing-modern-web-applications-on-windows-vagrant/">Developing modern web applications on Windows with Vagrant</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I earlier this month I spent <a href="https://twitter.com/jhabdas/status/319213133287788545">way too much time</a> writing an article on how to <a href="/sftp-to-ubuntu-server-sublime-text">SFTP to Ubuntu Server with Sublime Text</a>. The purpose of the SFTP effort was to set myself up for developing modern web applications on a new Windows 8 machine I bought to play SimCity 2013. And after getting everything working I realized the SFTP method had some gremlins and the file syncing reminded me of Dreamweaver–it simply wasn&#8217;t fast enough.</p>
<p>Lately, unless you were running a Linux machine or had the pleasure of owning a Mac with OS X, developing modern web applications has been a bit of a kludge. Enter Vagrant.</p>
<blockquote><p>Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development/production parity, and makes the &#8220;works on my machine&#8221; excuse a relic of the past.</p></blockquote>
<p>In this article I&#8217;ll explain how to set up a development environment in Windows using a virtualized Linux box, suitable for rapid prototyping. Then I&#8217;ll take it a step further and explain how to integrate a Backbone-based application framework with Vagrant and Sublime Text, greatly increasing the speed for developing modern web applications on Windows.</p>
<p><span id="more-3757"></span></p>
<h2>Applications used</h2>
<p>The following core applications will be used to pull off this little stunt. The only one that costs money is Windows. <b>Download and install</b> all of these before moving forward:</p>
<ul>
<li><a href="http://windows.microsoft.com/">Windows</a>. Where do you want to go today?</li>
<li><a href="http://windows.github.com/">Git for Windows</a>. We&#8217;ll be using this for the Git Shell that comes with it.</li>
<li><a href="http://www.vagrantup.com/">Vagrant</a>. Described above in marketing jargon. It does stuff with virtual machines.</li>
<li><a href="https://www.virtualbox.org/">VirtualBox</a>. Open Source virtualization software.</li>
<li><a href="http://www.sublimetext.com/">Sublime Text</a>. Wicked quick code editor. Nagware.</li>
<li><a href="http://www.google.com/chrome/">Google Chrome</a>. Make this your default browser.<a title="Switching from Firebug to Chrome Dev Tools" href="http://www.habdas.org/switching-from-firebug-to-chrome-dev-tools/" target="_blank"><br />
</a></li>
</ul>
<p>This article will touch on or use a number of ancillary programs. These are free as well. Do <em>not</em> try and download these now; they will be installed and used at specific points during the article.</p>
<ul>
<li><a href="http://www.ubuntu.com/">Ubuntu</a>. Currently the most popular flavor of Linux out there.</li>
<li><a href="http://www.gnu.org/software/bash/manual/bashref.html#What-is-Bash_003f">Bash</a>. A Unix shell. Will be used inside the Git Shell, which actually uses the Windows PowerShell by default. Result? Shellception.</li>
<li><a href="http://wiki.nginx.org/">Nginx</a>. A web server and reverse proxy. It does email too.</li>
<li><a href="http://nodejs.org/">Node.js</a>. A server-side JS engine. Will be used for compiling application sources.</li>
<li><a href="http://curl.haxx.se/">curl</a>. Allows us to test the web server for an HTTP response, and more.</li>
<li><a href="http://brunch.io/">Brunch</a>. An easy-to-use HTML5 application assembler.</li>
</ul>
<p>Once the specified applications are installed it&#8217;s time to start configuring the dev environment.</p>
<h2>Configure the development environment</h2>
<p>Once the core applications are installed, start configuring the development environment.</p>
<p>First, open Git Shell from Windows and, at the command prompt, follow the simple <a href="http://docs.vagrantup.com/v2/getting-started/">Vagrant Getting Started</a> instructions. This will download a Linux image for the <abbr title="Virtual Machine">VM</abbr>, install and start it.</p>
<p><b>Note:</b> The following steps will assume Vagrant installs Ubuntu 12.04 <abbr title="Long-Term Support">LTS</abbr>, though other operating systems and versions are likely to be used in the future.</p>
<p>After the virtual machine starts, connect to it with <a href="http://docs.vagrantup.com/v2/getting-started/up.html">Vagrant SSH</a>. Once at the <abbr title="Bourne-again shell">bash</abbr> prompt, pictured below, type <kbd>pwd</kbd> to confirm the current directory is the vagrant home directory.</p>
<div id="attachment_3763" class="wp-caption alignleft" style="width: 887px"><a href="http://www.habdas.org/wp-content/uploads/2013/04/powershell-vagrant.png"><img class="lazy size-full wp-image-3763  " alt="Screenshot of Ubuntu SSH log-in with Vagrant using Git Shell" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://www.habdas.org/wp-content/uploads/2013/04/powershell-vagrant.png" width="877" height="187" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3763  " alt="Screenshot of Ubuntu SSH log-in with Vagrant using Git Shell" src="http://www.habdas.org/wp-content/uploads/2013/04/powershell-vagrant.png" width="877" height="187" /></noscript></a> Screenshot of Ubuntu SSH log-in with Vagrant using Git Shell</p></div>
<p>Then, from the prompt, run the following commands, in sequence, and accepting any intermediate prompts presented, to <a href="https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager">install Node.js</a>, Nginx and curl, set-up Vagrant <a href="http://docs.vagrantup.com/v2/getting-started/synced_folders.html">synced folders</a> and start the web server.</p>
<pre>sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install nginx
sudo apt-get install curl
sudo mv /usr/share/nginx/www /vagrant
sudo ln -fs /vagrant/www /usr/share/nginx/www
sudo /usr/sbin/nginx</pre>
<p>Once complete, execute <kbd>curl localhost</kbd> at the bash prompt to verify the web server started and is sending an expected HTTP response, as shown below.</p>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Welcome to nginx!&lt;/title&gt;
&lt;/head&gt;
&lt;body bgcolor="white" text="black"&gt;
&lt;center&gt;&lt;h1&gt;Welcome to nginx!&lt;/h1&gt;&lt;/center&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>If the response is successful, <a href="http://docs.vagrantup.com/v2/getting-started/networking.html">network the VM</a> with Windows–the host machine–by editing the Vagrantfile (a text file created when the VM was created), uncommenting the following line and saving the file.</p>
<pre># config.vm.network :forwarded_port, guest: 80, host: 8080</pre>
<p>Next, run <kbd>vagrant reload</kbd> from Git Shell. (Note: Open a new Git Shell to do this, or <kbd>exit</kbd> the Ubuntu bash shell first.) Doing so will restart the VM with the updated config and begin forwarding traffic to it, from port 8080 on the host machine to port 80 on the VM.</p>
<p>Try it out by opening a browser and navigating to <a href="http://localhost:8080" target="_blank" rel="nofollow">http://localhost:8080</a>. If the port forwarding is working properly, the page will contain a Nginx welcome message.</p>
<div id="attachment_3765" class="wp-caption alignleft" style="width: 887px"><a href="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-portforward.png"><img class="lazy size-full wp-image-3765" alt="Screenshot of the port-forwarded response from Nginx running in the VM" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-portforward.png" width="877" height="187" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3765" alt="Screenshot of the port-forwarded response from Nginx running in the VM" src="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-portforward.png" width="877" height="187" /></noscript></a> Screenshot of the port-forwarded response from Nginx running in the VM</p></div>
<p>Pretty cool, huh? Just wait…</p>
<p>In case it went unnoticed, the Vagrantfile parent directory now contains a <i>www</i> folder. Drag that folder from Windows Explorer and drop it into an open Sublime Text window.</p>
<p>From Sublime, press <kbd>Ctrl+P</kbd> to open the <i>Goto Anything</i> feature, type <kbd>ix</kbd> and press <kbd>Enter</kbd> to open <i>index.html</i>. Look familiar? That&#8217;s because it&#8217;s the same output from the curl statement issued earlier in bash.</p>
<p>Make some changes and save the file, then reload the browser window and watch the changes automagically appear.</p>
<div id="attachment_3766" class="wp-caption alignleft" style="width: 887px"><a href="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-portforward-zomg.png"><img class="lazy size-full wp-image-3766 " alt="Screenshot of the port-forwarded response from Nginx running in the VM, showing changes" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-portforward-zomg.png" width="877" height="187" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3766 " alt="Screenshot of the port-forwarded response from Nginx running in the VM, showing changes" src="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-portforward-zomg.png" width="877" height="187" /></noscript></a> Screenshot of the port-forwarded response from Nginx running in the VM, showing changes</p></div>
<p>Now <em>that</em> is cool! Vagrant is not only port forwarding to the guest VM, it&#8217;s also syncing file systems. And with that confirmation, the configuration is complete. Time to do something interesting.</p>
<h2>Developing modern web applications</h2>
<p>To create a modern web application, often times referred to as a Rich Internet Application, or RIA, this article will leverage an HTML5 application assembler called <a href="http://brunch.io/">Brunch.io</a> and one of the many available <a href="https://github.com/brunch/brunch/wiki/Skeletons">application skeletons</a> called Brunch with Chaplin, which builds on Backbone and can be used to create a <abbr title="Single-Page Application">SPA</abbr>.</p>
<p>It&#8217;s worth mentioning that Brunch has skeletons available for a number of other frameworks, including Ember, AngularJS and Spine. Not sure which one to pick? Check out <a href="http://todomvc.com/">TodoMVC</a> for an understanding of the differences.</p>
<h3>Install and configure the application framework</h3>
<p>Back in Ubuntu (you may need to SSH in again), from the bash prompt, <kbd>cd</kbd> to <i>/vagrant/www</i> and enter the following at the prompt to install the Brunch application assembler, create a new application using the default Brunch skeleton, install dependencies and build the app:</p>
<pre>sudo npm install -g brunch
brunch new todomvc &amp;&amp; cd todomvc
sudo npm install --no-bin-links # Windows does not support symlinks
brunch b</pre>
<p>With the last command, a <i>public</i> directory will be created with the compiled source files. And because Vagrant sync is doing its thing, the application will immediately become available within Chrome at the following location: <a href="http://localhost:8080/todomvc/public/index.html" target="_blank" rel="nofollow">http://localhost:8080/todomvc/public/index.html</a>.</p>
<p>But opening the page shows nothing, and there are few errors on the page. Let&#8217;s take a look at the page source and debug in the browser.</p>
<h3>View the source and debug the errors</h3>
<p>At first when the page is pulled up, errors are preventing the content from loading. The errors can be confirmed by opening the console in Chrome using Chrome Dev Tools (<kbd>Ctrl+Shift+J</kbd>).</p>
<pre>Uncaught SyntaxError: Unexpected token &lt; vendor.js:1
Uncaught SyntaxError: Unexpected token &lt; app.js:1
Uncaught ReferenceError: require is not defined</pre>
<p>Debugging will show that Nginx is responding with HTML for the external CSS and JS files, instead of the expected style and script resources. Why is that? Let&#8217;s t<span style="line-height: 1.714285714; font-size: 1rem;">ake a </span><a style="line-height: 1.714285714; font-size: 1rem;" href="view-source:http://localhost:8080/todomvc/public/index.html" target="_blank" rel="nofollow">look at the page source</a> and find out<span style="line-height: 1.714285714; font-size: 1rem;">. It should look something like the following:</span></p>
<pre>&lt;!doctype html&gt;
&lt;!--[if IE 8]&gt; &lt;html class="no-js lt-ie9" lang="en"&gt; &lt;![endif]--&gt;
&lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html class="no-js" lang="en"&gt; &lt;!--&lt;![endif]--&gt;
&lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;
  &lt;title&gt;Brunch example application&lt;/title&gt;
  &lt;meta name="viewport" content="width=device-width"&gt;
  &lt;link rel="stylesheet" href="<a href="http://localhost:8080/stylesheets/app.css" target="_blank">/stylesheets/app.css</a>"&gt;
  &lt;script src="<a href="http://localhost:8080/javascripts/vendor.js" target="_blank">/javascripts/vendor.js</a>"&gt;&lt;/script&gt;
  &lt;script src="<a href="http://localhost:8080/javascripts/app.js" target="_blank">/javascripts/app.js</a>"&gt;&lt;/script&gt;
  &lt;script&gt;require('initialize');&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>It’s a fairly vanilla HTML5 document with some conditional comments for IE, Unicode character encoding, a couple of other <a href="http://alistapart.com/article/beyonddoctype" target="_blank">meta</a> <a href="http://alistapart.com/article/vexing-viewports" target="_blank">tags</a>, an empty <a href="http://www.w3.org/html/wg/drafts/html/master/sections.html#the-body-element"><code>body</code> element</a> and three <em>root-relative</em> external resources.</p>
<p>The errors themselves are occurring because the external resources cannot be located relative to the web root and so Nginx has decided instead to return the default <i>index.html</i> file–the one modified earlier. There are a few ways to fix this:</p>
<ul>
<li><span style="line-height: 14px;">Change the paths of the external resources to be document- rather than root-relative;</span></li>
<li>Change the web root to point to the application&#8217;s public directory; and</li>
<li>Configure Brunch to deploy files to the web root.</li>
</ul>
<p>Though any of these options would work, we&#8217;re going to go with configuring brunch to deploy files to the web root. And, in the process, we&#8217;re going to <em>move the web root back to its original location outside the reach of Vagrant synced folders</em>. (Note: Storing generated files under synced folders is not recommended, and may lead to errors in the browser after running multiple builds.)</p>
<h3>Move the web root outside of Vagrant synced folders</h3>
<p>Earlier, the web root was modified by moving the Nginx <i>www</i> folder to <i>/vagrant/www</i> and creating a symlink pointing to the new location. Remove that symlink and create a new <i>www</i> folder in its place, so generated application files can be deployed to a location outside of Vagrant synced folders.</p>
<pre>sudo rm /usr/share/nginx/www &amp;&amp; sudo mkdir /usr/share/nginx/www</pre>
<h3>Configure app to deploy files to the web root</h3>
<p>To configure the Brunch app to deploy files to the new location, modify the <a href="https://github.com/brunch/brunch/blob/master/docs/config.md">configuration file</a> in the application root directory (e.g. <i>/vagrant/www/todovmc/config.coffee</i>), add the following paths directive, save the file, and rebuild the application with sudo privileges:</p>
<pre>paths:
  public: '/usr/share/nginx/www'</pre>
<pre>cd /vagrant/www/todomvc &amp;&amp; sudo brunch b</pre>
<p>If done correctly, the Brunch app will now be available at the web root, or <a href="http://localhost:8080" target="_blank">http://localhost:8080</a>, free of errors and displaying an example application (as pictured below).</p>
<div id="attachment_3846" class="wp-caption alignleft" style="width: 939px"><a href="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-brunch.png"><img class="lazy size-full wp-image-3846" alt="Screenshot of Brunch sample application running in Google Chrome" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-brunch.png" width="929" height="690" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3846" alt="Screenshot of Brunch sample application running in Google Chrome" src="http://www.habdas.org/wp-content/uploads/2013/04/vagrant-brunch.png" width="929" height="690" /></noscript></a> Screenshot of Brunch sample application running in Google Chrome</p></div>
<p>Looking at the <a href="view-source:http://localhost:8080/" target="_blank">page source</a> again will show that the markup has not changed. That&#8217;s because the Brunch application is updating the <abbr title="Document Object Model">DOM</abbr> using JavaScript. To get a look at the actual DOM, open the Elements panel in Chrome Dev Tools or view the generated source using <a href="https://www.squarefree.com/bookmarklets/webdevel.html">a bookmarklet</a>.</p>
<p>Before going any further, now is a good time to get acquainted with the application stack.</p>
<h3>Get aquainted with the application stack</h3>
<p>Once you have the sample app up-and-running, pull up the page source once more and notice the following two external scripts:</p>
<p><code> &lt;script src="<a href="http://localhost:8080/javascripts/vendor.js" target="_blank" rel="nofollow">/javascripts/vendor.js</a>"&gt;&lt;/script&gt;<br />
&lt;script src="<a href="http://localhost:8080/javascripts/app.js" target="_blank" rel="nofollow">/javascripts/app.js</a>"&gt;&lt;/script&gt;<br />
</code></p>
<p>These files contain script generated via Node.js, by way of the Brunch build system. To see where their contents come from, expand the <i>app</i> and <i>vendor</i> folders under <i>todomvc</i> in Sublime Text as shown.</p>
<div id="attachment_3847" class="wp-caption alignleft" style="width: 939px"><a href="http://www.habdas.org/wp-content/uploads/2013/04/todomvc-app-vendor.png"><img class="lazy size-full wp-image-3847 " alt="Screenshot of the application's app and vendor folders expanded in Sublime Text" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://www.habdas.org/wp-content/uploads/2013/04/todomvc-app-vendor.png" width="929" height="690" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3847 " alt="Screenshot of the application's app and vendor folders expanded in Sublime Text" src="http://www.habdas.org/wp-content/uploads/2013/04/todomvc-app-vendor.png" width="929" height="690" /></noscript></a> Screenshot of the application&#8217;s app and vendor folders expanded in Sublime Text</p></div>
<p>Each of the two JS files in the page source represent all of the individual script files in each of the two directories, concatenated together as specified in <i>config.coffee</i>. Of the items under <i>vendor</i>, notice that <a href="http://backbonejs.org/">Backbone</a> and <a href="http://underscorejs.org/">Underscore</a> are included: two libraries that work well alongside jQuery (or  Zepto, depending on when you read this) to produce the application structure necessary for developing modern web applications.</p>
<p>The stylesheets for the application are created in a similar manner, except that, unlike the script files, both the vendor and app stylesheets are combined into a single file. The behavior for CSS is determined by the following <a href="https://github.com/brunch/brunch/blob/master/docs/config.md#files" target="_blank">files</a> statement in <i>config.coffee</i>:</p>
<pre>'stylesheets/app.css': /^(app|vendor)/</pre>
<p>Glance over the Brunch documentation for a better understanding of the application <a href="https://github.com/brunch/brunch/blob/master/docs/README.md#basics">structure</a> and file <a href="https://github.com/brunch/brunch/blob/master/docs/README.md#concatenation">concatenation</a> before making any file modifications if none of this looks familiar.</p>
<h3>Modify an application asset: the index.html</h3>
<p>Modern web applications aren&#8217;t all dynamic. Just like the webpages developed with Dreamweaver back in the early 2000&#8242;s, RIAs are made of the same great stuff: HTML, CSS, JS and media like images.</p>
<p>To add some content to the document, start Sublime&#8217;s <i>Goto Anything</i> feature (<kbd>Ctrl+P</kbd>), type <kbd>ix</kbd> and select the <i>index.html</i> file under the <i>assets</i> directory, as pictured, to open the file.</p>
<div id="attachment_3845" class="wp-caption alignleft" style="width: 939px"><a href="http://www.habdas.org/wp-content/uploads/2013/04/todomvc-goto-app-assets-indexhtml.png"><img class="lazy size-full wp-image-3845" alt="Screenshot of the Sublime Text Goto Anything search for the index.html asset" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://www.habdas.org/wp-content/uploads/2013/04/todomvc-goto-app-assets-indexhtml.png" width="929" height="690" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3845" alt="Screenshot of the Sublime Text Goto Anything search for the index.html asset" src="http://www.habdas.org/wp-content/uploads/2013/04/todomvc-goto-app-assets-indexhtml.png" width="929" height="690" /></noscript></a> Screenshot of the Sublime Text Goto Anything search for the index.html asset</p></div>
<p>The contents of this file are the exact same as the corresponding file in the <i>public</i> directory (now deployed to the web root). But because this file is a <em>pre-generated</em>, static asset, it will actually overwrite the the same file in the <i>public</i> directory whenever a change is saved and the application is compiled.</p>
<p>Go ahead and change the <a href="http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#the-title-element"><code>title</code> element</a> of <i>index.html</i>, and then save the file. Then tell brunch to compile the application again using <kbd>sudo brunch b</kbd> from the application root.</p>
<p>Once rebuilt, <a href="http://localhost:8080/" target="_blank" rel="nofollow">reload the page on the localhost</a> and notice <i>the page title has changed.</i></p>
<p>To summarize what happened here:</p>
<ol>
<li>Vagrant synced the <i>index.html</i> from Windows with the corresponding file on the VM</li>
<li>Utilizing Node.js, Brunch noticed the change to the filesystem, and compiled the application</li>
<li>The generated source was deployed to the web root directory Nginx uses</li>
<li>The page was reloaded in the Windows browser, and Vagrant port-forwarded the request to Nginx running on the virtual machine</li>
<li>Nginx served up the index.html file and generated application resources</li>
</ol>
<p>And that&#8217;s just the beginning.</p>
<h3>The more you know</h3>
<p>There&#8217;s a lot more to learn about Vagrant, <a href="http://arturadib.com/hello-backbonejs/docs/1.html">Backbone</a>, and <a href="https://github.com/chaplinjs/chaplin/blob/master/docs/overview.md" target="_blank">Brunch</a>, not to mention the libraries they rely on and plug-ins available for them. As an exercise, consider reviewing the <a href="http://brunch.io/">Brunch</a> documentation and learn how to build the application sources with file minification enabled. Simple, right? Now try installing Bootstrap&#8230; (Hint: Take a look at <a href="https://github.com/jupl/chapless-brunch#addbootstrap--rembootstrap" target="_blank">how Chapless Brunch does it</a>.)</p>
<p>Knowing what an application framework is capable of, and how to use it properly, can easily save many hours reinventing the wheel or digging out of <a href="http://sourcemaking.com/antipatterns/software-development-antipatterns">coding anti-patterns</a>, and can prove to be an enjoyable learning experience. In my personal experience, difficult problems can often be simplified by expanding one&#8217;s knowledge and finding a better way to do things. And I encourage others to do the same.</p>
<h2>Summary</h2>
<p>This article covered a series of steps which can be used for developing modern web applications on Windows. It started with a development environment configuration using Vagrant, progressed thru the steps needed for developing modern applications, and ended with some learning exercises and personal suggestions. Developing modern web applications no longer requires a Linux box or Mac OS X. So boot up that Windows machine, go forth and code.</p>
<p>The post <a href="http://www.habdas.org/developing-modern-web-applications-on-windows-vagrant/">Developing modern web applications on Windows with Vagrant</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/developing-modern-web-applications-on-windows-vagrant/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing and using rupa/z</title>
		<link>http://www.habdas.org/installing-using-rupaz/</link>
		<comments>http://www.habdas.org/installing-using-rupaz/#comments</comments>
		<pubDate>Sat, 27 Apr 2013 13:22:49 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://www.habdas.org/?p=3738</guid>
		<description><![CDATA[<p>rupa/z is an amazing shell script that allows users to traverse a filesystem hierarchy in no time flat, with minimal effort. Use it if you spend any time at all changing directories in a *nix environment. It will improve productivity and spare fat fingers quite a bit of backpedaling. z can be installed right from github [...]</p><p>The post <a href="http://www.habdas.org/installing-using-rupaz/">Installing and using rupa/z</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a href="https://github.com/rupa/z">rupa/z</a> is an amazing shell script that allows users to traverse a filesystem hierarchy in no time flat, with minimal effort. Use it if you spend any time at all changing directories in a *nix environment. It will improve productivity and spare fat fingers quite a bit of backpedaling.</p>
<p>z can be installed right from github by curling the raw source, making it available in path and then sourcing the file, e.g.</p>
<pre>cd /usr/bin
sudo curl -O https://raw.github.com/rupa/z/master/z.sh
sudo chmod 775 z.sh
. /usr/bin/z.sh</pre>
<p><strong>Note:</strong> Add the source command (the last one) to your $HOME/.bashrc file to ensure z is available after every log-in.</p>
<p>Try it out by changing to a few of your most commonly used directories and then issuing the z command, e.g.</p>
<pre>cd /usr/share/nginx/www
cd ~
z ww # or simply 'z w'</pre>
<p><span style="line-height: 1.714285714; font-size: 1rem;">Hat tip to Paul Irish, who </span><a style="line-height: 1.714285714; font-size: 1rem;" href="http://youtu.be/f7AU2Ozu8eo?t=2m23s">demoed rupa/z</a><span style="line-height: 1.714285714; font-size: 1rem;"> at Fluent 2012.</span></p>
<p>The post <a href="http://www.habdas.org/installing-using-rupaz/">Installing and using rupa/z</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/installing-using-rupaz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backbone.js Extensions, Plugins, Resources</title>
		<link>http://www.habdas.org/backbone-js-extensions-plugins-resources/</link>
		<comments>http://www.habdas.org/backbone-js-extensions-plugins-resources/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 16:53:32 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Backbone.js]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://habdas.org/?p=3690</guid>
		<description><![CDATA[<p>Just unearthed this handy-looking list of extensions, plugins and resources for Backbone.js and wanted to share: https://github.com/documentcloud/backbone/wiki/Extensions,-Plugins,-Resources</p><p>The post <a href="http://www.habdas.org/backbone-js-extensions-plugins-resources/">Backbone.js Extensions, Plugins, Resources</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Just unearthed this handy-looking list of extensions, plugins and resources for Backbone.js and wanted to share: <a href="https://github.com/documentcloud/backbone/wiki/Extensions,-Plugins,-Resources">https://github.com/documentcloud/backbone/wiki/Extensions,-Plugins,-Resources</a></p>
<p>The post <a href="http://www.habdas.org/backbone-js-extensions-plugins-resources/">Backbone.js Extensions, Plugins, Resources</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/backbone-js-extensions-plugins-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SFTP to Ubuntu server with Sublime Text</title>
		<link>http://www.habdas.org/sftp-to-ubuntu-server-sublime-text/</link>
		<comments>http://www.habdas.org/sftp-to-ubuntu-server-sublime-text/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 08:10:47 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[FTPS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://habdas.org/?p=3643</guid>
		<description><![CDATA[<p>About a year ago I explained how to set-up a remote project in Eclipse. Since then I&#8217;ve ditched Eclipse in favor of Sublime Text. But, even with the cat&#8217;s pajamas of modern code editors (that&#8217;s Sublime), getting source files from development to production meant carrying around some extra baggage: A deployment process, often manual, or, [...]</p><p>The post <a href="http://www.habdas.org/sftp-to-ubuntu-server-sublime-text/">SFTP to Ubuntu server with Sublime Text</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>About a year ago I explained how to set-up a <a title="Remote projects in Eclipse" href="/remote-project-in-eclipse/">remote project in Eclipse</a>. Since then I&#8217;ve ditched Eclipse in favor of Sublime Text. But, even with the cat&#8217;s pajamas of modern code editors (that&#8217;s Sublime), getting source files from development to production meant carrying around some extra baggage:</p>
<ul>
<li>A deployment process, often manual, or, if automated, tightly coupled with the application sources (zomg! oh n0s!!), must be created and followed.</li>
<li>At least two environments, likely not running on the same platform, must be stood-up and carried: development and production.</li>
<li>Windows users, who may not have a good method for developing for today&#8217;s Linux-based hosting environments, are pretty much snowed from the get-go.</li>
</ul>
<p>I&#8217;m deliberately oversimplifying here for the sake of TL;DR, so let me get the point. If you&#8217;re running a small site, are capable of failing fast and failing often, don&#8217;t have a lot of code contributors or are for some reason stuck working on an IBM Aptiva with 16MB RAM upgrade, you can pretty much skip the pain points in the list above and just manage code directly on the web server remotely. How is that possible? Simple. SFTP to Ubuntu server with Sublime Text as explained in this article.</p>
<p><span id="more-3643"></span></p>
<h2>Gather your forces</h2>
<p>To SFTP to Ubuntu server with Sublime Text the following needed is:</p>
<ul>
<li>Sublime Text, of course. Google it, or or simply follow my <a title="Amp up CoffeeScript coding with Sublime Text" href="amp-up-coffeescript-coding-sublime-text/">Sublime Text amp up tutorial</a>.</li>
<li>An Ubuntu micro instance with shared SSH key and Nginx running, all of which can be <a title="Host a website in the cloud in 10 minutes" href="/host-websites-cloud-10-minutes/">set-up in about 10 minutes</a> using Amazon Web Services.</li>
<li><a href="http://wbond.net/sublime_packages/sftp">Sublime SFTP</a> package for Sublime Text.</li>
<li>If you&#8217;re running Windows *sigh*, you&#8217;re also going to need <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTy</a>.</li>
</ul>
<p>Please note that this article assumes use of Ubuntu Server 12.04.01 LTS and Sublime Text 2. Obviously these steps may differ slightly for alternate configurations and may not hold steady as the ground moves beneath them over time.</p>
<h2>Choose a file transfer method, durr</h2>
<p>For secure file transfers we&#8217;re going to use <abbr title="SSH File Transfer Protocol">SFTP</abbr> (not to be confused with FTPS, which uses FTP over TLS/SSL), although the Sublime SFTP package supports both. FTP is not a good option in general as it sends passwords unencrypted over the wire. The choice to use SFTP over FTPS was based on the following factors:</p>
<ul>
<li>Using SFTP allows us to authenticate on the remote host using the same SSH key pair used for existing SSH connections, wereas FTPS requires passwords–though potentially encrypted over the wire–are stored unsecured in a plain text config file for use with the Sublime SFTP package.</li>
<li>SFTP utilizes the existing OpenSSH server pre-installed on the Ubuntu Server micro instance on <abbr title="Amazon Web Services">AWS</abbr>, whereas FTPS requires a separate tool such as <a href="https://security.appspot.com/vsftpd.html">vsftpd</a>.</li>
<li>Based on my research FTPS is becoming antiquated and has a number of other drawbacks when compared with SFTP. So there!</li>
</ul>
<h2>Configure the server</h2>
<p>In this section, we&#8217;ll configure the Ubuntu server by adding a new user account and allowing it to receive SSH connections, and then modify the server&#8217;s SSH configuration so that it&#8217;ll accept SFTP connections over port 22.</p>
<h3>Create new user account for SFTP connections</h3>
<p>While it may be possible to use an existing user account to perform SFTP, we&#8217;ll be creating a new user account specifically for SFTP connections.</p>
<p>Shell into the Ubuntu server using SSH as <a title="Host a website in the cloud in 10 minutes" href="http://habdas.org/host-websites-cloud-10-minutes/">explained previously</a> and issue the following commands in sequence, following any intermediary prompts presented, to create the new user account and add the authorized key for SSH logins:</p>
<pre>sudo adduser sftpuser
sudo mkdir /home/sftpuser/.ssh
sudo chown sftpuser:sftpuser /home/sftpuser/.ssh
sudo cp /home/ubuntu/.ssh/authorized_keys /home/sftpuser/.ssh
sudo chown sftpuser:sftpuser /home/sftpuser/.ssh/authorized_keys</pre>
<p>The above assumes the existing SSH-authorized user has the username <strong>ubuntu</strong>, from which we will borrow the authorized_keys file.</p>
<h3>Confirm user account setup successful</h3>
<p>To verify the new user account was set-up successfully, simply try shelling into it with the new username. If it works, you can skip the user account confirmations and just go <a href="http://kotaku.com/latest-japanese-schoolgirl-trend-fake-dragon-ball-atta-460482170" rel="nofollow">hadoukening</a> or something.</p>
<p>Otherwise, use the following commands to confirm things went as planned and debug common issues in creating the user account. Each command will be <em>followed</em> by an explanation of what it does and how to verify it worked.</p>
<pre>ll /home/sftpuser</pre>
<p><strong>Lists directory contents with permissions, like <kbd>ls -al</kbd>.</strong> Use it to confirm the new user&#8217;s home directory has been created and that the .ssh subdirectory has the same ownership as other subdirectories within, e.g.</p>
<samp>drwxr-xr-x 2 sftpuser sftpuser 4096 Mar 31 23:26 .ssh/</samp>
<pre>ll /home/sftpuser/.ssh/</pre>
<p><strong>Lists directory contents with permissions, like <kbd>ls -al</kbd>.</strong> Use it to confirm the new user&#8217;s .ssh subdirectory contains a file called authorized_keys, the authorized_keys file is contains the same ownership as the .ssh directory and the permissions are set properly, e.g.</p>
<samp>-rw&#8212;&#8212;- 1 sftpuser sftpuser  385 Mar 31 23:26 authorized_keys</samp>
<pre>sudo cat /home/sftpuser/.ssh/authorized_keys /home/ubuntu/.ssh/authorized_keys</pre>
<p><strong>Concatenates and outputs the contents of two files.</strong> Use it to confirm the authorzed_keys file under the sftpuser home directory contains the same data as the file by the same name under the ubuntu directory (based on configuration assumption, above).</p>
<pre>sudo grep -i "sftpuser" /etc/shadow | awk -F':' '{ print $2 }'</pre>
<p><strong>Outputs the hash of the password for a specified user.</strong> Use it to confirm the password is set (i.e. longer than a single character) as SSH and SFTP authentication may not work without it.</p>
<h3>Modify the SSH server configuration</h3>
<p>I&#8217;m going to borrow some of these instructions from <a href="http://about.me/bengarrett" rel="nofollow">Ben Garrett</a>, who admittedly borrowed them from <a href="http://blog.markvdb.be/">Mark Van den Borre</a>. I have chosen not to link the specific articles here so as not to let my readers meander into the unknown, because neither of those articles worked for this use case without further experimentation.</p>
<p>Backup and modify the SSH server configuration file, setting the cursor to line 76 of the file:</p>
<pre>sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo nano +76 /etc/ssh/sshd_config</pre>
<p>Comment out the line shown below, and add the specified line below it:</p>
<pre>#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp</pre>
<p>Add the following to the bottom of the file, save and exit:</p>
<pre># Custom for SFTP connections
Match group sftpuser
    ChrootDirectory /usr/share/nginx/www
    X11Forwarding no
    AllowTcpForwarding no
    ForceCommand internal-sftp</pre>
<p>The above will set-up some basic security. It creates a match group set to the name of the group that was created earlier when the user account was added. It also jails users in the group to a specific <em>chroot</em> directory–in this case to the web root for Nginx, which can vary by system.</p>
<p>Once complete, restart the SSH server service to apply the configuration changes:</p>
<pre>sudo service ssh restart</pre>
<h3>Set group permissions on the Nginx web root</h3>
<p>The last step of the server configuration is to give the sftpuser group permissions to read, write and execute stuff <em>within</em> the Nginx web root directory:</p>
<pre>sudo chgrp -R sftpuser /usr/share/nginx/www/*
sudo chmod -R 775 /usr/share/nginx/www/*</pre>
<p>Give yourself a pat on the back if you didn&#8217;t botch this step because you weren&#8217;t reading. If the web root itself is given group write permissions, chrooted SFTP connections by users in this group will likely begin failing with the following fatal error:</p>
<samp>Network error: Software caused connection abort</samp>
<h2>Configure Sublime SFTP</h2>
<p>In this section, we&#8217;ll cover the Sublime SFTP configuration and integration with Sublime Text. This section assumes the server configuration above has been completed and is fully functional, and that the Sublime SFTP package has been installed in Sublime Text.</p>
<p>From the <strong>File</strong> drop-down menu choose <strong>SFTP/FTP &gt; Setup Server&#8230;</strong> to open a boilerplate sftp-config.json file and make the following changes:</p>
<p>Set the host to your Ubuntu server&#8217;s public DNS, e.g.<br />
<code>"host": "ec2-54-245-25-94.us-west-2.compute.amazonaws.com",</code></p>
<p>Set the user to the user account created in the server configuration section, e.g.<br />
<code>"user": "sftpuser",</code></p>
<p>Set the remote path to the web root, e.g.<br />
<code>"remote_path": "/",</code></p>
<p>Uncomment and specify the value for the existing SSH key file, e.g.<br />
<code>"ssh_key_file": "C:\\Users\\Josh\\.ssh\\aws.ppk",</code></p>
<p>Once complete, save the sftp-config.json and <strong>Browse Server&#8230;</strong>  to connect to and start managing your website from within Sublime Text, as pictured below.</p>
<div id="attachment_3724" class="wp-caption alignleft" style="width: 939px"><a href="http://habdas.org/wp-content/uploads/2013/04/sublime-sftp.png"><img class="lazy size-full wp-image-3724 " alt="Screenshot of SFTP to Ubuntu server in Sublime Text" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://habdas.org/wp-content/uploads/2013/04/sublime-sftp.png" width="929" height="690" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3724 " alt="Screenshot of SFTP to Ubuntu server in Sublime Text" src="http://habdas.org/wp-content/uploads/2013/04/sublime-sftp.png" width="929" height="690" /></noscript></a> Command Palette for SFTP in Sublime Text, with Browse Server&#8230; highlighted</p></div>
<p>If things seem to be not working correctly with the SFTP package, please visit the <a href="http://wbond.net/sublime_packages/sftp/support">SFTP support page</a> for helpful debugging information, including a flag to log debugging information.</p>
<h2>SFTP Workflows</h2>
<p>Once connected to the remote server using SFTP there are a number of ways to accomplish things. To learn how to sync files and folders, and upload and download from the server, check out the <a href="http://wbond.net/sublime_packages/sftp/workflows">Sublime SFTP Workflows</a> page.</p>
<p>The post <a href="http://www.habdas.org/sftp-to-ubuntu-server-sublime-text/">SFTP to Ubuntu server with Sublime Text</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/sftp-to-ubuntu-server-sublime-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Host websites in the cloud in 10 minutes</title>
		<link>http://www.habdas.org/host-websites-cloud-10-minutes/</link>
		<comments>http://www.habdas.org/host-websites-cloud-10-minutes/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 17:08:33 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[webmaster]]></category>

		<guid isPermaLink="false">http://habdas.org/?p=3600</guid>
		<description><![CDATA[<p>Hosting companies Bluehost and Dreamhost offer simple, one-click installation of popular blogging platforms like WordPress, Drupal and Joomla. The affordable hosting plans offered are low-cost, but you tend to get what you pay for: shoddy up-time and slow server responses. What would our hero Mario do about this? I&#8217;m thinking he&#8217;d Tanooki suit up, make a mad [...]</p><p>The post <a href="http://www.habdas.org/host-websites-cloud-10-minutes/">Host websites in the cloud in 10 minutes</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Hosting companies Bluehost and Dreamhost offer simple, one-click installation of popular blogging platforms like WordPress, Drupal and Joomla. The affordable hosting plans offered are low-cost, but you tend to get what you pay for: shoddy up-time and slow server responses. What would our hero Mario do about this? I&#8217;m thinking he&#8217;d <a href="http://features.peta.org/mario-kills-tanooki/" rel="nofollow">Tanooki suit up</a>, make a mad dash and fly to the first cloud he found. And that&#8217;s what this post is all about. Read on to learn how to host a website in the cloud in 10 minutes. It may not be as simple as 1-click hosting, but it&#8217;ll almost certainly be faster. And you&#8217;ll earn some geek cred for doing something complicated to do something simple.</p>
<p><span id="more-3600"></span></p>
<h2>Getting started</h2>
<p>To get started, <a href="https://portal.aws.amazon.com/gp/aws/developer/registration/">create an AWS account</a>. From there, you&#8217;ll be able to create virtual machine instances from the <a href="https://console.aws.amazon.com/ec2/">EC2 dashboard</a> – just <strong>Launch Instance</strong> and follow the wizard. For my instance, I used 64-bit Ubuntu Server 12.04.1 <abbr title="Long-Term Support">LTS</abbr>.</p>
<p>Once the instance is up, <strong>configure the security group</strong> to enable TCP traffic over port 22 (SSH) and port 80 (HTTP), and generate and share a SSH key pair for secure connections to the instance.</p>
<p>Windows users can use PuTTY to connect to the instance over SSH using the <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html">guide provided by Amazon</a>. The method provided requires that PuTTYgen is used to convert the PEM private key format to the PPK format used by PuTTY.</p>
<h2>Host websites in the cloud</h2>
<p>Once the instance is created and configured to accept SSH and HTTP traffic, it can be used to run a web server so that it can receive web traffic. Follow the steps here to shell into the instance using its public DNS, and install and run a scalable web server called Nginx:</p>
<pre>ssh -l ubuntu ec2-54-244-194-251.us-west-2.compute.amazonaws.com
sudo apt-get update
sudo apt-get install nginx
sudo service nginx start</pre>
<p>For Amazon AMI instances, login with the username <strong>ec2-user</strong> and not <strong>ubuntu</strong>. And use <strong>yum</strong> instead of <strong>apt-get</strong>. Additionally, the command needed to start Nginx may differ by environment.</p>
<p>If <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html">using Windows with PuTTY</a> to shell in, the first command above will not be necessary–though connections will still be required to authenticate with a username, as shown here:</p>
<div id="attachment_3629" class="wp-caption alignleft" style="width: 685px"><a href="http://habdas.org/wp-content/uploads/2013/03/aws-putty.png"><img class="lazy size-full wp-image-3629" alt="Screenshot showing Ubuntu terminal emulation using PuTTY" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://habdas.org/wp-content/uploads/2013/03/aws-putty.png" width="675" height="425" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3629" alt="Screenshot showing Ubuntu terminal emulation using PuTTY" src="http://habdas.org/wp-content/uploads/2013/03/aws-putty.png" width="675" height="425" /></noscript></a> Specifying the user to login as to PuTTY and authenticating using imported SSH key</p></div>
<p>Once authenticated and the above commands executed, you can test that the web server service started successfully by curling the localhost from the bash prompt:</p>
<pre>curl localhost</pre>
<p>If the web server is running, you&#8217;ll receive a response similar to the following:</p>
<p><code>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Welcome to nginx!&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body bgcolor="white" text="black"&gt;<br />
&lt;center&gt;&lt;h1&gt;Welcome to nginx!&lt;/h1&gt;&lt;/center&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</code></p>
<p>Assuming the security groups were configured correctly, this is the same content that would be sent back to a browser if it were to hit the public DNS on port 80 (the default port for HTTP requests). Confirm this now by running the following command using the instance&#8217;s public DNS provided in the EC2 dashboard:</p>
<pre>curl -v ec2-54-244-194-251.us-west-2.compute.amazonaws.com</pre>
<p>The verbose flag will show some additional diagnostic information and will include the HTTP headers–useful for debugging.</p>
<p>If the server doesn&#8217;t respond, ensure the Ubuntu instance and Nginx are both running, and the security group has been configured to allow traffic on port 80. If you&#8217;re not able to curl the url, you can also try navigating to the public DNS using a web browser, as pictured here:</p>
<div id="attachment_3607" class="wp-caption aligncenter" style="width: 736px"><a href="http://habdas.org/wp-content/uploads/2013/03/aws-nginx.png"><img class="lazy size-full wp-image-3607   " alt="Host websites in the cloud screenshot" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://habdas.org/wp-content/uploads/2013/03/aws-nginx.png" width="726" height="517" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3607   " alt="Host websites in the cloud screenshot" src="http://habdas.org/wp-content/uploads/2013/03/aws-nginx.png" width="726" height="517" /></noscript></a> Page served by Nginx webserver running on the Amazon Web Services cloud</p></div>
<h2>Personalizing the content</h2>
<p>Now that the website is hosted and functional, the content can be personalized. To personalize the content, <strong>modify the index.html file</strong> containing the HTML being served by Nginx to say something less boring.</p>
<p><strong>Note:</strong> <a href="http://www.vim.org/" rel="nofollow">Vim</a> will be used for this exercise, though some users may find <a href="http://www.nano-editor.org/" rel="nofollow">nano</a> easier to wrap their heads around.</p>
<pre>sudo vim /usr/share/nginx/www/index.html</pre>
<p>Make some changes using the <a href="http://cheat.errtheblog.com/s/vim">Vim cheat sheet</a> for reference, and then save and exit Vim by pressing <kbd>Esc</kbd> followed by <kbd>:wq</kbd> and finally <kbd>Enter</kbd>.</p>
<p>So long as no caching is being done, Nginx will respond with the personalized content the next time the page is retrieved. And that&#8217;s all there is to host websites in the cloud.</p>
<h2>Taking it to the next level</h2>
<p>Assuming static pages are old hat, consider using Nginx to do something a tad more interesting, such as hosting a dynamic webapp using one of the <a href="https://github.com/brunch/brunch/wiki/Skeletons">Brunch.io Skeletons</a>. Of course, to do that you&#8217;ll need to install a few more packages—and that, unfortunately, is going to take <a title="Developing modern web applications on Windows with Vagrant" href="http://www.habdas.org/developing-modern-web-applications-on-windows-vagrant/">a little longer than 10 minutes</a>.</p>
<h2>Keep your head in the clouds</h2>
<p>If you are using an affordable hosting solution like BlueHost or DreamHost, and looking to beef up performance and improve up-time without getting too complicated or going through too much effort, consider enabling a CDN like <a href="https://www.cloudflare.com/">CloudFlare</a>. Integrations can be set-up manually, or, in some cases, set up with a hosting company integration script. And depending on the amount of site traffic and CDN used, the service may come for free.</p>
<p>The post <a href="http://www.habdas.org/host-websites-cloud-10-minutes/">Host websites in the cloud in 10 minutes</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/host-websites-cloud-10-minutes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using promises for non-ajax asynchronous callbacks in JavaScript</title>
		<link>http://www.habdas.org/using-promises-for-non-ajax-asynchronous-callbacks-in-javascript/</link>
		<comments>http://www.habdas.org/using-promises-for-non-ajax-asynchronous-callbacks-in-javascript/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 15:10:49 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://habdas.org/?p=3594</guid>
		<description><![CDATA[<p>After recently falling prey (again) to the immediate execution of a counter-based timing function used to execute a non-Ajax asynchronous callback method in JS, I wanted to share this very useful article I stumbled upon while looking for an approach that would meet my needs: http://sporto.github.com/blog/2012/12/09/callbacks-listeners-promises/</p><p>The post <a href="http://www.habdas.org/using-promises-for-non-ajax-asynchronous-callbacks-in-javascript/">Using promises for non-ajax asynchronous callbacks in JavaScript</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>After recently falling prey (again) to the immediate execution of a counter-based timing function used to execute a non-Ajax asynchronous callback method in JS, I wanted to share this very useful article I stumbled upon while looking for an approach that would meet my needs: <a href="http://sporto.github.com/blog/2012/12/09/callbacks-listeners-promises/">http://sporto.github.com/blog/2012/12/09/callbacks-listeners-promises/</a></p>
<p>The post <a href="http://www.habdas.org/using-promises-for-non-ajax-asynchronous-callbacks-in-javascript/">Using promises for non-ajax asynchronous callbacks in JavaScript</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/using-promises-for-non-ajax-asynchronous-callbacks-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Movies on the cheap with VUDU In Home Disc to Digital</title>
		<link>http://www.habdas.org/movies-on-the-cheap-with-vudu-in-home-disc-to-digital/</link>
		<comments>http://www.habdas.org/movies-on-the-cheap-with-vudu-in-home-disc-to-digital/#comments</comments>
		<pubDate>Sat, 09 Mar 2013 23:20:19 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Data Management]]></category>
		<category><![CDATA[cinephile]]></category>
		<category><![CDATA[thrifty]]></category>

		<guid isPermaLink="false">http://habdas.org/?p=3517</guid>
		<description><![CDATA[<p>As I mentioned in late January, VUDU users now have the ability to upgrade their existing DVDs to HDX for $5 and stream them right at home. But I wanted to unpack this statement a little for those not on the Twitters and those who have not used VUDU or UltraViolet before. This information will [...]</p><p>The post <a href="http://www.habdas.org/movies-on-the-cheap-with-vudu-in-home-disc-to-digital/">Movies on the cheap with VUDU In Home Disc to Digital</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>As I <a href="https://twitter.com/jhabdas/status/297194375539224576">mentioned</a> in late January, VUDU users now have the ability to upgrade their existing DVDs to <abbr title="High Definition eXperience">HDX</abbr> for $5 and stream them right at home. But I wanted to unpack this statement a little for those not on the Twitters and those who have not used VUDU or UltraViolet before. This information will be most useful to value-conscious consumers who already have DVD collections and are in the process of or have already purchased high-definition Internet TVs for their homes.</p>
<p><span id="more-3517"></span></p>
<h2>The value proposition</h2>
<p>Individuals can start convert their existing DVD disc collections to 1080p HDX high-defintion digital format for a nominal fee, and stream the converted movies to their televisions and other devices using an internet connection. The current cost for conversion for DVDs is <strong>$2 per movie or $5 for a 1080p upgrade</strong>, and $2 for Blu-ray to HDX.</p>
<p>Moving to digital streaming unlocks some long-awaited advantages for thrifty cinephiles, including:</p>
<ul>
<li>Ability to own 1080p HDX movies without spending a lot of extra money.</li>
<li>Stream movies instantly on many devices without need for an attached disc player.</li>
</ul>
<h2>Getting started</h2>
<p>To get started you&#8217;ll need accounts with <a href="http://www.vudu.com">VUDU</a> and <a href="http://www.uvvu.com/">UltraViolet</a>; a computer with a DVD-ROM and <a href="http://www.vudu.com/in_home_disc_to_digital.html">VUDU In Home Disc to Digital</a> (currently in beta); a 10mbps internet connection; and, for course, a credit card.</p>
<h2>Converting movies</h2>
<p>To convert a movie in seconds from home simply grab a disc from your video collection, feed it into a DVD-ROM and use the Disc To Digital feature of <a href="http://www.vudu.com/in_home_disc_to_digital.html">VUDU To Go</a> app to pay for the conversion. The entire process takes only seconds, and the movie will be instantly available to stream once complete.</p>
<div id="attachment_3557" class="wp-caption aligncenter" style="width: 980px"><a href="http://habdas.org/wp-content/uploads/2013/03/vudu2go-darko.png"><img class="lazy size-full wp-image-3557" alt="VUDU To Go Screenshot" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://habdas.org/wp-content/uploads/2013/03/vudu2go-darko.png" width="970" height="650" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3557" alt="VUDU To Go Screenshot" src="http://habdas.org/wp-content/uploads/2013/03/vudu2go-darko.png" width="970" height="650" /></noscript></a> Screenshot showing a $5 DVD to HDX video conversion using VUDU To Go BETA</p></div>
<p>While not all movies can be converted, the amount of supported movies has been growing.</p>
<h2>Watching movies</h2>
<p>View movies added to the UltraViolet cloud using any compatible device or application; such as VUDU on a Smart TV, set-top box or game console, or from other UV supporting applications and devices. For more information, checkout the <a href="http://www.uvvu.com/">UV</a> and <a href="http://www.vudu.com">VUDU</a> websites.</p>
<h2><strong>Movies on the cheap</strong></h2>
<p>As the Blu-ray revolution has occurred, the price of DVDs has been driven down significantly. Consider purchasing used DVDs and then converting them with the HDX upgrade. Flea markets are a great place to find used DVDs. And the bargain bins at stores like FYE, Walmart and Best Buy are great places to look as well. <a href="https://twitter.com/UVVU/status/311992215327100928">According to UltraViolet</a>, to ensure the film can be converted just search vudu.com and look for the UV icon.</p>
<p>The post <a href="http://www.habdas.org/movies-on-the-cheap-with-vudu-in-home-disc-to-digital/">Movies on the cheap with VUDU In Home Disc to Digital</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/movies-on-the-cheap-with-vudu-in-home-disc-to-digital/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Holy Grail of Rich Internet Applications</title>
		<link>http://www.habdas.org/holy-grail-rich-internet-applications/</link>
		<comments>http://www.habdas.org/holy-grail-rich-internet-applications/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 13:28:36 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Internet Marketing]]></category>
		<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[AMD]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[progressive enhancement]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://habdas.org/?p=3482</guid>
		<description><![CDATA[<p>One of the largest perceived drawbacks to creating a SPA or other Rich Internet Application is that they&#8217;re not SEO friendly or very accessible. With the advent of technologies such as ARIA, HTML5 and Node.js, things are changing. Web apps are becoming more usable and accessible, though also making them crawlable and highly performant is [...]</p><p>The post <a href="http://www.habdas.org/holy-grail-rich-internet-applications/">The Holy Grail of Rich Internet Applications</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>One of the largest perceived drawbacks to creating a <abbr title="Single-Page Application">SPA</abbr> or other Rich Internet Application is that they&#8217;re not SEO friendly or very accessible. With the advent of technologies such as ARIA, HTML5 and Node.js, things are changing. Web apps are becoming more usable and accessible, though also making them crawlable and highly performant is a formidable challenge. To solve this problem I for one am behind <a href="http://lostechies.com/derickbailey/2011/09/26/seo-and-accessibility-with-html5-pushstate-part-2-progressive-enhancement-with-backbone-js/">Derick Bailey&#8217;s approach</a> for using HTML5 pushState and <abbr title="Progressive Enhancement">PE</abbr> to achieve SEO and accessibility. After all, the hashbang method suggested by Google has a major problem: <a href="http://danwebb.net/2011/5/28/it-is-about-the-hashbangs">the URLs are not semantic</a>.</p>
<p>It seems as though I&#8217;m not alone in my belief that <a href="http://alistapart.com/article/understandingprogressiveenhancement">Progressive Enhancement</a> is possible in a single-page application, and the following article by Airbnb points toward the fact that they were able to achieve PE in a RIA using a technique they&#8217;re calling <em>The Holy Grail</em>. Under the approach, and per my understanding, content is rendered server-side first using both the same templating logic, routes and models, served up to the user agent, and then progressively enhanced afterwards with JavaScript.</p>
<p>A successful quest for The Holy Grail should yield a fully-crawlable Rich Internet Application with phenomenal &#8220;time to content&#8221; that doesn&#8217;t tax crawlers with ajax and will function in most any browser, even with JavaScript disabled.</p>
<p>Check out the <a href="http://nerds.airbnb.com/weve-launched-our-first-nodejs-app-to-product">Airbnb article</a> referenced, which depicts the Holy Grail in a linked image, and ask yourself if you&#8217;re drinking from the right cup. You must choose, but choose wisely.</p>
<p>The post <a href="http://www.habdas.org/holy-grail-rich-internet-applications/">The Holy Grail of Rich Internet Applications</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/holy-grail-rich-internet-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amp up CoffeeScript coding with Sublime Text</title>
		<link>http://www.habdas.org/amp-up-coffeescript-coding-sublime-text/</link>
		<comments>http://www.habdas.org/amp-up-coffeescript-coding-sublime-text/#comments</comments>
		<pubDate>Sat, 16 Feb 2013 19:41:31 +0000</pubDate>
		<dc:creator>Josh Habdas</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[debugging tools]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[version control]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://habdas.org/?p=3434</guid>
		<description><![CDATA[<p>Sublime Text with CoffeeScript is a JavaScript developer&#8217;s dream, but one that doesn&#8217;t evaporate in the fog of sleep shortly after waking. After learning about Sublime Text at Fluent Conf 2012 during a plenary talk by Paul Irish, I immediately began looking for ways to incorporate it into my workflow. And now, after having used [...]</p><p>The post <a href="http://www.habdas.org/amp-up-coffeescript-coding-sublime-text/">Amp up CoffeeScript coding with Sublime Text</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Sublime Text with <a href="http://coffeescript.org/">CoffeeScript</a> is a JavaScript developer&#8217;s dream, but one that doesn&#8217;t evaporate in the fog of sleep shortly after waking. After learning about Sublime Text at Fluent Conf 2012 during a <a href="http://www.youtube.com/watch?v=f7AU2Ozu8eo">plenary talk by Paul Irish</a>, I immediately began looking for ways to incorporate it into my workflow. And now, after having used it for over 8 months in my day-to-day work, I wanted to share a quick primer for those who want to amp up CoffeeScript coding with Sublime Text too.</p>
<p><span id="more-3434"></span></p>
<p>But first thing&#8217;s first, go and <a href="http://www.sublimetext.com/download">download Sublime Text</a>. The app is nagware until you purchase a license and register it, which I ended up doing after a couple of months of periodic and persistant annoyance (and, of course, once I realized how utterly awesome Sublime Text was). The licences are per-user, and not per-machine, meaning that users can purchase the app once and enjoy it on multiple machines using the same license. It almost feel&#8217;s like <a href="http://xkcd.com/553/">pirating</a>–but it&#8217;s not.</p>
<div id="attachment_3436" class="wp-caption aligncenter" style="width: 1020px"><a href="http://habdas.org/wp-content/uploads/2013/02/st2.png"><img class="lazy size-full wp-image-3436" alt="Sublime Text 2 screenshot" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://habdas.org/wp-content/uploads/2013/02/st2.png" width="1010" height="748" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3436" alt="Sublime Text 2 screenshot" src="http://habdas.org/wp-content/uploads/2013/02/st2.png" width="1010" height="748" /></noscript></a> Registered version of Sublime Text 2 running under Windows 8</p></div>
<p>In the above image we have a CoffeeScript file open, but all the code visible in the editor appears in a chilling bone white. How is that going to amp up coding speed? Simple: it&#8217;s not. So next step is to install some syntax highlighters and, while at it, some other useful packages as well.</p>
<blockquote><p>By default, Sublime Text does not come with support for CoffeeScript.</p></blockquote>
<p>To install the CoffeeScript syntax highlighter and other packages in Sublime Text with ease, we&#8217;re gonna need a package manager. Fortunately, there&#8217;s already one available, appropriately named <a href="http://wbond.net/sublime_packages/package_control">Sublime Package Control</a>. Go ahead and install that now.</p>
<p>With the package manager installed, use it to install the <a href="https://github.com/Xavura/CoffeeScript-Sublime-Plugin">CoffeeScript</a> package. Once installed successfully, CoffeeScript files (those ending in the <b>.coffee</b> extension) opened after the package is installed will begin appearing with syntax highlighting, like magic.</p>
<div id="attachment_3461" class="wp-caption aligncenter" style="width: 1020px"><a href="http://habdas.org/wp-content/uploads/2013/02/st2-coffee_hilight.png"><img class="lazy size-full wp-image-3461" alt="Sublime Text 2 screenshot" src="http://www.habdas.org/wp-content/plugins/jquery-image-lazy-loading/images/grey.gif" data-original="http://habdas.org/wp-content/uploads/2013/02/st2-coffee_hilight.png" width="1010" height="748" /><p class="wp-caption-text"><noscript><img class="size-full wp-image-3461" alt="Sublime Text 2 screenshot" src="http://habdas.org/wp-content/uploads/2013/02/st2-coffee_hilight.png" width="1010" height="748" /></noscript></a> Sublime Text 2 showing CoffeeScript syntax highlighting</p></div>
<p>Syntax highlighting isn&#8217;t the only thing the CoffeeScript package does. It also provides a number of convenience code snippets and other facilities to help make working with CoffeeScript easy peasy. But one thing the CoffeeScript add-on for Sublime Text doesn&#8217;t do is static code analysis such as linting. However, with Sublime Package Control, adding linting capabilities for CoffeeScript, as well as many other popular languages, is as easy as a few keystrokes and the installation of the <a href="https://github.com/SublimeLinter/SublimeLinter">SublimeLinter</a>. And presto! Now all you have to worry about for the most part are logic errors and workflow snafus. Unfortunately, the only known method for coping with those that I&#8217;m aware of are experience, a curious mind and constant experimentation to find what works best for you.</p>
<p>In summary, this primer has shown how to use a combination of tools to amp up CoffeeScript coding with Sublime Text for a better, faster and easier coding experience. The article covered installation of Sublime Text and Sublime Package Control, as well as two packages to help streamline CoffeeScript coding. Now, when the JS developer wakes up, they&#8217;ll be dreaming up the next innovative web application rather than the tools needed to build it.</p>
<h2>Related Sublime packages to try</h2>
<ul>
<li><span style="line-height: 14px;"><a href="https://github.com/surjikal/sublime-coffee-compile">CoffeeCompile</a> allows you to compile some or all of your CoffeeScript right from the editor</span></li>
</ul>
<h2><b>Other Sublime bundles worth checking out</b></h2>
<ul style="line-height: 1.714285714; font-size: 1rem;">
<li><a style="font-size: 1rem; line-height: 1.714285714;" href="https://github.com/kemayo/sublime-text-2-git">Git</a><span style="font-size: 1rem; line-height: 1.714285714;"> enables easy code management using the Git DCVS</span></li>
<li><a style="font-size: 1rem; line-height: 1.714285714;" href="https://github.com/ericmartel/Sublime-Text-2-Stackoverflow-Plugin">Stack Overflow</a><span style="font-size: 1rem; line-height: 1.714285714;"> allows quick knowledge base searches from within the editor</span></li>
<li><a style="font-size: 1rem; line-height: 1.714285714;" href="https://github.com/billymoon/Stylus">Stylus</a><span style="font-size: 1rem; line-height: 1.714285714;">, </span><a style="font-size: 1rem; line-height: 1.714285714;" href="https://github.com/danro/LESS-sublime">LESS</a><span style="font-size: 1rem; line-height: 1.714285714;"> and </span><a style="font-size: 1rem; line-height: 1.714285714;" href="https://github.com/nathos/sass-textmate-bundle">Sass</a><span style="font-size: 1rem; line-height: 1.714285714;"> provide CSS preprocessor support, as needed</span></li>
<li><a href="https://github.com/spadgos/sublime-jsdocs">DocBlockr</a> makes writing documentation a breeze</li>
</ul>
<p>The post <a href="http://www.habdas.org/amp-up-coffeescript-coding-sublime-text/">Amp up CoffeeScript coding with Sublime Text</a> appeared first on <a href="http://www.habdas.org">habdas.org</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.habdas.org/amp-up-coffeescript-coding-sublime-text/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

 Served from: www.habdas.org @ 2013-06-18 00:59:13 by W3 Total Cache -->