“Rails Refactoring” by Trotter Cashion
Rails Refactoring is an e-book written by Trotter Cashion (of MotionBox) and published by Addison-Wesley. Targeting developers who are tentatively dipping a toe into the world of REST, Rails Refactoring looks at how to turn your old-fashion unRESTian Rails code into the modern REST-capable equivalent. The first major section, for example, delves into respond_to and provides a 'motive', the 'steps' for implementation, and example code samples to back up the steps. Other refactorings, such as CRUD routing and ActiveResource are presented in a similar 'motive', 'steps' and 'examples' format.
Beyond basic refactoring, the e-book has several chapters covering controllers, routes, views, tests, authentication, and the consumption of external REST APIs all from a REST point of view. The RESTful Controllers chapter gets as far as explaining the methods involved, to_xml and MIME content types before the RESTful Routes and Views chapters look at the generation and integration of RESTful URLs in your applications. Curiously, the RESTful Tests and RESTful Authentication chapters are only two pages a-piece with only very cursory information.
At only 74 pages, Rails Refactoring is a quick read and littered with practical knowledge. I fear, though, that any Rails developer who doesn't already use respond_to or have a cursory knowledge of REST is unlikely to be tempted by the examples on show here, and more experienced developed will find Rails Refactoring a little simple going. Still, it's useful information that's well presented, and could make a useful reference to any Rails developer. It costs $14.99 direct from Addison-Wesley or you can read it for free if you're already a member of Safari (an online book system by O'Reilly Media and Pearson Technology Group).
(WARNING: There have been some issues reported about the DRM used within the PDF download. Read the comments left by readers on this post before purchasing.)
May 15, 2007 at 11:24 pm
I like the fact that most of the book covers the transition from non-REST code to REST. There's sometimes an assumption in the community that every Rails app runs on edge and that changes from one version to the next are trivial. Mr. Cashion doesn't make that assumption and provides some useful advice.
May 16, 2007 at 3:11 am
I bought this without realizing that the PDF was DRM encumbered. Yuck! I wouldn't have bought it if I had known, and I'm thinking that I will definitely avoid Addison Wesley ebooks in the future.
May 16, 2007 at 9:38 pm
Thanks for bringing that up, Pawel. It is rather annoying, I know, especially as the DRM is not made clear on the sales page.
May 16, 2007 at 10:04 pm
I found out about the DRM after struggling with the Reader. During this struggle I managed to download the eBook 5 times, so now I get a message that I have downloaded the book to many times and I'm not able to open the book at all. I know for sure that this is the last time I ever buy a eBook from Addison Wesley!!
May 17, 2007 at 7:26 am
What DRM is used on the book? Any idea what it will/won't let me do?
May 17, 2007 at 4:02 pm
I have added a stern warning to the post about the DRM used here, and will try to implement a policy of posting about DRM issues on future posts where it may be necessary. Unfortunately the sales page does not mention DRM (which is my biggest beef with this, not the DRM itself).
I was provided with a non-DRM encumbered version for my review, so unfortunately I cannot explain what DRM is used. I will point my contact to this post in case they want to answer questions or comment on this issue.
May 17, 2007 at 4:37 pm
I don't want to give more information than is necessary from my source, as they'll soon be coming here to resolve this themselves.. but allegedly there isn't meant to be DRM on this and it might be fixed shortly. Keep eyes peeled here for more news..
May 17, 2007 at 5:32 pm
An update from Marie McKinkley, Marketing Manager at Addison-Wesley.. good news!:
--
Last summer, we made the decision to release all Short Cuts in the
Addison-Wesley Professional Ruby series without DRM. However, our
company's standard operating procedure for digital products is to have
DRM applied, so the Ruby Short Cuts need to follow a special production
process. In this case, Trotter Cashion's work took a wrong turn down the
production line and ended up with DRM. We've been trying to fix this
issue for a couple of weeks already. I will contact everyone who bought
this Short Cut to offer them the DRM-free file.
--
Good news for everyone :)
May 17, 2007 at 6:34 pm
Awesome news - thanks Peter!
May 18, 2007 at 4:01 am
That is good news. I was going to bite but as soon as I saw the DRM I dropped the idea like a stone. Was consoled in my decision thanks to the ohers who reported problems. I'll wait for the DRM to get fixed.