<?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>Brit Gardner ::: Web Developer ::: Dallas, TX &#187; jaxer</title>
	<atom:link href="http://britg.com/tags/jaxer/feed/" rel="self" type="application/rss+xml" />
	<link>http://britg.com</link>
	<description>The big yellow one&#039;s the sun.</description>
	<lastBuildDate>Sun, 10 Jan 2010 17:25:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Brave New World of Server-Side Javascript</title>
		<link>http://britg.com/2009/06/08/the-brave-new-world-of-server-side-javascript/</link>
		<comments>http://britg.com/2009/06/08/the-brave-new-world-of-server-side-javascript/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 12:00:45 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[jack]]></category>
		<category><![CDATA[javscript]]></category>
		<category><![CDATA[jaxer]]></category>
		<category><![CDATA[narwhal]]></category>
		<category><![CDATA[server-side javascript]]></category>

		<guid isPermaLink="false">http://britg.com/?p=947</guid>
		<description><![CDATA[Every once in a while I hear whispers of server-side javascript and I get just as excited as the next person. But, I'll admit that until recently a phrase like "Javascript on Rails" was on the same level as a phrase like "McGyver vs. The A Team - The Movie." Fictonal. But awesome in theory.]]></description>
			<content:encoded><![CDATA[<div id="attachment_961" class="wp-caption alignright" style="width: 220px"><img class="size-medium wp-image-961" title="key_art_the_a_team" src="http://britg.com/blog/wp-content/uploads/2009/06/key_art_the_a_team-300x116.jpg" alt="Not the B Team" width="210" height="81" /><p class="wp-caption-text">Not the B Team</p></div>
<p>Every once in a while I hear whispers of server-side javascript and I get just as excited as the next person.  But, I&#8217;ll admit that until recently a phrase like &#8220;<em>Javascript on Rails</em>&#8221; was on the same level as a phrase like &#8220;<em>McGyver vs. The A Team &#8211; The Movie</em>.&#8221;  Fictonal.  But awesome in theory.</p>
<p>(<em>Don&#8217;t worry, they eventually join forces in the sequel</em>)</p>
<h3>But what about Jaxer?</h3>
<p>My limited experience with server-side javascript (SSJ) has been through <a href="http://aptana.com/jaxer">Jaxer</a>, from Aptana.  It touts some cool functionality, like loading the DOM server-side and built-in database drivers for MySQL, with the former allowing for DOM manipulation and integration with libraries like jQuery.</p>
<div id="attachment_968" class="wp-caption alignleft" style="width: 210px"><img class="size-full wp-image-968" title="jaxer-logo-icon" src="http://britg.com/blog/wp-content/uploads/2009/06/jaxer-logo-icon.png" alt="The extremely original Gear logo" width="200" height="83" /><p class="wp-caption-text">Ubiquitous &quot;Gear&quot; Logo</p></div>
<p>But, in its attempts to blur the lines between client and server execution, Jaxer has made sacrifices in its extensibility.  It is meant to be plugged into another system.  For instance, I don&#8217;t know of an easy way to expose data through a RESTful JSON/XML API (<em>like so many sites are doing nowadays</em>) using Jaxer alone.</p>
<p>What I&#8217;m really looking for in SSJ is something akin to the ecosystem surrounding languages like Ruby and Python.  That&#8217;s why I was pleasantly surprised to stumble accross a few projects that aim to do just that.</p>
<h3><strong>Narwhal</strong> &#8211; Javascript Standard Library and Interactive Console</h3>
<p>The foundation of any good ecosystem is a standard library.  Enter <a title="Narwhal" href="http://narwhaljs.org/">Narwhal</a>, &#8220;<em>a flexible javascript standard library</em>.&#8221;</p>
<p>There are a lot of things to like about this project, but the primary benefit is its attempts to play nice with multiple javascript runtimes like Rhino and V8cgi.  Also, this project is embracing <a title="ServerJS" href="https://wiki.mozilla.org/ServerJS">Mozilla&#8217;s ServerJS standard</a> which I think is important for its longevity and interoperability.</p>
<p>Setup is a breeze, you can simply clone the project from <a href="http://github.com/gmosx/narwhal/tree/master">github</a>:</p>
<p><code>git clone git://github.com/tlrobinson/narwhal.git</code></p>
<p>Once you add <code>narwhal/bin</code> to your $PATH, you can use the convenient symlink <code>js</code> to enter an interactive javascript console similar to <code>irb</code> or <code>python</code>.</p>
<h3><strong>Jack</strong> &#8211; Javascript&#8217;s &#8220;Rack&#8221;</h3>
<p>Interestingly enough, Narwhal came into existence as it&#8217;s author, <a href="http://tlrobinson.net/">Tom Robinson</a>, was working on <a href="http://jackjs.org/">Jack</a>.</p>
<blockquote><p>JSGI is a webserver interface for JavaScript inspired by Ruby’s Rack (http://rack.rubyforge.org/) and Python’s WSGI (http://www.wsgi.org/).</p>
<p>Jack is an implementation of JSGI compatible handlers (to connect to web servers), middleware (to intercept and manipulate requests to add functionality), and utilities (to make using JSGI easier).</p></blockquote>
<p>Setup is also breezy.  Simply clone Jack into the same directory you cloned Narwhal into:</p>
<p><code>git clone git://github.com/tlrobinson/jack.git</code></p>
<p>Since you&#8217;ve already added narwhal&#8217;s bin directory to your path, lets just make a symlink to <code>jackup</code> from there.</p>
<p>From your narwhal/bin directory:<br />
<code>ln -s [path/to/jack]/bin/jackup jackup</code></p>
<p>Run <code>jackup -h</code> for usage.</p>
<h3>So, what&#8217;s next? Where&#8217;s <em>Javascript on Rails</em>?</h3>
<p>With Narwhal and Jack, you can start writing basic web apps.  Looking at the <code>example.js</code> script in <code>jack/examples</code> we can see the basic request/response structure.  Looks familiar huh?</p>
<pre class="brush:js">var Jack = require("jack");

var map = {};

// an extremely simple Jack application
map["/hello"] = function(env) {
    return [200, {"Content-Type":"text/plain"}, ["Hello from " + env["SCRIPT_NAME"]]];
}

// apply the URLMap
var app = Jack.ContentLength(Jack.URLMap(map));
//...</pre>
<p>While these two pieces are a good start to a vibrant server-side javascript ecosystem, there&#8217;s still a long ways to go to before it&#8217;ll be on par with Ruby and Python.</p>
<p>What SSJ needs is its Django/Pylons/Rails/Merb.  There are a couple of projects I&#8217;ve found in the wild that are using Jack and Narwhal, but they appear to still be in very rapid flux.</p>
<p><a href="http://www.nitrojs.org/">Nitro</a></p>
<blockquote><p>Nitro provides a library of carefully designed middleware and utilities for creating scalable, standards-compliant Web Applications with JavaScript.</p></blockquote>
<p><a href="http://dev.helma.org/ng/">Helma NG</a></p>
<blockquote><p>Helma NG consists of several components that can be used together or alone:</p>
<p>1) A compact JavaScript runtime environment based on Mozilla Rhino. It adds<br />
to Rhino a reloading module system that is compatible to the ServerJS<br />
Securable Module proposal.</p>
<p>2) An interactive shell with support for autocompletion and history.</p>
<p>3) A module library implemented in JavaScript, covering basic functionality<br />
such as extensions to the built-in objects, file I/O, logging, persistence,<br />
client and server side HTTP support and more.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2009/06/08/the-brave-new-world-of-server-side-javascript/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Why Aptana is Quickly Becoming the Killer Stack</title>
		<link>http://britg.com/2008/08/26/why-aptana-is-quickly-becoming-the-killer-stack/</link>
		<comments>http://britg.com/2008/08/26/why-aptana-is-quickly-becoming-the-killer-stack/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 04:08:34 +0000</pubDate>
		<dc:creator>britg</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[aptana cloud]]></category>
		<category><![CDATA[jaxer]]></category>

		<guid isPermaLink="false">http://britg.com/?p=406</guid>
		<description><![CDATA[Anyone who knows me knows that I am a huge fan of Aptana.  (The recent acquisition of the pyDev plugin and its eventual incorporation into the IDE only solidifies that position.)  Their suite of services are quickly turning into the killer app stack for a large majority of web developers including myself and if you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://britg.com/wp-content/uploads/2008/08/pydev_logo_whitebg.gif"><img class="alignleft size-full wp-image-410" title="pydev_logo_whitebg" src="http://britg.com/wp-content/uploads/2008/08/pydev_logo_whitebg.gif" alt="" width="270" height="117" /></a>Anyone who knows me knows that I am a huge fan of <a href="http://aptana.com">Aptana</a>.  (<em>The <a href="http://www.aptana.com/python">recent acquisition of the pyDev plugin</a> and its eventual incorporation into the IDE only solidifies that position.</em>)  Their suite of services are quickly turning into the killer <span style="text-decoration: line-through;">app</span> stack for a large majority of web developers including myself and if you&#8217;re a developer who hasn&#8217;t given Aptana a try, I highly recommend you do &#8211; it&#8217;s free.</p>
<p>Yes, everything they&#8217;re doing has been done before.  And yes bigger and badder players have offerings in the IDE, cloud hosting, and developer community sectors, but it&#8217;s all about consolidation baby, and Aptana wins hands down in that arena.</p>
<h3>The IDE Is Key</h3>
<p><a href="http://britg.com/wp-content/uploads/2008/08/picture-11.png"><img class="alignright size-full wp-image-407" title="picture-11" src="http://britg.com/wp-content/uploads/2008/08/picture-11.png" alt="" width="307" height="76" /></a>The foundation of any good development stack is not the test or deployment servers.  It&#8217;s not the language,  documentation, or even the community.  It&#8217;s the IDE, damnit.  Because, really &#8211; what connects all the other layers?  It should be the IDE, and that&#8217;s exactly what the Aptana IDE does.</p>
<p>The Aptana devs have done an excellent job in providing much more than just a text editor with syntax highlighting.  With the soon to be released Aptana IDE 1.2, you get project management, remote asset management with FTP, SVN and their new <a href="http://www.aptana.com/cloud">aptanacloud interface</a>, database management, code tutorials and assistance for popular libraries and frameworks.</p>
<p>No, Aptana will probably never be as good a PHP editor as Zend Studio.  And it&#8217;ll probably never be a replacement for Cyberduck or Filezilla for file management, or Amazon&#8217;s web services for cloud computing.  And you&#8217;ll probably still try to ping the jQuery docs only to realize they are still slow as hell (<a href="http://remysharp.com/jquery-api/">good alternative here, btw</a>).  But, in the Get Stuff Done web development world, having a working solution for all these built in to your IDE is invaluable.</p>
<h3>The Future is in The Cloud</h3>
<p>As a relatively new entrant into the web technology world, I would venture to say that the biggest and most exciting development during my short tenure is Cloud Computing.  But, I&#8217;ve <a href="http://britg.com/2008/06/03/immensely-interesting-look-into-smugmugs-cloud-based-setup/">said it before</a>, and I&#8217;ll say it again &#8211; managing Amazon Web Services and EC2 instances is <em>hard work</em>.  Google App Engine <a href="http://britg.com/2008/06/04/introducting-bravenewfictioncom-google-app-engine-demo/">fixes the hard work problem</a>, but you&#8217;re forced into Google&#8217;s narrow framework and constraints.</p>
<p><a href="http://britg.com/wp-content/uploads/2008/08/cloud_logo_large_0.png"><img class="alignleft size-medium wp-image-413" title="cloud_logo_large_0" src="http://britg.com/wp-content/uploads/2008/08/cloud_logo_large_0-300x101.png" alt="" width="300" height="101" /></a>Aptana&#8217;s new Cloud service is right smack-dab in the middle.  You&#8217;re given a sliding scale of server size, a couple of customization options, and bam! you&#8217;ve got a web server.  There&#8217;s no 50 step, command line based, get-one-step-wrong-and-you&#8217;re-hosed process to build and deploy a machine instance.  But, you also don&#8217;t have the fine-grained control of exactly what software your server runs.</p>
<p>That&#8217;s an easy trade-off for the web application developer, because execution on the core functionality of your app is what matters.  No one really cares how you&#8217;ve squeezed every last ounce of optimization into your server cluster (though there&#8217;s nothing wrong with that pursuit).</p>
<p>Oh, by the way, did I mention that Aptana Cloud is integrated with the Aptana IDE on every level &#8211; database management, source control, resource management, deployment, etc. etc?  Yeah, it is and it kicks ass.  Go sign up for the <a href="http://survey.constantcontact.com/survey/a07e2b5k8zlfh4zva93/a021r4fkdedk17/questions">early access program</a> and see for yourself.</p>
<h3>Javascript is the New Cranberry</h3>
<p>You know how you can walk down the juice aisle at your local grocery store and see 50 different juices and cranberry just seems to be involved with every damn one of them?  That&#8217;s javascript in the web world.  More often than not, JSON is the platform of choice for APIs and web services.  AJAX pervades just about every Web 2.0 application.  Hell, it&#8217;s even made it into our databases with <a href="http://couchdb.com">CouchDB</a>.</p>
<p>Hey, there&#8217;s nothing wrong with that &#8211; Jeff Attwood may <a href="http://www.codinghorror.com/blog/archives/001163.html">hate working with javascript</a> &#8211; but I kinda sorta almost maybe like it!  Especially when working with frameworks like jQuery, javascript can be a fun experience when it adds interactivity and wow-factor to your web application.</p>
<p><a href="http://britg.com/wp-content/uploads/2008/08/picture-2.png"><img class="alignright size-medium wp-image-415" title="picture-2" src="http://britg.com/wp-content/uploads/2008/08/picture-2.png" alt="" width="266" height="113" /></a>Enter Aptana&#8217;s end-to-end Javascript solution &#8211; <a href="http://www.aptana.com/jaxer">Jaxer</a>.  Damn, they thought of everything!  If web developers are spending so much time in their code interfacing with javascript APIs and writing Javascript UI interactivity, why not put javascript on the server side and use it as your middleware?  I like it.</p>
<p>Hell, I can see in the near future a scenario where Javascript is the only scripting language in an entire application.  Front end javascript, with Jaxer on the server, and CouchDB as the data-store.</p>
<p>Oh, and did I mention that Jaxer is integrated into the Aptana IDE with a debug console, profiler, etc? Ok, you get the point.</p>
<h3>So Why Did I Write This?</h3>
<p>Sounds like I&#8217;m a pretty hardcore Aptana fanboy, doesn&#8217;t it?  Well I can assure you the Aptana team <span style="text-decoration: line-through;">hasn&#8217;t paid me</span> should be paying me to say all this, damnit.  Oh well, I&#8217;ll throw in a diss just for good measure.  For some ungodly reason, the Aptana IDE only <em>just recently</em> added a word wrap feature.  Yes, you read that right &#8211; word wrap.  Word.  Wrap.</p>
<p>Ok, they maybe might have had some sort of <a href="http://support.aptana.com/asap/browse/STU-534">plausible excuse</a>, but damn &#8211; Word. Wrap.  That&#8217;s sort of like a television not having volume control, or a keyboard without the tilde &#8211; you don&#8217;t miss it until you don&#8217;t have it.</p>
]]></content:encoded>
			<wfw:commentRss>http://britg.com/2008/08/26/why-aptana-is-quickly-becoming-the-killer-stack/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
