<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>40withegg: a tasty, filling meal for your mind: Posts</title>
    <description>a tasty, filling meal for your mind</description>
    <link>http://40withegg.com/posts?format=rss</link>
    <item>
      <title>NYC sidewalk with tourist lane: culprits revealed</title>
      <description>&lt;embed src="http://www.youtube.com/v/RKx0aek1T0w&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;rel=0&amp;amp;color1=0x5d1719&amp;amp;color2=0xcd311b&amp;amp;border=1" allowScriptAccess="never" allowFullScreen="true" width="580" height="360" wmode="transparent" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;

&lt;br&gt;&lt;br&gt;
Several weeks ago, Cory &lt;a href="http://www.boingboing.net/2010/05/20/nyc-sidewalk-with-a.html"&gt;posted&lt;/a&gt; about a prankster painting a "tourist lane" on a busy New York City sidewalk. Turns out, the culprits were none other than our friends at Improv Everywhere! Bravo! &lt;a href="http://improveverywhere.com/2010/06/08/the-tourist-lane/"&gt;"The Tourist Lane"&lt;/a&gt;&lt;br style="clear:both"&gt;
&lt;br style="clear:both"&gt;
&lt;a href="http://ads.pheedo.com/click.phdo?s=9046191351f708fa259fd01878eaa0f2&amp;amp;p=1"&gt;&lt;img alt="" style="border:0" border="0" src="http://ads.pheedo.com/img.phdo?s=9046191351f708fa259fd01878eaa0f2&amp;amp;p=1"&gt;&lt;/a&gt;
&lt;img alt="" height="0" width="0" border="0" src="http://a.triggit.com/px?u=pheedo&amp;amp;rtv=TechCons&amp;amp;rtv=p28925&amp;amp;rtv=f7604"&gt;&lt;img alt="" height="0" width="0" border="0" src="http://pixel.quantserve.com/pixel/p-8bUhLiluj0fAw.gif?labels=pub.28925.rss.TechCons.7604,cat.TechCons.rss"&gt;&lt;img src="http://feeds.feedburner.com/~r/boingboing/iBag/~4/lMm3068HD0Y" height="1" width="1"&gt;</description>
      <author>Joseph's shared items in Google Reader</author>
      <guid>http://feedproxy.google.com/~r/boingboing/iBag/~3/lMm3068HD0Y/nyc-sidewalk-with-to-1.html</guid>
      <pubDate>Wed, 09 Jun 2010 22:57:35 -0400</pubDate>
      <link>http://feedproxy.google.com/~r/boingboing/iBag/~3/lMm3068HD0Y/nyc-sidewalk-with-to-1.html</link>
    </item>
    <item>
    </item>
    <item>
    </item>
    <item>
    </item>
    <item>
      <title>RSS Feed Pillow</title>
      <description>&lt;img src="http://www.boingboing.net/images/RSSpillllll.jpg" height="405" width="400" border="1" align="left" hspace="4" vspace="4" alt="Rsspillllll"&gt;

