small medium large xlarge

15 Apr 2010, 10:33
Peter Whitfield (5 posts)

Following Sam’s suggestion, I’m creating a new topic for pondering ways to grok the differences between Rails 2.x and 3.0.

Sam, I take your point regarding the volume of changes - nevertheless, as a reader I find myself trying to get a grip on how much of my existing knowledge is useful and what I have to re-learn. Perhaps there is a need for a ‘coming from Rails 2.x’ chapter or section…?



15 Apr 2010, 12:35
Sam Ruby (633 posts)

One of the core team’s goals is that if you have an application running on 2.3.6 with no deprecation warnings, your application will “just work” on 3.0. I can point to a few edge cases where this is not entirely true (e.g., dealing with non-REST routes, and with sending mail), and then there is the whole safe HTML thing, and the whole dynamic_form thing, but those can be dealt with using plugins. Otherwise by and large it is mostly true that 2.3.x applications “just work” on 3.0.

But that’s only half of the story. Because you can do it doesn’t mean that it is recommended. Most of the changes in this edition deal with best practices, or with finding things that work equally well with Ruby 1.9.2 as Ruby 1.8.7 and recommending that. An example of the former: using named routes instead of passing :controller and :action to link_to. An example of the latter: using join instead of to_s on an array instance. And then there are things like data migrations that should instead be using seeds.rb.

And then there is a third half: new things to play with like ARel, a new routing DSL, and bundler.

I am still pondering this. I don’t know yet whether it makes sense as a chapter, or a section, or a handful of sidebars, or a wiki page, or a blog post.

15 Apr 2010, 15:22
Eduardo Chinchilla (4 posts)

Seems to me this is a difficult thing to fit in a book. It could be confusing for the newcomer. Add to the complexity that some of the book upgrades are not specific Rails 3.0, for example as far as I remember the book does not mention Nested Model Forms (accepts_nested_attributes_for) which is specific of Rails 2.3

15 Apr 2010, 18:02
Stephen E. Cotner (2 posts)

I just bought the beta and am happy to see where it’s going. But please resist the urge to tuck things away in blog posts. I wanted the book because I live in a part of the world where I don’t always have a connection, so I can’t just click away and flit between a million online references. I also think any such suggestion, placed within a book, defeats the notion of having a book at all. Plugins and so on will no doubt need links, but please don’t link to things when you’re teaching these fundamentals. I can find the rails guides and blog discussions on my own, but anything you write in the book, with your more considered narrative, will be worth much more. If, after that, you’d also like to include footnotes or an appendix of useful links for learning more about each topic, these would be very valuable, too. But the integrity of the book comes from all of this being in one place. I just want to go to the source. I want to read a book. Submitted with respect, humility, and appreciation for everything you’re doing.

15 Apr 2010, 18:57
Sam Ruby (633 posts)

Stephen: my apologies if I wasn’t clear: the intent isn’t to tuck fundamentals away in blog posts; my point was closer to what Eduardo said. I’ll continue to look for a way that do this in the book in a way that doesn’t detract from newcomers. But I’ll be honest: my sense at the moment is that it is a myriad of small details, and the best way to proceed is to simply showcase best practices and new features, and to rely on deprecation warnings and rails_upgrade to do the rest.

16 Apr 2010, 01:58
Stephen E. Cotner (2 posts)

I realized after I posted this that I was thinking more generally, less about going from Rails 2 to 3, and more about 0 to 60, if you know what I mean. I was just pointing out how valuable it is to have a book that marks the bulk of the Rails ecosystem for inclusion, discussion, and some amount of illustration – to be guided in at the beginner level, but also not left off too soon at the intermediate level, when the diversity of online sources is still more of a burden than a boon. It seems overall that’s the book you’re making, so maybe I didn’t need to frame this as such a worry. Keep up the good work, and I’ll look forward to future versions.

29 Apr 2010, 07:03
James West (104 posts)

This is a plea to NOT inlude the Rails 2 to Rails 3 differences. I understand the requests for covering the changes from Rails 2 to Rails 3 and indeed I too want to know this but I’m hoping that the book will NOT foucus on these changes and will concentrate on the way things should be done in Rails 3 rather than what changes you should make to your Rails 2 app in exactly the same way that version 3 of the book did not focus on the upgrades from Rails 1 to Rails 2.

Perhaps there is a good argument to be had for a second book. How to upgrade your Rails 2 application?

It’s a distraction and new comers don’t need to know this. I have a couple of major Rails 2 apps that I would like to upgrade but I’m hoping that by reading the book I would soon see how things are done differently and how they should now be done rather now rahter than how I can make my previous approach fit the new way.

Hope that makes sense.

04 May 2010, 23:15
Manuel E Vidaurre Arenas (8 posts)

I totally agree with not include the Rails 2 to Rails 3 differences, but maybe a mention regarding the Rails Upgrade gem and the book will be worth

07 May 2010, 08:39
Martin Hawkins (5 posts)

The need to concentrate on Rails as a whole rather than on changes from version to version is clear. However, some statement needs to be made about the approach taken by the book, even if it is just ‘We’re ignoring it’! I admit - the first thing I did when I downloaded my copy was to scan for any indication of the changes introduced by v3. Many books do this very simply by using icons - say one for ‘this is new’ and another for ‘this has changed’. If the reader is familiar with Rails, this is all they need. Readers new to Rails can ignore the icons.

You must be logged in to comment