Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion battle of the restful controller abstractions (boilerplate vs resource_controller vs inherited_resources vs ???)

Received: by 10.100.96.11 with SMTP id t11mr6479786anb.14.1249413991688;
        Tue, 04 Aug 2009 12:26:31 -0700 (PDT)
Return-Path: <j...@7fff.com>
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246])
        by gmr-mx.google.com with ESMTP id 15si1325108gxk.0.2009.08.04.12.26.31;
        Tue, 04 Aug 2009 12:26:31 -0700 (PDT)
Received-SPF: pass (google.com: domain of j...@7fff.com designates 209.85.132.246 as permitted sender) client-ip=209.85.132.246;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of j...@7fff.com designates 209.85.132.246 as permitted sender) smtp.mail=j...@7fff.com
Received: by an-out-0708.google.com with SMTP id c38so1948878ana.0
        for <boston-rubygroup@googlegroups.com>; Tue, 04 Aug 2009 12:26:31 -0700 (PDT)
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="0016e644c7a61ebe8c047055ddc5"
Received: by 10.100.94.17 with SMTP id r17mr465518anb.19.1249413991151; Tue, 
	04 Aug 2009 12:26:31 -0700 (PDT)
In-Reply-To: <df300b150908041222qdb61de8g76006e7b967751c4@mail.gmail.com>
References: <df300b150908041150m4d433069k6da8d5ee64bf562b@mail.gmail.com>
	 <b6b8b6b70908041212w64105d08ma7812cea2217a53@mail.gmail.com>
	 <df300b150908041222qdb61de8g76006e7b967751c4@mail.gmail.com>
Date: Tue, 4 Aug 2009 15:26:31 -0400
Message-ID: <b6b8b6b70908041226t52b421ddk9837983ce6304529@mail.gmail.com>
Subject: Re: battle of the restful controller abstractions (boilerplate vs 
	resource_controller vs inherited_resources vs ???)
From: John Norman <j...@7fff.com>
To: boston-rubygroup@googlegroups.com

--0016e644c7a61ebe8c047055ddc5
Content-Type: text/plain; charset=ISO-8859-1

People have been known to take a bite and report on the flavor during the
marination process.

On Tue, Aug 4, 2009 at 3:22 PM, Josh Nichols <j...@technicalpickles.com>wrote:

>
> My opinions on the matter are still marinating. They will be delicious
> when they are ready though.
>
> - Josh
>
> On Tue, Aug 4, 2009 at 3:12 PM, John Norman<j...@7fff.com> wrote:
> > Josh,
> >
> > How about saying now which way you prefer and why?
> >
> > John
> >
> > On Tue, Aug 4, 2009 at 2:50 PM, Josh Nichols <j...@technicalpickles.com>
> > wrote:
> >>
> >> When Dan Croak was conducting the bostonrb.org code review last week,
> >> we noticed that part of the project was using resource_controller, and
> >> the rest was not.
> >>
> >> The thought occurred, what if we did a side-by-side comparison of the
> >> 'normal' way of restful controllers, to using the various restful
> >> controller abstractions, like resource_controller and
> >> inherited_resources, for the entire app?
> >>
> >> So I set out to do so. These were my goals:
> >>   - start from a baseline commit
> >>
> >> (
> http://github.com/bostonrb/bostonrb/commit/9f92569536ea54952d8d873708b0c9cb8e7145fc
> )
> >>   - use the abstraction whenever boilerplate rest stuff is used
> >>   - tests and stories cannot be changed, and must pass
> >>
> >> Here are the results:
> >>
> >> The original code:
> >>    http://github.com/bostonrb/bostonrb/tree/master
> >>
> >> Using resource_controller everywhere:
> >>    http://github.com/bostonrb/bostonrb/tree/resource_controller
> >>
> >> Using inherited_resources everywhere:
> >>    http://github.com/bostonrb/bostonrb/tree/inherited_resources
> >>
> >> With that, I'd like to open discussion on how good/bad it is to use
> >> these abstractions, and how the implementation compare.
> >>
> >> Additionally, if you have another contender you'd like to see battle,
> >> just fork on bostonrb on github, make a branch for it, and report back
> >> here.
> >>
> >> - Josh
> >>
> >>
> >
> >
> > >
> >
>
> >
>