Justin of Chicago's Craftsquatch handmakes these bold RSS Feed Icon Pillows. They're $20 at the &lt;a href="http://makersmarket.com/collections/boing-boing-bazaar"&gt;Boing Boing Bazaar&lt;/a&gt; in the &lt;a href="http://makersmarket.com"&gt;Makers Market&lt;/a&gt;. As Justin says, "It will certainly aggregate all your thoughts and dreams into order, giving you real simple sleep." &lt;a href="http://makersmarket.com/products/rss-feed-icon-pillow"&gt;RSS Feed Icon Pillow&lt;/a&gt;&lt;br style="clear:both"&gt;
&lt;br style="clear:both"&gt;
&lt;a href="http://ads.pheedo.com/click.phdo?s=9a9a189d28d33c69ddcc6e58fd249945&amp;amp;p=1"&gt;&lt;img alt="" style="border:0" border="0" src="http://ads.pheedo.com/img.phdo?s=9a9a189d28d33c69ddcc6e58fd249945&amp;amp;p=1"&gt;&lt;/a&gt;
&lt;img alt="" height="0" width="0" border="0" src="http://a.triggit.com/px?u=pheedo&amp;amp;rtv=TechCons&amp;amp;rtv=p28925&amp;amp;rtv=f7604"&gt;&lt;img alt="" height="0" width="0" border="0" src="http://pixel.quantserve.com/pixel/p-8bUhLiluj0fAw.gif?labels=pub.28925.rss.TechCons.7604,cat.TechCons.rss"&gt;&lt;img src="http://feeds.feedburner.com/~r/boingboing/iBag/~4/pKn2ZUyxAF8" height="1" width="1"&gt;</description>
      <author>Joseph's shared items in Google Reader</author>
      <guid>http://feedproxy.google.com/~r/boingboing/iBag/~3/pKn2ZUyxAF8/rss-feed-pillow.html</guid>
      <pubDate>Wed, 09 Jun 2010 05:25:33 -0400</pubDate>
      <link>http://feedproxy.google.com/~r/boingboing/iBag/~3/pKn2ZUyxAF8/rss-feed-pillow.html</link>
    </item>
    <item>
      <title>RSS Feed Pillow</title>
      <description>&lt;img src="http://www.boingboing.net/images/RSSpillllll.jpg" height="405" width="400" border="1" align="left" hspace="4" vspace="4" alt="Rsspillllll"&gt;

Justin of Chicago's Craftsquatch handmakes these bold RSS Feed Icon Pillows. They're $20 at the &lt;a href="http://makersmarket.com/collections/boing-boing-bazaar"&gt;Boing Boing Bazaar&lt;/a&gt; in the &lt;a href="http://makersmarket.com"&gt;Makers Market&lt;/a&gt;. As Justin says, "It will certainly aggregate all your thoughts and dreams into order, giving you real simple sleep." &lt;a href="http://makersmarket.com/products/rss-feed-icon-pillow"&gt;RSS Feed Icon Pillow&lt;/a&gt;&lt;br style="clear:both"&gt;
&lt;br style="clear:both"&gt;
&lt;a href="http://ads.pheedo.com/click.phdo?s=9a9a189d28d33c69ddcc6e58fd249945&amp;amp;p=1"&gt;&lt;img alt="" style="border:0" border="0" src="http://ads.pheedo.com/img.phdo?s=9a9a189d28d33c69ddcc6e58fd249945&amp;amp;p=1"&gt;&lt;/a&gt;
&lt;img alt="" height="0" width="0" border="0" src="http://a.triggit.com/px?u=pheedo&amp;amp;rtv=TechCons&amp;amp;rtv=p28925&amp;amp;rtv=f7604"&gt;&lt;img alt="" height="0" width="0" border="0" src="http://pixel.quantserve.com/pixel/p-8bUhLiluj0fAw.gif?labels=pub.28925.rss.TechCons.7604,cat.TechCons.rss"&gt;</description>
      <author>Joseph's shared items in Google Reader</author>
      <guid>http://www.boingboing.net/2010/06/08/rss-feed-pillow.html</guid>
      <pubDate>Wed, 09 Jun 2010 05:17:15 -0400</pubDate>
      <link>http://www.boingboing.net/2010/06/08/rss-feed-pillow.html</link>
    </item>
    <item>
      <title>Rethinking Rails 3 Controllers and Routes</title>
      <description>&lt;blockquote&gt;Shared by  Joseph 
