<?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>xambr::blog &#187; Reviews</title>
	<atom:link href="http://blog.xambr.com/category/reviews/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xambr.com</link>
	<description>crafting my thoughts</description>
	<lastBuildDate>Tue, 20 Jul 2010 18:57:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Rails Alternatives: Merb, Sinatra &amp; Ramaze</title>
		<link>http://blog.xambr.com/2009/05/28/rails-alternatives-merb-sinatra-ramaze/</link>
		<comments>http://blog.xambr.com/2009/05/28/rails-alternatives-merb-sinatra-ramaze/#comments</comments>
		<pubDate>Thu, 28 May 2009 05:35:53 +0000</pubDate>
		<dc:creator>max.rb</dc:creator>
				<category><![CDATA[Discoveries]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[merb]]></category>
		<category><![CDATA[ramaze]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>
		<category><![CDATA[web framework]]></category>

		<guid isPermaLink="false">http://blog.xambr.com/?p=132</guid>
		<description><![CDATA[Over the past few months I&#8217;ve been on the hunt for a Ruby web framework to replace Rails as my weapon of choice when building an online presence. Rails struck me as being overly heavy in this context and I wanted something lighter. I was primarily looking for a web framework that, out of the [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few months I&#8217;ve been on the hunt for a Ruby web framework to replace <a href="http://rubyonrails.org/" target="_blank">Rails</a> as my weapon of choice when building an online presence. <a href="http://rubyonrails.org/" target="_blank">Rails</a> struck me as being overly heavy in this context and I wanted something lighter.</p>
<p>I was primarily looking for a web framework that, out of the box, supported a healthy variety of template/ORM options, offered flexible routing and good layout/view support.</p>
<p>My search took me through the green pastures of <a href="http://merbivore.com/" target="_blank">Merb</a>, into <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a>&#8216;s glitzy jazz hall and finally into the land of <a href="http://ramaze.net/" target="_blank">Ramaze</a>.</p>
<h2>Merb&#8217;s Green Pastures</h2>
<p>I had heard so many good things about <a href="http://merbivore.com/" target="_blank">Merb</a> that starting with it seemed like a no brainer. The rewrite of <a href="http://www.xambr.com/" target="_blank">xambr.com</a> using <a href="http://merbivore.com/" target="_blank">Merb</a> was mostly an enjoyable experience &#8211; <a href="http://merbivore.com/" target="_blank">Merb</a> was able to do everything I was doing with <a href="http://rubyonrails.org/" target="_blank">Rails</a> out of the box.</p>
<p>There were annoying holes in the documentation but nothing that couldn&#8217;t be filled in through a bit of spelunking in the code base &#8211; which was pretty clean and easy to understand (at least the parts I looked at were).</p>
<p>Of course, a couple days after finishing the rewrite of <a href="http://www.xambr.com/" target="_blank">xambr.com</a> I read that <a href="http://merbivore.com/" target="_blank">Merb</a> was to be merged into <a href="http://weblog.rubyonrails.org/2008/12/23/merb-gets-merged-into-rails-3" target="_blank">Rails v3</a>. At first I was a little dismayed but I&#8217;ve come to the opinion that the merge is a good thing &#8211; <a href="http://rubyonrails.org/" target="_blank">Rails</a> will definitely benefit from it and I think <a href="http://merbivore.com/" target="_blank">Merb&#8217;s</a> spot will be taken by the very capable, if under-appreciated, <a href="http://ramaze.net/" target="_blank">Ramaze</a>.</p>
<p>I ran <a href="http://www.xambr.com/" target="_blank">xambr.com</a> on Merb for about 3 months during which time I dabbled in <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> (previously blogged about <a href="http://blog.xambr.com/2009/04/07/getting-classy-with-sinatra/" target="_blank">here</a>). These first experiences with <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> were very positive and I liked the fact that it was lighter than Merb &#8211; so I figured I&#8217;d give it a shot.</p>
<h2>Getting Classy with Sinatra [Redux]</h2>
<p>While the rewrite of <a href="http://www.xambr.com/" target="_blank">xambr.com</a> in Merb had taken about 10 hours the rewrite in <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> took 1/2 that time&#8230; or at least 90% of it did.</p>
<p>I got hung up when trying to figure out how to have multiple view sections within a single layout (like <a href="http://merbivore.com/" target="_blank">Merb&#8217;s</a> throw/catch system). Several hours of searching and tinkering didn&#8217;t turn anything up other than a tidbit on <a href="http://github.com/" target="_blank">Github</a> using <a href="http://haml.hamptoncatlin.com/" target="_blank">Haml</a> &#8211; which I was not able to get working with <a href="http://www.kuwata-lab.com/erubis/" target="_blank">Erubis</a> (and I didn&#8217;t want to switch to <a href="http://haml.hamptoncatlin.com/" target="_blank">Haml</a>).</p>
<p>Its very likely that with a bit more poking around, maybe hitting up the mailing list or IRC, a solution could have been found but I didn&#8217;t want to spend any more time with it &#8211; as mentioned above I was looking for a web framework that did all of this out of the box.</p>
<p>So I was a little disappointed, but I still think <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> is a great little web framework &#8211; just not for online presences (or at least not <a href="http://www.xambr.com/" target="_blank">xambr.com</a>).</p>
<h2>Ramaze FTW</h2>
<p>I stumbled upon <a href="http://ramaze.net/" target="_blank">Ramaze</a> several months before starting this little adventure but never gave it the look it deserved. Revisiting it was the best thing I&#8217;ve done all year (code wise anyway). How can one possibly argue with &#8220;Any ruby, any adapter, any ORM and any template engine&#8221; &#8211; contortionists everywhere are jealous of <a href="http://ramaze.net/" target="_blank">Ramaze&#8217;s</a> flexibility.</p>
<p>Rewriting <a href="http://www.xambr.com/" target="_blank">xambr.com</a> in <a href="http://ramaze.net/" target="_blank">Ramaze</a> took about the same time as it did in <a href="http://merbivore.com/" target="_blank">Merb</a> &#8211; roughly 10 hours. I started off using <a href="http://www.kuwata-lab.com/erubis/" target="_blank">Erubis</a> but ultimately ended up using <a href="http://github.com/manveru/nagoro/tree/master" target="_blank">Nagoro</a> &#8211; mainly because I liked its &#8220;Page Elements&#8221; which are like partials only better. <a href="http://github.com/manveru/nagoro/tree/master" target="_blank">Nagoro</a> is pretty close to <a href="http://www.kuwata-lab.com/erubis/" target="_blank">Erubis</a> but I&#8217;d say its a little more natural if you&#8217;re coming at them both with a fresh slate (due to its substitution syntax).</p>
<p><a href="http://ramaze.net/" target="_blank">Ramaze</a> has a great community too &#8211; a question I posed on the <a href="http://ramaze.net/" target="_blank">Ramaze</a> IRC channel about some odd <a href="http://github.com/manveru/nagoro/tree/master" target="_blank">Nagoro</a> behavior got an immediate, friendly response from <a href="http://ramaze.net/" target="_blank">Ramaze&#8217;s</a> creator, <a href="http://github.com/manveru" target="_blank">Michael <span id="author">Fellinger</span></a>. Now, I&#8217;m not a frequenter of IRC channels in general so I wouldn&#8217;t know if getting friendly answers from a technology&#8217;s creator is the norm but to me it was a much appreciated surprise (thanks <a href="http://github.com/manveru" target="_blank">Michael</a>!).</p>
<p>The <a href="http://ramaze.net/learn" target="_blank">documentation</a> for <a href="http://ramaze.net/" target="_blank">Ramaze</a> isn&#8217;t quite complete but its pretty close &#8211; more so than for <a href="http://merbivore.com/" target="_blank">Merb</a> in my opinion. That said it does seem to be less the subject of blog posts than <a href="http://merbivore.com/" target="_blank">Merb</a> (although I think that will all change in the coming months). Its got a <a href="http://book.ramaze.net/" target="_blank">book</a> (albeit an incomplete one), a ton of well written <a href="http://github.com/manveru/ramaze/tree/master/examples" target="_blank">examples</a> of ranging in size from hello world to a <a href="http://github.com/manveru/sociar/tree/master" target="_blank">social networking site</a> and a great <a href="http://blog.purepistos.net/index.php/2008/11/18/ramaze-by-example/" target="_blank">set of blog posts</a> by <a href="http://blog.purepistos.net/" target="_blank">Pistos</a>.</p>
<p>All my gushing aside, I did run into a bit of trouble finding a good end-to-end deployment solution. This wasn&#8217;t a bad thing though &#8211; it forced me to get to know <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> a little better and look into process monitoring solutions. In the coming days (ok maybe weeks&#8230;) I&#8217;ll be posting my solution (which involves a couple of <a href="http://mongrel.rubyforge.org/" target="_blank">mongrels</a> under <a href="http://god.rubyforge.org/">god</a>&#8216;s watchful eye) &#8211; its not rocket science by any stretch of the imagination but I did run into a couple of snags&#8230;</p>
<h2>In Short&#8230;</h2>
<p>To sum it all up for those of you who&#8217;d rather read the back of the envelope (thats me!) here is how I&#8217;d characterize each of these Ruby web frameworks:</p>
<ul>
<li><a href="http://merbivore.com/" target="_blank">Merb</a>
<ul>
<li>Skip it and check out <a href="http://ramaze.net/" target="_blank">Ramaze</a> instead
<ul>
<li><a href="http://merbivore.com/" target="_blank">Merb</a> will likely give you a leg up on Rails 3 but <a href="http://ramaze.net/" target="_blank">Ramaze</a> will serve you better in the &#8220;alternative to Rails&#8221; context.</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a>
<ul>
<li>Great place to start if you&#8217;re new to web development
<ul>
<li>The <a href="http://www.sinatrarb.com/intro.html" target="_blank">README</a> page is close to a one stop shop for everything you need to get up and singing</li>
</ul>
</li>
<li>The handy multi-tool you need to get small jobs done quickly
<ul>
<li>eg. <a href="http://mwrc2009.confreaks.com/13-mar-2009-11-05-in-a-world-of-middleware-who-needs-monolithic-applications-jon-crosby.html" target="_blank">Rack middleware</a>, tiny websites, web services, etc</li>
</ul>
</li>
</ul>
</li>
<li><a href="http://ramaze.net/" target="_blank">Ramaze</a>
<ul>
<li>The fine wine of Ruby web frameworks
<ul>
<li>It requires a bit more work but its very rewarding</li>
</ul>
</li>
<li>Fluff-less</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.xambr.com/2009/05/28/rails-alternatives-merb-sinatra-ramaze/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Getting Classy with Sinatra</title>
		<link>http://blog.xambr.com/2009/04/07/getting-classy-with-sinatra/</link>
		<comments>http://blog.xambr.com/2009/04/07/getting-classy-with-sinatra/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 00:05:59 +0000</pubDate>
		<dc:creator>max.rb</dc:creator>
				<category><![CDATA[Discoveries]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.xambr.com/?p=85</guid>
		<description><![CDATA[I had heard about the Sinatra Ruby web DSL a while back but I had not had a chance to play with it until a few days ago. I&#8217;m happy to say it was a highly enjoyable experience. I accomplished what I was trying to do very quickly thanks to the good documentation and intuitive [...]]]></description>
			<content:encoded><![CDATA[<p>I had heard about the <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> <a href="http://www.ruby-lang.org/en/" target="_blank">Ruby</a> web DSL a while back but I had not had a chance to play with it until a few days ago. I&#8217;m happy to say it was a highly enjoyable experience. I accomplished what I was trying to do very quickly thanks to the good documentation and intuitive interface. It is not a replacement for MVC frameworks such as <a href="http://rubyonrails.org/" target="_blank">Rails</a>, <a href="http://merbivore.com/" target="_blank">Merb</a>, <a href="http://ramaze.net/" target="_blank">Ramaze</a>, etc but it certainly compliments them.</p>
<h2>Sinatra Features</h2>
<p>The <a href="http://www.sinatrarb.com/intro.html">Sinatra README</a> is a great resource for getting a run down of its features and I&#8217;m not going to regurgitate it here. However, I&#8217;d like to whet your appetite with a few of the features that caught my eye when I first scoped it out.</p>
<h3>Rides on Rack</h3>
<p><a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> rides on <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> and thus supports a wide variety of handlers such as: <a href="http://code.macournoyer.com/thin/" target="_blank">Thin</a>, <a href="http://mongrel.rubyforge.org/" target="_blank">Mongrel</a>, <a href="http://www.modrails.com/" target="_blank">Phusion Passenger</a>, etc (a full list is available on the <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> website). It can also be used to develop <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> middleware. More information about this is available on the <a href="http://www.sinatrarb.com/intro.html">README</a>. If you&#8217;re interested in Rack middleware in general, <a href="http://blog.joncrosby.me/" target="_blank">Jon Crosby</a> gave a great <a href="http://mwrc2009.confreaks.com/13-mar-2009-11-05-in-a-world-of-middleware-who-needs-monolithic-applications-jon-crosby.html" target="_blank">intro</a> at the <a href="http://mwrc2009.confreaks.com/index.html" target="_blank">Moutain West Ruby Conf 2009</a>.</p>
<h3>Flexible Routing</h3>
<p>The routing in <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> is powerful, supporting RESTful actions, named parameters, regular expressions, splats and user agents. See the Gist bellow for an example. The <a href="http://www.sinatrarb.com/intro.html">README</a> page describes these options in more detail.<br />
<script src="http://gist.github.com/91271.js"></script></p>
<h3>View/Template Support</h3>
<p>There are a host of template options available when using <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a>. Currently it supports <a href="http://haml.hamptoncatlin.com/docs/rdoc/classes/Haml.html" target="_blank">HAML</a>, <a href="http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/" target="_blank">ERB</a>, <a href="http://builder.rubyforge.org/" target="_blank">Builder</a> and <a href="http://haml.hamptoncatlin.com/docs/rdoc/classes/Sass.html" target="_blank">SASS</a> and automatic layout templates (provided you give it a &#8220;layout&#8221; template to work with). Again, checkout the <a href="http://www.sinatrarb.com/intro.html">README</a> page for more details.</p>
<h2>My Impressions</h2>
<p>What struck me while I was working with <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> was how light it was and how out of the way it stayed. It was only present when I needed it to do something — outside of that, it let me build what I wanted, how I wanted. If <a href="http://rubyonrails.org/" target="_blank">Rails</a> is the web developer&#8217;s assembly line then <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> is their essential toolkit — one drives you and the other is driven by you.</p>
<p>While having a pre-baked MVC web framework such as <a href="http://rubyonrails.org/" target="_blank">Rails</a> and <a href="http://merbivore.com/" target="_blank">Merb</a> is great, it does lock you in to one way of thinking about web development. With <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> you have the freedom to dabble and experiment — and I don&#8217;t think that can ever be a bad thing.</p>
<h2>Resources</h2>
<p>Here are some resources that I found to be useful in my first adventure with <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a>.</p>
<ul>
<li><a href="http://www.sinatrarb.com/intro.html" target="_blank">README</a></li>
<li><a href="http://www.sinatrarb.com/api/" target="_blank">API</a></li>
<li><a href="http://www.sinatrarb.com/documentation.html" target="_blank">Official Documentation Page</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide.html" target="_blank">Sinatra on Apache + Phusion Passenger</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.xambr.com/2009/04/07/getting-classy-with-sinatra/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ruby on Linux with jEdit</title>
		<link>http://blog.xambr.com/2009/03/02/ruby-on-linux-with-jedit/</link>
		<comments>http://blog.xambr.com/2009/03/02/ruby-on-linux-with-jedit/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 23:51:30 +0000</pubDate>
		<dc:creator>max.rb</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://blog.xambr.com/?p=66</guid>
		<description><![CDATA[I recently moved from Windows to a Linux development environment and needed to find good text editor &#8211; particularly one that was (or could be made) friends with Ruby. Ideally this editor would be cross platform because, on occasion I do have to load up Windows and if possible I wanted to avoid having a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently moved from Windows to a Linux development environment and needed to find good text editor &#8211; particularly one that was (or could be made) friends with Ruby. Ideally this editor would be cross platform because, on occasion I do have to load up Windows and if possible I wanted to avoid having a different editor for each environment.</p>
<p>On Windows I was using <a href="http://www.e-texteditor.com/">E</a> &#8211; but that does not run on Linux and I had a couple of gripes with it (slow loading of large files and overaggressive code completion). I gave <a href="http://www.vim.org/">Vim/gVim</a> a shot but I didn&#8217;t enjoy text-editing in a console and <a href="http://www.vim.org/">gVim</a> is ugly (yes, I do believe <a title="Chapter 3, Pragmatic Thinking and Learning by Andy Hunt" href="http://www.pragprog.com/titles/ahptl/pragmatic-thinking-and-learning">attractiveness is important</a>). I was suspicious of the IDE possibilities out there but I did give a number of them  (<a href="http://www.aptana.com/rails">RadRails</a>, <a href="http://homepage2.nifty.com/sakazuki/rde_en/">RDE</a>, <a href="http://www.eclipse.org/">Eclipse</a>, etc) a quick shot. Suffice to say they all suffered from one or more of the following: being too bloated, waving too many wands and possessing play buttons (I feel a rant coming on&#8230; stifle!).</p>
<p>Enter <a href="http://www.jedit.org/">jEdit</a>. It is a very functional, customizable, extensible, java based editor <strong>and</strong> it looks pretty good to boot. So a couple weeks ago I set it up on both my Windows and Linux installs and so far so good &#8211; it has what I want and does not suffer from the gripes I had with <a href="http://www.e-texteditor.com/">E</a>. One of my favourite features so far (keep in mind its only been a couple weeks) is it&#8217;s <a title="jEdit features" href="http://www.jedit.org/index.php?page=features">&#8220;Hyper Search&#8221;</a> which is a bit like a built in ack.</p>
<p>Currently, I&#8217;m using the following plugins (geared towards ruby/web development):</p>
<ul>
<li>Editor Scheme (for pre-fabricated syntax highlighting schemes)</li>
<li>RubyPlugin</li>
<li>Console</li>
<li>Templates</li>
</ul>
<p>One thing I did have to do in order to get Ruby ERB files to be highlighted properly was to update jEdit&#8217;s &#8220;modes&#8221; <code>catalog</code> file. On my Windows install this was located in <code>C:\Program Files\jEdit\Modes</code> and on Linux it was located in <code>/usr/share/jEdit/modes</code>. My file already contained a reference to an &#8216;rhtml&#8217; mode so I just updated it &#8211; here is the whole mode block:</p>
<pre class="code-block">  &lt;MODE NAME="erb"		FILE="erb.xml"
				FILE_NAME_GLOB="*.{.html.erb,rhtml}" /&gt;</pre>
<p>If you use that you&#8217;ll also need to rename the file <code>rhtml.xml</code> to <code>erb.xml</code> (it will be in the same directory as the catalog file).</p>
<p>As I said I&#8217;ve only been using <a href="http://www.jedit.org/">jEdit</a> for a couple of weeks but thus far I do not have anything negative to report. If that changes I&#8217;ll update this post. In the meantime, if anyone has any comments about jEdit or other options I might have overlooked please let me (and us) know.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.xambr.com/2009/03/02/ruby-on-linux-with-jedit/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
