<?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>AdaRuby &#187; Rails</title>
	<atom:link href="http://www.adaruby.com/category/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adaruby.com</link>
	<description>Rich Dynamic Applications with Ruby on Rails</description>
	<lastBuildDate>Fri, 02 Jul 2010 09:06:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rails 3 Beta Ready with Merb Goodness</title>
		<link>http://www.adaruby.com/2010/02/06/rails-3-beta-ready-with-merb-goodness/</link>
		<comments>http://www.adaruby.com/2010/02/06/rails-3-beta-ready-with-merb-goodness/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 18:01:21 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.adaruby.com/?p=167</guid>
		<description><![CDATA[
			
				
			
		
What do you get when the power of Ruby on Rails is combined with flexibility of Merb web framework? Rails 3 of course!
We have a very happy news: Rails 3 Beta is ready for testing. The improvements are numerous: ActiveRecord, ActionController, ActionView, and ActionMailer, ActiveSupport have all been redesigned. ActiveRecord got pimped with ActiveRelation scoped [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2010%2F02%2F06%2Frails-3-beta-ready-with-merb-goodness%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2010%2F02%2F06%2Frails-3-beta-ready-with-merb-goodness%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Rails 3 Beta Ready with Merb Goodness" alt=" Rails 3 Beta Ready with Merb Goodness" /><br />
			</a>
		</div>
<p>What do you get when the power of Ruby on Rails is combined with flexibility of Merb web framework? Rails 3 of course!</p>
<p>We have a very happy news: Rails 3 Beta is ready for testing. The improvements are numerous: ActiveRecord, ActionController, ActionView, and ActionMailer, ActiveSupport have all been redesigned. ActiveRecord got pimped with ActiveRelation scoped queries.</p>
<p>Some components have been refactored into their own: ActionDispatch, ActiveModel. Even better, all components can be used alone and you don&#8217;t have to require the entire Rails framework.</p>
<p>Rails is now not only Rack compatible, but subcomponents of Rails, like routing, are Rack middlewares.</p>
<p>Not to mention better dependency management system called Bundler, and improved performance especially on ActionView.</p>
<p>Read more detailed explanation on Yehuda Katz&#8217;s post:</p>
<p><a href="http://www.engineyard.com/blog/2010/rails-3-beta-is-out-a-retrospective/" rel="nofollow" >http://www.engineyard.com/blog/2010/rails-3-beta-is-out-a-retrospective/</a></p>
<p>Will you upgrade to Rails 3?</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2010/02/06/rails-3-beta-ready-with-merb-goodness/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Three Ways You Can Speed Up Your Fresh Rails Development</title>
		<link>http://www.adaruby.com/2009/12/21/three-ways-you-can-speed-up-your-fresh-rails-development/</link>
		<comments>http://www.adaruby.com/2009/12/21/three-ways-you-can-speed-up-your-fresh-rails-development/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 08:47:42 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Cloud standards]]></category>
		<category><![CDATA[controller]]></category>
		<category><![CDATA[Dojo]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Representational State Transfer]]></category>
		<category><![CDATA[resource model   REST conventions]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Software architecture]]></category>
		<category><![CDATA[web application]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[web framework]]></category>

		<guid isPermaLink="false">http://www.adaruby.com/?p=156</guid>
		<description><![CDATA[
			
				
			
		
A Ruby on Rails web application I&#8217;ve been developing uses Dojo-based full AJAX frontend. I learned some new tricks during development, relearned old pitfalls, and found some mistakes that I&#8217;d like to share with you.

Our team decided to implement the webapp in a non-conventional approach, using Dojo Toolkit-based full AJAX frontend, without using any ActionView [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2009%2F12%2F21%2Fthree-ways-you-can-speed-up-your-fresh-rails-development%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2009%2F12%2F21%2Fthree-ways-you-can-speed-up-your-fresh-rails-development%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Three Ways You Can Speed Up Your Fresh Rails Development" alt=" Three Ways You Can Speed Up Your Fresh Rails Development" /><br />
			</a>
		</div>
<p>A <strong>Ruby on Rails web application</strong> I&#8217;ve been developing uses <strong>Dojo-based full AJAX frontend</strong>. I learned some new tricks during <em>development</em>, relearned old pitfalls, and found some mistakes that I&#8217;d like to share with you.</p>
<div id="attachment_157" class="wp-caption alignleft" style="width: 300px;"><img class="size-medium wp-image-157 alignnone" title="execJumpingHurdle" src="http://www.adaruby.com/wp-content/uploads/2009/12/execJumpingHurdle-300x300.jpg" alt="execJumpingHurdle 300x300 Three Ways You Can Speed Up Your Fresh Rails Development" width="300" height="300" /></div>
<p>Our team decided to implement the webapp in a non-conventional approach, using <a href="http://www.dojotoolkit.org/" rel="nofollow"  target="_blank">Dojo Toolkit</a>-based full AJAX frontend, without using any ActionView functionality. It turned that it went quite well, but there are some things that we weren&#8217;t aware of and now we know how to deal with it, and you will too. <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' title="Three Ways You Can Speed Up Your Fresh Rails Development" /><br />
Communication between backend and frontend is done using JSON REST API. Since there is pratically no view code in the server-side app, theoretically it would be more appropriate to use Sinatra instead of Rails. But we opted for Rails because of familiarity with all its eccentricasies and exoticism. It&#8217;s not so much about learning the Sinatra framework, but more on what if we need to hack things out? (which we have personally proven to be time consuming)</p>
<h3>1. Make Good Use of Integration Tests</h3>
<p>Since the app uses SOFEA-style (Service Oriented Front End Architecture), I thought backend tests aren&#8217;t so critical as it&#8217;s replaceable by the front end (which is separate) itself.</p>
<p>I was mostly wrong. Unit tests are still needed to test the backend implementation (with regard to database).</p>
<p>But to my surprise, integration tests are more important than ever, even more than functional tests.</p>
<p>Functional (controller) tests have limited use, I tend to skip it and it can even be misleading. Example: rendering string as JSON only outputs the string, but controller test won&#8217;t know that, while integration test detects that the returned JSON is incorrect. Let me illustrate with a more concrete example.</p>
<p>Wrong output:</p>
<pre class="brush: ruby;">@message = &quot;Hello World&quot;
render :json =&gt; @message</pre>
<p>Correct output:</p>
<pre class="brush: ruby;">@message = &quot;Hello World&quot;
render :json =&gt; @message.to_sym</pre>
<p>The first example returns just: <em>Hello World</em>, without quotes, which is an incorrect JSON. Since JSON is parsed, a simple string must be surrounded by quotes (and encoded), hence the <em>to_sym</em> &#8216;hack&#8217;.</p>
<h3>2. Scaffolds Are Your Friend (or Leave Your Admin UI Alone for Now)</h3>
<p>We thought we&#8217;d say good bye to ActionView. Well, we did, but not to scaffolds.</p>
<p>At first we focused on building the Admin UI, not so long before we realize we&#8217;re trying to do something Rails is good enough to do it for a few (milli)seconds: <strong>scaffolding</strong>.</p>
<p>Building the UI with Dojo, Dijit, and DojoX was fun. When you get to know JavaScript more, it&#8217;s not as scary as its reputation. And the resulting UI is awesome.</p>
<p>But we spent too much time building the Admin UI with Dojo. It&#8217;s not that the UI is hard or that we won&#8217;t need it, but we don&#8217;t need it now.</p>
<p>Schemas may evolve (migrate), as development progresses, and we couldn&#8217;t care less about how the Admin UI looks at this point.</p>
<p>Another plus for Rails scaffolds (whichever your preferred flavor) is it can directly reflect the database. Not true with Dojo-based one. You can <em>rake db:migrate</em> or change the model and voila, your Admin UI instantly has your changes.</p>
<h3>3. Start Small</h3>
<p>Two previous tips were more concrete, but this one is less of an action and more of&#8230; Less.</p>
<p>We tried to do more with more. We actually did less.</p>
<p>Especially during new development, you need as much <em>instant gratification</em> as possible.</p>
<p><em>Do less with more.</em></p>
<p>Do something that 80% works with only 20% effort. Or better, something that 60% works just by using 1% of your time.</p>
<p>I wrote specs too, the JSON specs, resource model, REST conventions. It looked pretty good&#8230; until I found out it&#8217;s not trivial to implement them in the server (and sometimes in the frontend).</p>
<p>Not that it&#8217;s not possible, but doing that will mean lots of additional logic in the controllers. Especially since Rails isn&#8217;t primarily geared to being a REST resource framework, but a server-side MVC web framework with REST support. Even worse, these logic are duplicated in all controllers, and while trying to refactor them out, it feels like I&#8217;m building a new framework of its own.</p>
<p>My workaround was simple: <strong>Code what the app is supposed to do.</strong></p>
<p>Leave the snazzies, extras, and toppings for later.</p>
<p><em>And write tests.</em></p>
<h3>Summing It Up</h3>
<p>I&#8217;ve to say that I have been enjoying developing a SOFEA-style web application in Rails. Probably there is a better way, yet Rails is quite general-purpose: Rails doesn&#8217;t restrict us from doing what we wanted.</p>
<p><em>Writing backend tests</em> is more important in SOFEA-style than traditional MVC webapps, because the frontend may not be fully developed and you need the tests to make sure the backend works.</p>
<p>Liberal use of <em>Rails Scaffolds</em> saves time. And <em>start with the shortest code</em> that works.</p>
<p>I want to know about your experiences too, please share it in the comments.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2009/12/21/three-ways-you-can-speed-up-your-fresh-rails-development/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Use ActionView Helpers in Your Rails Controller</title>
		<link>http://www.adaruby.com/2009/12/16/how-to-use-actionview-helpers-in-your-rails-controller/</link>
		<comments>http://www.adaruby.com/2009/12/16/how-to-use-actionview-helpers-in-your-rails-controller/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 06:01:09 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.adaruby.com/2009/12/16/how-to-use-actionview-helpers-in-your-rails-controller/</guid>
		<description><![CDATA[
			
				
			
		

  
Sometimes when developing a  Ruby on Rails web application, you want to  use an ActionView helper method inside your controller. The following tip is from  Gabriel Gironda 1.
This is incredibly straightforward and more of an occasional convenience, but I thought I&#8217;d throw it out there anyway.
One use case is to [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2009%2F12%2F16%2Fhow-to-use-actionview-helpers-in-your-rails-controller%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2009%2F12%2F16%2Fhow-to-use-actionview-helpers-in-your-rails-controller%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="How to Use ActionView Helpers in Your Rails Controller" alt=" How to Use ActionView Helpers in Your Rails Controller" /><br />
			</a>
		</div>
<div>
<p> <img border="0" height="282" name="graphics1" src="http://www.adaruby.com/wp-content/uploads/2009/12/sbres_1260943259_0__.jpg" width="425" title="How to Use ActionView Helpers in Your Rails Controller" alt="sbres 1260943259 0   How to Use ActionView Helpers in Your Rails Controller" /> </p>
<p>Sometimes when developing a  <i>Ruby on Rails web application</i>, you want to  <b>use an ActionView helper method inside your controller</b>. The following tip is from  <a href="http://gabriel.gironda.org/articles/2006/02/08/using-helpers-inside-a-controller" rel="nofollow" >Gabriel Gironda</a> <a href="#sdfootnote1sym" rel="nofollow" class="sdfootnoteanc"  id="sdfootnote1anc" name="sdfootnote1anc"><sup>1</sup></a>.</p>
<p>This is incredibly straightforward and more of an occasional convenience, but I thought I&#8217;d throw it out there anyway.</p>
<p>One use case is to use  <tt>pluralize()</tt> in a flash message and not have to do it by hand using the inflector. You could include  <tt>ActionView::Helpers::TextHelper</tt> in the controller, but that fills your namespace with crap.</p>
<p>Put this in the class  <tt>ApplicationController</tt> instead:</p>
<pre>
<pre class="brush: ruby;">
  def help
    Helper.instance
  end

  class Helper
    include Singleton
    include ActionView::Helpers::TextHelper
  end
</pre>
</pre>
<p>Then you can just use it like so:</p>
<pre>
<pre class="brush: ruby;">
  def check_for_max_donkeys
    if Donkey.find_fit_donkeys.size ==
APP_SETTINGS['max_fit_donkeys']
      flash_error &amp;quot;The maximum of
#{help.pluralize(APP_SETTINGS['max_fit_donkeys'], 'donkey')} has
been reached.&amp;quot;
      redirect_to_index
    end
  end
</pre>
</pre>
<p>Don&#8217;t use the method name &#8220;helper&#8221; because Rails already uses that. Just &#8220;help&#8221; works fine.</p>
<div id="sdfootnote1">
<p class="sdfootnote"> <a href="#sdfootnote1anc" rel="nofollow" class="sdfootnotesym"  id="sdfootnote1sym" name="sdfootnote1sym">1</a> <a href="http://gabriel.gironda.org/articles/2006/02/08/using-helpers-inside-a-controller" rel="nofollow" >http://gabriel.gironda.org/articles/2006/02/08/using-helpers-inside-a-controller</a> </p>
</div>
<p><br clear="left"></div>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2009/12/16/how-to-use-actionview-helpers-in-your-rails-controller/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ruby Quick Reference</title>
		<link>http://www.adaruby.com/2008/03/22/ruby-quickref/</link>
		<comments>http://www.adaruby.com/2008/03/22/ruby-quickref/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 06:41:50 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/03/22/ruby-quickref/</guid>
		<description><![CDATA[
			
				
			
		
While using Ruby for your projects, you may need some references.
These are some references that might help you in using Ruby:


Language 

General Syntax Rules

Comments start with a pound/sharp (#) character and go to EOL.
Ruby programs are sequence of expressions.
Each expression is delimited by semicolons(;) or newlines unless obviously incomplete (e.g. trailing &#8216;+&#8217;).
Backslashes at the end [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F22%2Fruby-quickref%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F22%2Fruby-quickref%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Ruby Quick Reference" alt=" Ruby Quick Reference" /><br />
			</a>
		</div>
<p>While using Ruby for your projects, you may need some references.</p>
<p>These are some references that might help you in using Ruby:</p>
<blockquote>
<ul>
<li><strong>Language </strong></li>
</ul>
<blockquote><p><a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#2" rel="nofollow" >General Syntax Rules</a></p>
<ul>
<li>Comments start with a pound/sharp (#) character and go to EOL.</li>
<li>Ruby programs are sequence of expressions.</li>
<li>Each expression is delimited by semicolons(;) or newlines unless obviously incomplete (e.g. trailing &#8216;+&#8217;).</li>
<li>Backslashes at the end of line does not terminate expression.</li>
</ul>
<p><a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#3" rel="nofollow" >Reserved words</a></p>
<pre>alias   and     BEGIN   begin   break   case    class   def     defined
do      else    elsif   END     end     ensure  false   for     if
in      module  next    nil     not     or      redo    rescue  retry
return  self    super   then    true    undef   unless  until   when
while   yield</pre>
</blockquote>
<blockquote><p><a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#4" rel="nofollow" >Type</a></p>
<p>Basic types are numbers, strings, ranges, regexen, symbols, arrays, and hashes. Also included are files because they are used so often.</p></blockquote>
<blockquote><p><a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#16" rel="nofollow" >Variables</a></p>
<pre>$global_variable
@@class_variable
@instance_variable
[OtherClass::]CONSTANT
local_variable</pre>
</blockquote>
<ul>
<li><strong>Standard Library</strong></li>
</ul>
<blockquote><p>Ruby comes with an extensive library of classes and modules. Some are built-in, and some are part of the standard library. You can distinguish the two by the fact that the built-in classes are in fact, built-in. There are no dot-rb files for them.</p></blockquote>
<blockquote><p><a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#38" rel="nofollow" >Built-in Library</a></p>
<p>Class Hierarchy:</p>
<blockquote><p>Object</p>
<ul>
<li>Hash</li>
<li>Symbol</li>
<li>IO
<ul>
<li>File</li>
</ul>
</li>
<li>Continuation</li>
<li>File::Stat</li>
<li>Data</li>
<li>NilClass</li>
<li>Exception (see tree above)</li>
<li>Array</li>
<li>Proc</li>
<li>String</li>
</ul>
</blockquote>
</blockquote>
<blockquote><p><a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#41" rel="nofollow" >Standard Library</a></p>
<p>The essentials:</p>
<ul>
<li>
<ul>
<li>benchmark.rb  a simple benchmarking utility</li>
</ul>
<ul>
<li>cgi-lib.rb	decode CGI data &#8211; simpler than cgi.rb</li>
</ul>
<ul>
<li>cgi.rb        CGI interaction</li>
</ul>
<ul>
<li>date.rb	date object (compatible)</li>
</ul>
<ul>
<li>debug.rb	ruby debugger</li>
</ul>
<ul>
<li>delegate.rb	delegate messages to other object</li>
</ul>
<ul>
<li>English.rb	access global variables by english names</li>
</ul>
<ul>
<li>fileutils.rb  file utility methods for copying, moving, removing, etc.</li>
</ul>
</li>
</ul>
</blockquote>
<ul>
<li><strong>Tools</strong>:  <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#43" rel="nofollow" >ruby</a>(<a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#44" rel="nofollow" >Command Line Options</a>, <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#45" rel="nofollow" >Environment Variables</a>),  <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#46" rel="nofollow" >irb</a>, <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#47" rel="nofollow" >xmp</a>, <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#48" rel="nofollow" >ruby-mode</a>, <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#49" rel="nofollow" >Debugger</a>, <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#50" rel="nofollow" >rdoc</a></li>
</ul>
<ul>
<li><strong>Mindshare, Idiom and Patterns</strong> (<a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#52" rel="nofollow" >Object Design</a>, <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html#57" rel="nofollow" >Other Third-party Libraries</a>)</li>
</ul>
</blockquote>
<p>For further details visit <a href="http://www.zenspider.com/Languages/Ruby/QuickRef.html" rel="nofollow" >Ruby Quick Reference page at ZenSpider</a>.</p>
<blockquote>
<blockquote></blockquote>
</blockquote>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/03/22/ruby-quickref/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Regular Expressions with Ruby</title>
		<link>http://www.adaruby.com/2008/03/18/using-regular-expressions-with-ruby/</link>
		<comments>http://www.adaruby.com/2008/03/18/using-regular-expressions-with-ruby/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 06:41:54 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/03/18/using-regular-expressions-with-ruby/</guid>
		<description><![CDATA[
			
				
			
		
Ruby is a high level, object-oriented open source scripting language. It has excellent support for regular expressions as a language feature.
In Ruby, a regular expression is written in the form of /pattern/modifiers where &#8220;pattern&#8221; is the regular expression itself, and &#8220;modifiers&#8221; are a series of characters indicating various options. The &#8220;modifiers&#8221; part is optional. This [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F18%2Fusing-regular-expressions-with-ruby%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F18%2Fusing-regular-expressions-with-ruby%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Using Regular Expressions with Ruby" alt=" Using Regular Expressions with Ruby" /><br />
			</a>
		</div>
<p>Ruby is a high level, object-oriented open source scripting language. It has excellent support for regular expressions as a language feature.</p>
<blockquote><p>In Ruby, a regular expression is written in the form of <tt>/pattern/modifiers</tt> where &#8220;pattern&#8221; is the regular expression itself, and &#8220;modifiers&#8221; are a series of characters indicating various options. The &#8220;modifiers&#8221; part is optional. This syntax is borrowed from <a href="http://www.regular-expressions.info/perl.html" rel="nofollow" >Perl</a>.</p></blockquote>
<blockquote><p>Ruby supports the following <a href="http://www.regular-expressions.info/modifiers.html" rel="nofollow" >modifiers</a>:</p>
<ul>
<li><tt>/i</tt> makes the regex match case insensitive.</li>
<li><tt>/m</tt> makes <a href="http://www.regular-expressions.info/dot.html" rel="nofollow" >the dot match newlines</a>.  Ruby indeed uses /m, whereas Perl and many other programming languages use /s for &#8220;dot matches newlines&#8221;.</li>
<li><tt>/x</tt> tells Ruby to <a href="http://www.regular-expressions.info/freespacing.html" rel="nofollow" >ignore whitespace between regex tokens</a>.</li>
<li><tt>/o</tt> causes any #{&#8230;} substitutions in a particular regex literal to be performed just once, the first time it is evaluated. Otherwise, the substitutions will be performed every time the literal generates a Regexp object.</li>
</ul>
<p>You can combine multiple modifiers by stringing them together as in <tt>/regex/is</tt>.</p></blockquote>
<blockquote><p>In Ruby, the <a href="http://www.regular-expressions.info/anchors.html" rel="nofollow" >caret and dollar always match before and after newlines</a>.  Ruby does not have a modifier to change this.  Use <tt>\A</tt> and <tt>\Z</tt> to <a href="http://www.regular-expressions.info/anchors.html#az" rel="nofollow" >match at the start or the end of the string</a>.</p></blockquote>
<blockquote><p>Since forward slashes delimit the regular expression, any forward slashes that appear in the regex need to be escaped. E.g. the regex <tt>1/2</tt> is written as <tt>/1\/2/</tt> in Ruby.</p></blockquote>
<p>Read more on: <a href="http://www.regular-expressions.info/ruby.html" rel="nofollow" >Regular-Expressions.info home page</a>.</p>
<blockquote>
<blockquote></blockquote>
<blockquote></blockquote>
</blockquote>
<blockquote></blockquote>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/03/18/using-regular-expressions-with-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced Rails: Go to the next level with Rails</title>
		<link>http://www.adaruby.com/2008/03/16/advanced-rails-go-to-the-next-level-with-rails/</link>
		<comments>http://www.adaruby.com/2008/03/16/advanced-rails-go-to-the-next-level-with-rails/#comments</comments>
		<pubDate>Sun, 16 Mar 2008 08:00:52 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/03/16/advanced-rails-go-to-the-next-level-with-rails/</guid>
		<description><![CDATA[
			
				
			
		

Advanced Rails offers you an in-depth look at techniques for dealing with databases, security, performance, web services and much more.
O&#8217;Reilly Media, Inc. published an intermediate-to-expert Rails book, authored by Brad Ediger:
Chapters in this book help you understand not only the tricks and techniques used within the Rails framework itself, but also how to make use [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F16%2Fadvanced-rails-go-to-the-next-level-with-rails%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F03%2F16%2Fadvanced-rails-go-to-the-next-level-with-rails%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Advanced Rails: Go to the next level with Rails" alt=" Advanced Rails: Go to the next level with Rails" /><br />
			</a>
		</div>
<p><a href="http://www.amazon.com/gp/product/0596510322?ie=UTF8&amp;tag=adaruby-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0596510322" rel="nofollow"  title="Advanced Rails book cover"><img src="http://localhost/~ceefour/adaruby.com/wp-content/uploads/2008/03/212klm7sfl_aa_sl160_.jpg" alt="Advanced Rails" title="Advanced Rails: Go to the next level with Rails" /></a></p>
<p><strong><a href="http://www.amazon.com/dp/0596510322?tag=adaruby-20&amp;camp=0&amp;creative=0&amp;linkCode=as1&amp;creativeASIN=0596510322&amp;adid=16BDDCJ0N0X01HK3VGQ0&amp;" rel="nofollow"  title="Advanced Rails on Amazon.com">Advanced Rails</a></strong> offers you an in-depth look at techniques for dealing with databases, security, performance, web services and much more.</p>
<p><a href="http://www.oreilly.com/" rel="nofollow" >O&#8217;Reilly Media</a>, Inc. published an intermediate-to-expert Rails book, authored by <a href="http://www.amazon.com/exec/obidos/search-handle-url/103-4936069-1092629?%5Fencoding=UTF8&amp;search-type=ss&amp;index=books&amp;field-author=Brad%20Ediger" rel="nofollow" >Brad Ediger</a>:</p>
<blockquote><p>Chapters in this book help you understand not only the tricks and techniques used within the Rails framework itself, but also how to make use of ideas borrowed from other programming paradigms. Advanced Rails pays particular attention to building applications that scale &#8212; whether &#8220;scale&#8221; means handling more users, or working with a bigger and more complex database.</p></blockquote>
<blockquote></blockquote>
<p>You&#8217;ll find plenty of examples and code samples that explain:</p>
<blockquote>
<ul>
<li>Aspects of Ruby that are often confusing or misunderstood</li>
<li>Metaprogramming</li>
<li>How to develop Rails plug-ins Different database management systems</li>
<li>Advanced database features, including triggers, rules, and stored procedures</li>
<li>How to connect to multiple databases</li>
<li>When to use the Active Support library for generic, reusable functions Security principles for web application design, and security issues endemic to the Web When and when not to optimize performance</li>
<li>Why version control and issue tracking systems are essential to any large or long-lived Rails project</li>
<li>Advanced Rails also gives you a look at REST for developing web services, ways to incorporate and extend Rails, how to use internationalization, and many other topics.</li>
</ul>
</blockquote>
<p><a href="http://www.amazon.com/dp/0596510322?tag=adaruby-20&amp;camp=14573&amp;creative=327641&amp;linkCode=as1&amp;creativeASIN=0596510322&amp;adid=1B5PH5PSP8TRB70WQNQC&amp;" rel="nofollow" >Advanced Rails</a> is an essential resource for improving your skills on Rails through advanced techniques.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/03/16/advanced-rails-go-to-the-next-level-with-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Morph Application Platform Simplifies Ruby on Rails Development</title>
		<link>http://www.adaruby.com/2008/02/16/morph-application-platform-simplifies-ruby-on-rails-development/</link>
		<comments>http://www.adaruby.com/2008/02/16/morph-application-platform-simplifies-ruby-on-rails-development/#comments</comments>
		<pubDate>Sun, 17 Feb 2008 03:46:07 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Cool]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[284]]></category>
		<category><![CDATA[289]]></category>
		<category><![CDATA[296]]></category>
		<category><![CDATA[299]]></category>
		<category><![CDATA[300]]></category>
		<category><![CDATA[302]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/02/16/morph-application-platform-simplifies-ruby-on-rails-development/</guid>
		<description><![CDATA[
			
				
			
		

Morph Labs is currently beta-testing their next-generation solution in application deployment, delivery, and management, the Morph Application Platform.
Acquiring hardware and configuring software to support web apps are things of the past. Morph Labs brings you the next-generation solution in application deployment, delivery, and management. Reduce your time to market and lower your startup costs no [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F02%2F16%2Fmorph-application-platform-simplifies-ruby-on-rails-development%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F02%2F16%2Fmorph-application-platform-simplifies-ruby-on-rails-development%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Morph Application Platform Simplifies Ruby on Rails Development" alt=" Morph Application Platform Simplifies Ruby on Rails Development" /><br />
			</a>
		</div>
<p><a href="http://www.morphexchange.com/" rel="nofollow" ><img src="http://www.adaruby.com/wp-content/uploads/2008/02/morph-logo.jpg" alt="Morph logo" title="Morph Application Platform Simplifies Ruby on Rails Development" /></a></p>
<p><strong><a href="http://mor.ph/" rel="nofollow" >Morph Labs</a></strong> is currently beta-testing their next-generation solution in application deployment, delivery, and management, the <a href="http://www.morphexchange.com/map_info" rel="nofollow" >Morph Application Platform</a>.</p>
<blockquote><p>Acquiring hardware and configuring software to support web apps are things of the past. Morph Labs brings you the next-generation solution in application deployment, delivery, and management. Reduce your time to market and lower your startup costs no matter if you are an ISV, a developer or a business.</p></blockquote>
<p><strong>About Morph Labs</strong></p>
<blockquote><p><strong>Morph Labs Inc.</strong> <a href="http://www.morphexchange.com/" rel="nofollow" >www.morphexchange.com</a> is a Philippine-based Web 2.0 technology company focused on providing innovative technologies and applications to support Software as a Service (SaaS) globally.</p></blockquote>
<blockquote></blockquote>
<blockquote><p> Morph offers independent software vendors (ISVs), IT consulting organizations, application developers and entrepreneurs the quickest and simplest route to SaaS-enablement. Morph simplifies deployment and management of software as a service with an elastic Web 2.0 delivery and management solution &#8212; the Morph Application Platform.</p></blockquote>
<blockquote></blockquote>
<blockquote><p>Morph Application Platform, powered by Amazon EC2 grid computing technology, combines the elasticity in delivering and managing Web 2.0 applications and the simplicity of deploying software as a service (SaaS).</p>
<p>With no hardware to buy and no software to install and configure, Morph allows developers to easily grow or shrink their application environment on demand without disruption to the application. The Morph Application Platform is offered through a subscription to a Morph AppSpace, which is an instance of the Morph Application Platform.</p></blockquote>
<blockquote><p>Beyond delivery platforms and managed services, Morph will build simplified software applications (that run on our platform) that leverage open source technologies for small and medium businesses.</p>
<p>Morph&#8217;s first on-demand application is Morph helpME (released October 2007), provided via the software as a service model and runs on top of the Morph Application Platform. It&#8217;s an on-demand help and training system that enables sharing of knowledge while reducing overall cost and technical burden.</p>
<p>Morph <a href="http://helpme.morphexchange.com/ruby" rel="nofollow" >helpME</a> is a Ruby on Rails application running on the Morph Application Platform. It&#8217;s automatically formats, structures and creates menus, enabling faster deployment of new content.</p></blockquote>
<p>If you are Ruby on Rails developers, bring your on-demand application to life with the Morph Application and leave the details to us!</p>
<p>Visit <a href="http://mor.ph/" rel="nofollow" >Morph home page</a> to find out more!</p>
<blockquote></blockquote>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/02/16/morph-application-platform-simplifies-ruby-on-rails-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rearranging Stuff Notice, `Experience Report&#8217; Coming Up Soon!</title>
		<link>http://www.adaruby.com/2008/02/10/rearranging-stuff-notice-experience-report-coming-up-soon/</link>
		<comments>http://www.adaruby.com/2008/02/10/rearranging-stuff-notice-experience-report-coming-up-soon/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 00:13:32 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Opinions]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rails Hosting]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[305]]></category>
		<category><![CDATA[317]]></category>
		<category><![CDATA[321]]></category>
		<category><![CDATA[324]]></category>
		<category><![CDATA[328]]></category>
		<category><![CDATA[335]]></category>
		<category><![CDATA[355]]></category>
		<category><![CDATA[356]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/02/10/rearranging-stuff-notice-experience-report-coming-up-soon/</guid>
		<description><![CDATA[
			
				
			
		
I&#8217;d like to express a warm notice that AdaRuby.com might be down intermittently as we&#8217;ll be having major rearrangement and server upgrades of our hosting facilities in the coming days.

The upside is, when it&#8217;s done (and oh YES it will be done!), I&#8217;ll be providing you interesting information on the stuff that we&#8217;re doing, especially [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F02%2F10%2Frearranging-stuff-notice-experience-report-coming-up-soon%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F02%2F10%2Frearranging-stuff-notice-experience-report-coming-up-soon%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Rearranging Stuff Notice, `Experience Report&#8217; Coming Up Soon!" alt=" Rearranging Stuff Notice, `Experience Report&#8217; Coming Up Soon!" /><br />
			</a>
		</div>
<p>I&#8217;d like to express a warm notice that AdaRuby.com might be down intermittently as we&#8217;ll be having major rearrangement and server upgrades of our hosting facilities in the coming days.</p>
<p><a href="http://www.flickr.com/photos/asmundur/2209570995/" rel="nofollow"  title="Maintenance, rearranging, server upgrades"><img src="http://farm3.static.flickr.com/2112/2209570995_3969af4b35.jpg" title="Rearranging Stuff Notice, `Experience Report&#8217; Coming Up Soon!" alt="2209570995 3969af4b35 Rearranging Stuff Notice, `Experience Report&#8217; Coming Up Soon!" /></a></p>
<p>The upside is, when it&#8217;s done (and oh YES it will be done!), I&#8217;ll be providing you interesting information on the stuff that we&#8217;re doing, especially our experience regarding the hosting services that we have been using all this time.</p>
<p>Looking forward to hearing you share your experience as well!</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/02/10/rearranging-stuff-notice-experience-report-coming-up-soon/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails Web Hosting for Canadian Sites</title>
		<link>http://www.adaruby.com/2008/02/05/ruby-on-rails-web-hosting-for-canadian-sites/</link>
		<comments>http://www.adaruby.com/2008/02/05/ruby-on-rails-web-hosting-for-canadian-sites/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 00:18:48 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Rails Hosting]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[296]]></category>
		<category><![CDATA[313]]></category>
		<category><![CDATA[314]]></category>
		<category><![CDATA[317]]></category>
		<category><![CDATA[328]]></category>
		<category><![CDATA[351]]></category>
		<category><![CDATA[355]]></category>
		<category><![CDATA[357]]></category>
		<category><![CDATA[365]]></category>
		<category><![CDATA[367]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/02/05/ruby-on-rails-web-hosting-for-canadian-sites/</guid>
		<description><![CDATA[
			
				
			
		
Canadian Web Hosting provides shared, VPS, and dedicated web hosting for Canadian sites. They operate from a 1st Class Colocation       facility located at Harbour Center       in downtown Vancouver, BC, Canada. The advantage to international (i.e. non-Canadian) hosting services are obvious: they are much [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F02%2F05%2Fruby-on-rails-web-hosting-for-canadian-sites%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F02%2F05%2Fruby-on-rails-web-hosting-for-canadian-sites%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Ruby on Rails Web Hosting for Canadian Sites" alt=" Ruby on Rails Web Hosting for Canadian Sites" /><br />
			</a>
		</div>
<p><a href="http://www.canadianwebhosting.com/" rel="nofollow" >Canadian Web Hosting</a> provides shared, VPS, and dedicated web hosting for Canadian sites. They operate from a 1st Class Colocation       facility located at Harbour Center       in downtown Vancouver, BC, Canada. The advantage to international (i.e. non-Canadian) hosting services are obvious: they are much faster to access from Canada (with an added bonus that you pay in your native Canadian Dollars currency! <img src='http://www.adaruby.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' title="Ruby on Rails Web Hosting for Canadian Sites" />  Hence, if your customers and/or your business is <a href="http://www.canadaonrails.org/" rel="nofollow" >based on Canada</a>, hosting your Rails site with them might be a perfect fit.</p>
<p>The shared hosting plans offered by Canadian Web Hosting starts from the tight-budget CAD$3.95/mo (2 year prepayment). Ruby on Rails support is provided with the <a href="http://www.canadianwebhosting.com/standard_hosting.asp" rel="nofollow" >CA Pro plan</a> which is only CAD$15.95/month (2 year prepayment), with 3500 GB bandwidth, and 300 GB space. All the &#8220;standard&#8221; web hosting stuff, like PHP 4/5, MySQL,  are available, including support for advanced features such as PostgreSQL, SSH, ColdFusion MX 8 (seriously), ImageMagick, <a href="http://www.canadianwebhosting.com/standard_hosting.asp" rel="nofollow" >and more</a>.</p>
<p>There&#8217;s no initial setup fee (hosting account setup is free!) and they provide 30-day money-back guarantee. So you can try their services and features without risking anything, really.</p>
<p><a href="http://www.canadianwebhosting.com/vps.asp" rel="nofollow" >VPS plans</a> are also available starting from an affordable CAD$25.95/month (2 year prepaid), that some of you demanding more control would prefer. They also provide Intel Dual Core and Quad-Core Xeon-powered <a href="http://www.canadianwebhosting.com/dedicated-server-hosting.asp" rel="nofollow" >dedicated servers</a> (with Red Hat/CentOS operating system), which would be more cost-effective for those who have larger number of clients or require better stability and guaranteed resources.</p>
<p>This is a sponsored post.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/02/05/ruby-on-rails-web-hosting-for-canadian-sites/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Overview of A Rails Plugin</title>
		<link>http://www.adaruby.com/2008/01/27/overview-of-a-rails-plugin/</link>
		<comments>http://www.adaruby.com/2008/01/27/overview-of-a-rails-plugin/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 11:48:23 +0000</pubDate>
		<dc:creator>ceefour</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[294]]></category>
		<category><![CDATA[296]]></category>
		<category><![CDATA[344]]></category>

		<guid isPermaLink="false">http://adaruby.com/2008/01/27/overview-of-a-rails-plugin/</guid>
		<description><![CDATA[
			
				
			
		
A common stumbling block for beginner Rails developers is learning the basics required to write plugins. This is made more complicated by the fact that Ruby is inherently dynamic and offers many techniques for code reuse.
Luckily, if you can write Rails applications you can write plugins by simply drawing on a handful of basic patterns.
Why [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F27%2Foverview-of-a-rails-plugin%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.adaruby.com%2F2008%2F01%2F27%2Foverview-of-a-rails-plugin%2F&amp;source=AdaRubyWeb&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Overview of A Rails Plugin" alt=" Overview of A Rails Plugin" /><br />
			</a>
		</div>
<p><a href="http://www.alexyoung.org/" rel="nofollow" >A common stumbling block for beginner Rails developers</a> is learning the basics required to write plugins. This is made more complicated by the fact that Ruby is inherently dynamic and offers many techniques for code reuse.</p>
<p>Luckily, if you can write Rails applications you can write plugins by simply drawing on a handful of basic patterns.</p>
<p><strong>Why write plugins?</strong></p>
<blockquote><p>Writing a plugin will:</p>
<ul>
<li>Help make sharing code more efficient, whether it’s between projects or within the same project</li>
<li>Allow you to publish generic code to the community</li>
<li>Save time and increase your confidence by testing once and reusing many times</li>
<li>Share functionality in a robust manner, especially when using namespaces with ActiveRecord</li>
</ul>
</blockquote>
<p><strong>Usage</strong></p>
<blockquote><p>Rails provides installation scripts through <tt>script/plugin install</tt>, and a generator for creating new plugins: <tt>script/generate plugin</tt>. These will work with URLs, saving time when trying out plugins. You can read more about installing and managing plugins at the <a href="http://wiki.rubyonrails.org/rails/pages/Plugins" rel="nofollow" >Rails wiki</a>.</p></blockquote>
<p><strong>Rubyisms</strong></p>
<blockquote><p>Any of the following tools and techniques provided by Ruby are used by plugins to extend functionality:</p>
<ul>
<li>Mixins: including or extending classes using modules</li>
<li>Opening a class or module definition and adding or overriding methods</li>
<li>Dynamic extension through callbacks and hooks: <tt>method_missing</tt>, <tt>Class#inherited</tt>, <tt>Module#const_missing</tt>, <tt>Module#included</tt></li>
<li>Dynamic extension through code generation: <tt>eval</tt>, <tt>class_eval</tt>, <tt>instance_eval</tt></li>
</ul>
<p>These techniques fall into two broad categories:</p>
<ul>
<li>Using modules and classes to extend existing classes, providing new features</li>
<li>Using introspection to adapt generic code to specific cases</li>
</ul>
<p>It’s important to consider exactly what should be extended when writing a plugin. If complex meta-programming to adapt your plugin to the host application is required, care should be taken to ensure concurrency will not produce unexpected results.</p></blockquote>
<p>Hopefully this very short summary clears things a bit. Read more on  <a href="http://alexyoung.org/articles/show/40/a_taxonomy_of_rails_plugins" rel="nofollow" >Alex Young&#8217;s article</a>.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.adaruby.com/2008/01/27/overview-of-a-rails-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