&lt;br&gt;
I agree that I do several mental translations every time I have to either use a REST method ("'post'... ok, that goes to 'create'...) and the url helpers (was that new_book_chapter... oh _path!)&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;This article is heavily styled and is best viewed at &lt;a href="http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes"&gt;PeepCode&lt;/a&gt;!&lt;/strong&gt;&lt;/p&gt;&lt;div&gt;
  &lt;p&gt;&lt;span&gt;DISCLAIMER&lt;/span&gt;: Reg Braithwaite delivered this quote in a completely different context&lt;sup&gt;&lt;a href="http://blog.peepcode.com/#fn1"&gt;1&lt;/a&gt;&lt;/sup&gt;, but I think it&#8217;s applicable to the design of almost any software &lt;span&gt;API&lt;/span&gt;. Illustration by Mike Rohde.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
  &lt;div&gt;
    &lt;div&gt;
      &lt;p&gt;The &lt;strong&gt;Rails router&lt;/strong&gt; has been written and rewritten at least four
      times&lt;sup&gt;&lt;a href="http://blog.peepcode.com/#fn2"&gt;2&lt;/a&gt;&lt;/sup&gt;, including a recent rewrite for the upcoming Rails
      3. The syntax is now more concise.&lt;/p&gt;
      &lt;p&gt;But never mind making it shorter! It&#8217;s time for a &lt;strong&gt;final
      rewrite&lt;/strong&gt;: Let&#8217;s get rid of it altogether!&lt;/p&gt;
      &lt;p&gt;Let&#8217;s &lt;strong&gt;get rid&lt;/strong&gt; of the &lt;strong&gt;seven controller actions&lt;/strong&gt;: &lt;code&gt;index&lt;/code&gt;,
      &lt;code&gt;show&lt;/code&gt;, &lt;code&gt;new&lt;/code&gt;, &lt;code&gt;create&lt;/code&gt;, &lt;code&gt;edit&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt; and &lt;code&gt;delete&lt;/code&gt;. Their
      meaning is blurred in the context of &lt;span&gt;REST&lt;/span&gt;. They&#8217;re an unhelpful
      layer between programmer and protocol.&lt;/p&gt;
      &lt;p&gt;Let&#8217;s get rid of the trivial but &lt;strong&gt;cumbersome mental
      translation&lt;/strong&gt; you have to do everytime you want to think about
      the &lt;span&gt;HTTP&lt;/span&gt; &lt;code&gt;GET&lt;/code&gt; method, the &lt;span&gt;URL&lt;/span&gt;, the &lt;code&gt;index&lt;/code&gt; action, and the
      &lt;code&gt;plural_path&lt;/code&gt; &lt;span&gt;URL&lt;/span&gt; helper.&lt;/p&gt;
      &lt;p&gt;Let&#8217;s get rid of &lt;strong&gt;duplicate functionality&lt;/strong&gt; already implemented
      in the controller. If you need to redirect, take action based
      on the user agent, or examine headers, that should be done in
      a controller!&lt;/p&gt;
      &lt;p&gt;And let&#8217;s &lt;strong&gt;start thinking in URLs&lt;/strong&gt;, resources, and APIs instead of
      doing image caching in models or asset bundling in
      view helpers. That&#8217;s the controller&#8217;s job. It scales better, too.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div&gt;
      
      &lt;ul&gt;
      	&lt;li&gt;Routes are unnecessary configuration.&lt;/li&gt;
      	&lt;li&gt;The seven standard controller actions are legacy.&lt;/li&gt;
      	&lt;li&gt;Become intimate with your URLs &#8211; don&#8217;t abstract them away.&lt;/li&gt;
      	&lt;li&gt;Decrease the distance between thought and implementation.&lt;/li&gt;
      	&lt;li&gt;Let the controller do its job.&lt;/li&gt;
      &lt;/ul&gt;
      &lt;li&gt;
    &lt;/li&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div&gt;
      &lt;h2&gt;Get Back to Thinking in URLs&lt;/h2&gt;
      &lt;p&gt;A big part of the problem with a routing layer is that it
      abstracts the developer away from the URLs that define the
      application. This leads to poor &lt;span&gt;API&lt;/span&gt; designs and convoluted
      solutions to otherwise easy problems.&lt;/p&gt;
      &lt;p&gt;This epiphany came while writing a few Sinatra
      applications. The exact &lt;span&gt;URL&lt;/span&gt; for a handler sits right in
      front of my eyes as I write the code for it. I can&#8217;t ignore it.&lt;/p&gt;
      &lt;p&gt;As a result, I find myself spending more time thinking about
      how my URLs are designed. Should I be serving &lt;span&gt;JSON&lt;/span&gt; from the
      same controller that serves the &lt;span&gt;HTML&lt;/span&gt; interface, or should it
      be organized separately?&lt;/p&gt;
      &lt;p&gt;In contrast, you can write an entire Rails application without
      ever looking at a &lt;span&gt;URL&lt;/span&gt;. The design of URLs is delegated to the
      framework, out of sight and out of mind.&lt;/p&gt;
      &lt;p&gt;This isn&#8217;t to say that we need to lose the good parts of how
      Rails works with URLs. &lt;span&gt;URL&lt;/span&gt; helper methods like
      &lt;code&gt;pancake_path(:id)&lt;/code&gt; are a great idea for reducing duplication
      and typos. They could be implemented apart from any router.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;blockquote&gt;I love URLs. I dream about them at night. I think about them before I think about anything else. &lt;cite&gt;&#8212; Adrian Holovaty, co-creator of Django&lt;/cite&gt;&lt;/blockquote&gt;&lt;p&gt;* From &lt;a href="http://matthewbuchanan.name/post/79527495/i-love-urls"&gt;Webstock 2009&lt;/a&gt;&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div&gt;
      &lt;h2&gt;Retire the Seven Action Names&lt;/h2&gt;
      &lt;p&gt;It has been three years since the seven controller actions had
      any immediate meaning. The &lt;span&gt;API&lt;/span&gt; no longer adds to the
      programmer&#8217;s understanding of the tasks at hand.&lt;/p&gt;
      &lt;p&gt;Experienced programmers know that inline comments mark code
      that&#8217;s too confusing or too clever.&lt;/p&gt;
      &lt;p&gt;Yet every Rails controller is generated with two lines of
      repetitive comments for every action. That&#8217;s a code smell! And
      a failure of &lt;span&gt;API&lt;/span&gt; design.&lt;/p&gt;
      &lt;p&gt;Every Rails developer must memorize the table at right,
      mapping &lt;span&gt;HTTP&lt;/span&gt; method and &lt;span&gt;URL&lt;/span&gt; to the controller action name. If
      we can get rid of the action name, the rest of the table is
      already self-explanatory.&lt;/p&gt;
      &lt;p&gt;So instead of going through this extra syntactical layer, let&#8217;s
      deal directly with &lt;span&gt;GET&lt;/span&gt;, &lt;span&gt;POST&lt;/span&gt;, &lt;span&gt;PUT&lt;/span&gt;, and &lt;span&gt;DELETE&lt;/span&gt;. (Suggestions follow.)&lt;/p&gt;
      &lt;p&gt;You can tell this is a great idea because it&#8217;s the way unit tests
      already work! Let&#8217;s bring this syntax back to the controller and
      complete the &lt;span&gt;API&lt;/span&gt;.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;table&gt;
      	&lt;tbody&gt;&lt;tr&gt;
      		&lt;th&gt;Method&lt;/th&gt;
      		&lt;th&gt;&lt;span&gt;URL&lt;/span&gt;&lt;/th&gt;
      		&lt;th&gt;Action&lt;/th&gt;
      		&lt;th&gt;Helper&lt;/th&gt;
      	&lt;/tr&gt;
      	&lt;tr&gt;
      		&lt;td&gt;&lt;span&gt;GET&lt;/span&gt;&lt;/td&gt;
      		&lt;td&gt;/pancakes&lt;/td&gt;
      		&lt;td&gt;index&lt;/td&gt;
      		&lt;td&gt;pancakes_path&lt;/td&gt;
      	&lt;/tr&gt;
      	&lt;tr&gt;
      		&lt;td&gt; &lt;span&gt;GET&lt;/span&gt;&lt;/td&gt;
      		&lt;td&gt;/pancakes/:id&lt;/td&gt;
      		&lt;td&gt;show&lt;/td&gt;
      		&lt;td&gt;pancake_path(:id)&lt;/td&gt;
      	&lt;/tr&gt;
      	&lt;tr&gt;
      		&lt;td&gt;&lt;span&gt;GET&lt;/span&gt;&lt;/td&gt;
      		&lt;td&gt;/pancakes/new&lt;/td&gt;
      		&lt;td&gt;new&lt;/td&gt;
      		&lt;td&gt;new_pancake_path&lt;/td&gt;
      	&lt;/tr&gt;
      	&lt;tr&gt;
      		&lt;td&gt; &lt;span&gt;POST&lt;/span&gt;&lt;/td&gt;
      		&lt;td&gt;/pancakes&lt;/td&gt;
      		&lt;td&gt;create&lt;/td&gt;
      		&lt;td&gt;pancakes_path&lt;/td&gt;
      	&lt;/tr&gt;
      	&lt;tr&gt;
      		&lt;td&gt;&lt;span&gt;GET&lt;/span&gt;&lt;/td&gt;
      		&lt;td&gt;/pancakes/:id/edit&lt;/td&gt;
      		&lt;td&gt;edit&lt;/td&gt;
      		&lt;td&gt;edit_pancake_path(:id)&lt;/td&gt;
      	&lt;/tr&gt;
      	&lt;tr&gt;
      		&lt;td&gt; &lt;span&gt;PUT&lt;/span&gt;&lt;/td&gt;
      		&lt;td&gt;/pancakes/:id&lt;/td&gt;
      		&lt;td&gt;update&lt;/td&gt;
      		&lt;td&gt;pancake_path(:id)&lt;/td&gt;
      	&lt;/tr&gt;
      	&lt;tr&gt;
      		&lt;td&gt;&lt;span&gt;DELETE&lt;/span&gt;&lt;/td&gt;
      		&lt;td&gt;/pancakes/:id&lt;/td&gt;
      		&lt;td&gt;destroy&lt;/td&gt;
      		&lt;td&gt;pancake_path(:id)&lt;/td&gt;
      	&lt;/tr&gt;
      &lt;/tbody&gt;&lt;/table&gt;
      &lt;p&gt;&lt;a href="http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes/controller-comments.rb"&gt;controller-comments.rb&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;# GET /pancakes&lt;/span&gt;
&lt;span&gt;# GET /pancakes.xml&lt;/span&gt;
&lt;span&gt;def&lt;/span&gt; &lt;span&gt;index&lt;/span&gt;
&lt;span&gt;end&lt;/span&gt;

&lt;span&gt;# POST /pancakes&lt;/span&gt;
&lt;span&gt;# POST /pancakes.xml&lt;/span&gt;
&lt;span&gt;def&lt;/span&gt; &lt;span&gt;create&lt;/span&gt;
&lt;span&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
      &lt;p&gt;&lt;a href="http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes/test-with-http-method.rb"&gt;test-with-http-method.rb&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;test&lt;/span&gt; &lt;span&gt;"should create pancake"&lt;/span&gt; &lt;span&gt;do&lt;/span&gt;
  &lt;span&gt;post&lt;/span&gt; &lt;span&gt;:create&lt;/span&gt;
  &lt;span&gt;assert_redirected_to&lt;/span&gt; &lt;span&gt;pancake_path&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;
&lt;span&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div&gt;
      &lt;h2&gt;Assets Are Resources&lt;/h2&gt;
      &lt;p&gt;Thinking in URLs helps you solve web-related problems in the
      right way.&lt;/p&gt;
      &lt;p&gt;Exhibit A: If you deploy to a site whose view fragments are
      already cached in memcached, it&#8217;s likely that Rails&#8217; asset
      caching view helpers will not be called and &lt;span&gt;CSS&lt;/span&gt; bundles will
      not be generated.&lt;/p&gt;
      &lt;div&gt;&lt;pre&gt;&lt;span&gt;# Caching shouldn't happen here&lt;/span&gt;
&lt;span&gt;stylesheet_link_tag&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;"a"&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;"b"&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;"c"&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;
                    &lt;span&gt;:cache&lt;/span&gt; &lt;span&gt;=&amp;gt;&lt;/span&gt; &lt;span&gt;true&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
      &lt;p&gt;This whole problem is easily solved by &lt;em&gt;using controllers to
      do what they do best&lt;/em&gt;. Views and helpers should not generate
      &lt;span&gt;URL&lt;/span&gt;-based resources.&lt;/p&gt;
      &lt;p&gt;The task of combining several &lt;span&gt;CSS&lt;/span&gt; files into one file and
      caching them to disk is &lt;em&gt;exactly&lt;/em&gt; the kind of task controllers
      are built to do&lt;sup&gt;&lt;a href="http://blog.peepcode.com/#fn3"&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;img src="http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes/asset-urls.png" alt="Controllers should generate and cache assets, not view helpers." title="Controllers should generate and cache assets, not view helpers."&gt;&lt;p&gt;Controllers should generate and cache assets, not view helpers.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div&gt;
      &lt;h2&gt;Idea 1: Sinatra&lt;/h2&gt;
      &lt;p&gt;There are many ways the controller &lt;span&gt;API&lt;/span&gt; could be
      improved. Existing attempts have failed to achieve wide
      adoption because they have tried to handle controllers, views,
      and models all at once&lt;sup&gt;&lt;a href="http://blog.peepcode.com/#fn4"&gt;4&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
      &lt;p&gt;Instead, I think a more limited, controller-only approach
      could work better.&lt;/p&gt;
      &lt;p&gt;The first is already in wide use: Sinatra.&lt;/p&gt;
      &lt;div&gt;&lt;pre&gt;&lt;span&gt;# Sinatra-style handler&lt;/span&gt;
&lt;span&gt;get&lt;/span&gt; &lt;span&gt;"/api/v1/report/:id"&lt;/span&gt; &lt;span&gt;do&lt;/span&gt; &lt;span&gt;|&lt;/span&gt;&lt;span&gt;id&lt;/span&gt;&lt;span&gt;|&lt;/span&gt;
  &lt;span&gt;# ...&lt;/span&gt;
&lt;span&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
      &lt;p&gt;Sinatra is arguably the most widely replicated Ruby web
      framework, having inspired implementations in Node.js,
      Clojure, &lt;span&gt;PHP&lt;/span&gt;, Scala, and many other languages.&lt;/p&gt;
      &lt;p&gt;Part of the problem with writing a routing &lt;span&gt;API&lt;/span&gt; is finding a
      way to describe multiple URLs in a single string. This problem
      is solved if you handle each &lt;span&gt;URL&lt;/span&gt; on its own.&lt;/p&gt;
      &lt;p&gt;There&#8217;s no middle routing layer with arbitrary action
      names. &lt;span&gt;HTTP&lt;/span&gt; method and &lt;span&gt;URL&lt;/span&gt; are all you need (but handlers can
      filter on the user agent or other header information).&lt;/p&gt;
      &lt;p&gt;Thanks to Rack, Sinatra apps can be embedded in Rails
      applications. Or, Carl Lerche is writing a Rails 3 plugin that
      provides this syntax to Rails controllers&lt;sup&gt;&lt;a href="http://blog.peepcode.com/#fn5"&gt;5&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;h2&gt;Idea 2: Method, Member, Collection&lt;/h2&gt;
      &lt;p&gt;Jamis Buck introduced an implementation of &lt;span&gt;REST&lt;/span&gt; as a plugin
      &lt;em&gt;four years&lt;/em&gt; ago. Yet unlike other areas of Rails that have
      seen massive improvements, Rails&#8217; implementation of &lt;span&gt;REST&lt;/span&gt; is
      basically the same as it was in Rails 1.2.&lt;/p&gt;
      &lt;p&gt;A halfway approach could combine elements of the Rails 3
      router syntax with the class method style of configuration
      that&#8217;s already familiar to Rails developers.&lt;/p&gt;
      &lt;div&gt;&lt;pre&gt;&lt;span&gt;# Class method and HTTP-style methods.&lt;/span&gt;
&lt;span&gt;class&lt;/span&gt; &lt;span&gt;ReportsController&lt;/span&gt; &lt;span&gt;&amp;lt;&lt;/span&gt; &lt;span&gt;AppController&lt;/span&gt;
  &lt;span&gt;before_filter&lt;/span&gt; &lt;span&gt;:authenticate&lt;/span&gt;
  &lt;span&gt;resource&lt;/span&gt; &lt;span&gt;"/api/v1/reports(/:id)"&lt;/span&gt;

  &lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;:collection&lt;/span&gt;&lt;span&gt;)&lt;/span&gt; &lt;span&gt;do&lt;/span&gt;
  &lt;span&gt;end&lt;/span&gt;

  &lt;span&gt;get&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;:member&lt;/span&gt;&lt;span&gt;)&lt;/span&gt; &lt;span&gt;do&lt;/span&gt; &lt;span&gt;|&lt;/span&gt;&lt;span&gt;id&lt;/span&gt;&lt;span&gt;|&lt;/span&gt;
  &lt;span&gt;end&lt;/span&gt;

  &lt;span&gt;put&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;:member&lt;/span&gt;&lt;span&gt;)&lt;/span&gt; &lt;span&gt;do&lt;/span&gt; &lt;span&gt;|&lt;/span&gt;&lt;span&gt;id&lt;/span&gt;&lt;span&gt;|&lt;/span&gt;
  &lt;span&gt;end&lt;/span&gt;

&lt;span&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
      &lt;p&gt;Variations on this syntax could easily accomodate nested
      resources, singleton resources, or other custom &lt;span&gt;URL&lt;/span&gt; schemes.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div&gt;
      &lt;h2&gt;Conclusion&lt;/h2&gt;
      &lt;p&gt;For several years, Rails has charged forward and defined new,
      innovative syntaxes for writing web applications. It&#8217;s time for
      it to happen again.&lt;/p&gt;
      &lt;p&gt;An improved syntax could &lt;strong&gt;get rid of stale controller
      actions&lt;/strong&gt;, &lt;strong&gt;reduce confusion&lt;/strong&gt;, &lt;strong&gt;reduce duplication&lt;/strong&gt;, and
      &lt;strong&gt;improve&lt;/strong&gt; the way we think about solving technical problems
      with web applications.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div&gt;
    &lt;div&gt;
      &lt;h2&gt;Reactions&lt;/h2&gt;
      &lt;p&gt;Thanks to &lt;a href="http://reginald.braythwayt.com/"&gt;Reg Braithwaite&lt;/a&gt; and &lt;a href="http://benhoskin.gs/"&gt;Ben Hoskings&lt;/a&gt; for feedback on this article.&lt;/p&gt;&lt;p&gt;&lt;a href="http://benhoskin.gs/"&gt;Ben Hoskings&lt;/a&gt; said&lt;/p&gt;
      &lt;blockquote&gt;
      &lt;p&gt;I think the mere fact that a controller can be generated means that code shouldn&#8217;t be there. There&#8217;s no intelligence in code that can be generated from a single resource name.&lt;/p&gt;
      &lt;/blockquote&gt;
      &lt;blockquote&gt;
      &lt;p&gt;I think it&#8217;s doubly important because once you free the controller from having to implement the specifics of each action (like models doesn&#8217;t have to implement the specifics of &lt;code&gt;#save&lt;/code&gt;), you have a lot more room to raise the abstraction level and start getting declarative.&lt;/p&gt;
      &lt;/blockquote&gt;
      &lt;blockquote&gt;
      &lt;p&gt;I think making the controller more declarative is probably the end goal. Instead of the bulk of each action being an imperative mess, the controller can be heavier on the class-level configuration that&#8217;s really proven itself in the model (associations, scopes, plugin configuration, etc.).&lt;/p&gt;
      &lt;/blockquote&gt;
      &lt;p&gt;The &lt;code&gt;provides&lt;/code&gt; class-level configuration directive in Merb/Rails 3 is a signal that controllers can head in this direction.&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
  &lt;p&gt;Thoughts and reactions? Reply to &lt;a href="http://twitter.com/topfunky"&gt;@topfunky&lt;/a&gt; on Twitter, write a blog post of your own, or comment at &lt;a href="http://news.ycombinator.com/item?id=1398654"&gt;Hacker News&lt;/a&gt;.&lt;/p&gt;
  &lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; &lt;a href="http://www.infoq.com/presentations/braithwaite-rewrite-ruby"&gt;Video&lt;/a&gt; of Reg Braithwaite at RubyFringe. Quote is about 15:30 in.&lt;/p&gt;
  &lt;p&gt;&lt;sup&gt;2&lt;/sup&gt; The original version by David Heinemeier Hansson, then by
  Ulysses, then by Koz and Jamis Buck (together), and most recently
  by Yehuda Katz, Josh Peek, and the Rails 3 team.&lt;/p&gt;
  &lt;p&gt;&lt;sup&gt;3&lt;/sup&gt; &lt;a href="http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes/javascripts_controller.rb"&gt;Sample controller code&lt;/a&gt;. Versioning and expiration of assets are easily solved by storing a
  version number in the application and appending it to the link
  tag.&lt;/p&gt;
  &lt;p&gt;&lt;sup&gt;4&lt;/sup&gt; See &lt;a href="http://github.com/benhoskings/hammock"&gt;hammock&lt;/a&gt; by Ben Hoskings, &lt;a href="http://github.com/hcatlin/make_resourceful"&gt;make_resourceful&lt;/a&gt; by Hampton Catlin and &lt;a href="http://github.com/jamesgolick/resource_controller"&gt;resource_controller&lt;/a&gt; by James Golick.&lt;/p&gt;
  &lt;p&gt;&lt;sup&gt;5&lt;/sup&gt; Carl Lerche&#8217;s &lt;a href="http://github.com/carllerche/astaire"&gt;Astaire&lt;/a&gt; plugin.&lt;/p&gt;
&lt;/div&gt;
</description>
      <author>Joseph's shared items in Google Reader</author>
      <guid>http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes</guid>
      <pubDate>Wed, 09 Jun 2010 03:35:35 -0400</pubDate>
      <link>http://blog.peepcode.com/tutorials/2010/rethinking-rails-3-routes</link>
    </item>
    <item>
      <title>this drummer is at the wrong gig</title>
      <description>&lt;blockquote&gt;Shared by  Jared 
&lt;br&gt;
Just jump in to like 1 minute. Nice skillz&lt;/blockquote&gt;
&lt;div&gt;&lt;embed src="http://www.youtube.com/v/ItZyaOlrb7E&amp;amp;fs=1" allowScriptAccess="never" allowFullScreen="true" height="385" width="480" wmode="transparent" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/div&gt;&lt;div style="padding-top:3px"&gt;I liked a YouTube video: &lt;/div&gt;
</description>
      <author>Joseph's shared items in Google Reader</author>
      <guid>http://www.youtube.com/watch?v=ItZyaOlrb7E&amp;amp;feature=autoshare</guid>
      <pubDate>Wed, 09 Jun 2010 03:25:16 -0400</pubDate>
      <link>http://www.youtube.com/watch?v=ItZyaOlrb7E&amp;amp;feature=autoshare</link>
    </item>
    <item>
    </item>
    <item>
    </item>
  </channel>
</rss>
