addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [ruby-81] RESTful services that always work

From: Loqi
Sent on: Thursday, January 31, 2008 9:23 PM
>The key to my conversion was for me to have rails generate as much 
>of my application as possible -- meaning, of course, scaffolding. 
>When creating scaffolding, just be sure to use the singular form of 
>the noun of the model your generating and let the REST pattern work 
>for you.

This sounds like just giving up. It doesn't say that code 
pluralization allows you to do anything that's inconvenient or 
impossible with stable identifiers -- except to avoid Rails bugs. I 
may eventually give up too, but really Rails should not be relying on 
the inflictor just to keep from crashing. It should work just as well 
in Chinese, which has no linguistic concept of plurals, gender, past 
or future tense, or the like. If only David Heinemeier Hansson were 
Chinese! Though I'm glad he's not Navajo, which has plural forms 
denoting one, two, and three or more!

In my view, rails made a poor design decision by trying to emulate 
select idiosyncrasies of select human languages. There just doesn't 
seem to be a payoff there. Maybe there is a genuine benefit, but I 
haven't yet discovered it. Most Rails users seem to merely tolerate 
it. I've found a few glowing supporters of pluralizing code. I'm 
happy for them, but they haven't given me a compelling reason why 
it's actually better. Agile Web Development with Rails, second 
edition explains on page 237 that rails uses pluralization, "Because 
it sounds good in conversation. Really." Seems like a pretty thin 
rationale to me.

Most of Rails doesn't care if I switch off pluralization. There's no 
reason why the REST scaffold should care either, but it does. It's 
broken.

I'm not working under a deadline here, so I'm willing to puzzle 
through this trouble as a learner's challenge. If I get tired of 
swimming against the current, I'll probably just submit to 
pluralization like everyone else (even though I said I wouldn't). But 
I shouldn't have to. Rails should "just work" with or without 
pluralization.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy