It is scary how thin and lean Rails controllers become after you RESTify them (shudder). I love refactoring, but this morning, as I sat down for my morning ritual of refactoring previous day's code, I figured I couldn't! There just wasn't any extra sliver of code to be mercilessly chopped off from our bright and shiny RESTful controllers. Background: our application Guitarati is being created completely using Ruby on Rails and this week, I put our current code to REST.
I am going through a love-hate relationship with REST. My emotions are swinging wildly for and against this pithy thing. May be because I am commitment-phobic. May be I don't want to tie myself down to a design philosophy just yet. May be because I've not seen 30 summers in my life. Sometimes, REST feels like a strait-jacketed approach that curbs creative design (try Ajax + nested routes). And at other times, it feels like a God-send to bring order to the Universe (just look at your controller code).
Nonetheless, here are some resources for those aiming for a RESTful lifestyle. (better sleep, less worries and more cash)
2. Taming the RESTful BEAST (a whole working RESTful application from the good guys). And a nice diagram explaining the app.
3. A 40 page helpful write-up on REST
4. Those with some extra cash can pay $9 and watch the RESTful show. Mind you, this talks of REST before Rails 1.2 came out, so I'm not sure if this will be up-to-date vis-a-vis Rails 2.0 preview.
0 comments:
Post a Comment