--0016e644c7a61ebe8c047055ddc5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

People have been known to take a bite and report on the flavor during the m=
arination process.<br><br><div class=3D"gmail_quote">On Tue, Aug 4, 2009 at=
 3:22 PM, Josh Nichols <span dir=3D"ltr">&lt;<a href=3D"mailto:josh@technic=
alpickles.com">j...@technicalpickles.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
My opinions on the matter are still marinating. They will be delicious<br>
when they are ready though.<br>
<font color=3D"#888888"><br>
- Josh<br>
</font><div><div></div><div class=3D"h5"><br>
On Tue, Aug 4, 2009 at 3:12 PM, John Norman&lt;<a href=3D"mailto:john@7fff.=
com">j...@7fff.com</a>&gt; wrote:<br>
&gt; Josh,<br>
&gt;<br>
&gt; How about saying now which way you prefer and why?<br>
&gt;<br>
&gt; John<br>
&gt;<br>
&gt; On Tue, Aug 4, 2009 at 2:50 PM, Josh Nichols &lt;<a href=3D"mailto:jos=
h...@technicalpickles.com">j...@technicalpickles.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; When Dan Croak was conducting the <a href=3D"http://bostonrb.org" =
target=3D"_blank">bostonrb.org</a> code review last week,<br>
&gt;&gt; we noticed that part of the project was using resource_controller,=
 and<br>
&gt;&gt; the rest was not.<br>
&gt;&gt;<br>
&gt;&gt; The thought occurred, what if we did a side-by-side comparison of =
the<br>
&gt;&gt; &#39;normal&#39; way of restful controllers, to using the various =
restful<br>
&gt;&gt; controller abstractions, like resource_controller and<br>
&gt;&gt; inherited_resources, for the entire app?<br>
&gt;&gt;<br>
&gt;&gt; So I set out to do so. These were my goals:<br>
&gt;&gt; =A0 - start from a baseline commit<br>
&gt;&gt;<br>
&gt;&gt; (<a href=3D"http://github.com/bostonrb/bostonrb/commit/9f92569536e=
a54952d8d873708b0c9cb8e7145fc" target=3D"_blank">http://github.com/bostonrb=
/bostonrb/commit/9f92569536ea54952d8d873708b0c9cb8e7145fc</a>)<br>
&gt;&gt; =A0 - use the abstraction whenever boilerplate rest stuff is used<=
br>
&gt;&gt; =A0 - tests and stories cannot be changed, and must pass<br>
&gt;&gt;<br>
&gt;&gt; Here are the results:<br>
&gt;&gt;<br>
&gt;&gt; The original code:<br>
&gt;&gt; =A0 =A0<a href=3D"http://github.com/bostonrb/bostonrb/tree/master"=
 target=3D"_blank">http://github.com/bostonrb/bostonrb/tree/master</a><br>
&gt;&gt;<br>
&gt;&gt; Using resource_controller everywhere:<br>
&gt;&gt; =A0 =A0<a href=3D"http://github.com/bostonrb/bostonrb/tree/resourc=
e_controller" target=3D"_blank">http://github.com/bostonrb/bostonrb/tree/re=
source_controller</a><br>
&gt;&gt;<br>
&gt;&gt; Using inherited_resources everywhere:<br>
&gt;&gt; =A0 =A0<a href=3D"http://github.com/bostonrb/bostonrb/tree/inherit=
ed_resources" target=3D"_blank">http://github.com/bostonrb/bostonrb/tree/in=
herited_resources</a><br>
&gt;&gt;<br>
&gt;&gt; With that, I&#39;d like to open discussion on how good/bad it is t=
o use<br>
&gt;&gt; these abstractions, and how the implementation compare.<br>
&gt;&gt;<br>
&gt;&gt; Additionally, if you have another contender you&#39;d like to see =
battle,<br>
&gt;&gt; just fork on bostonrb on github, make a branch for it, and report =
back<br>
&gt;&gt; here.<br>
&gt;&gt;<br>
&gt;&gt; - Josh<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; &gt;<br>
&gt;<br>
<br>
<br>
</div></div></blockquote></div><br>

--0016e644c7a61ebe8c047055ddc5--