views:

247

answers:

8

Hello,

Now that I'm quite a ways into this book I can announce that it's Rails 3 in Action.

I'm thinking of writing a book about Rails 3 and I have a basic idea of what I want to write about, but really what I need is that little bit of polish from the community. The book is planned to cover:

  • A little bit of Ruby
  • Version control using Git
  • Testing using RSpec & Cucumber
  • Developing an application in Rails
  • Javascript testing using Selenium
  • File uploading
  • Background processing
  • Monitoring an application
  • Performance enhancing
  • How to create a plugin
  • How to create an engine

And a little more. So, I leave this question for you:

What do you want to see in a book about Rails 3, which goes from "This is Rails" to "This is how Rails scales"?

I should also mention that I have a Uservoice for this also, Stack Overflow is just another avenue of reaching the community.

A: 
  • Routing: How it works, how it can be tested and debugged, how it works with activeModel resources

  • Login system: Most web based apps need some form of authentication, basic usage of plugins, etc.

  • File uploading and downloading

poseid
Routing will *definitely* be covered, as I have been infatuated with RESTful routing since the day we met. Login systems, most likely authlogic at this stage. File uploading is going to be paperclip.
Ryan Bigg
I found routing in Rails 2.3.x one of the frustrating parts, because things as order matter in your routes.rb Not very transparent why one route worked, and another did not.
poseid
A: 

As much stuff related to debugging as possible. Personally, I don't see the point in "Introductory Ruby" chapters.

Geo
Debugging is quite the large area, what bothers you most about attempting to debug in Rails applications?
Ryan Bigg
+1  A: 
  • Why a thing about version control ? I thought that should be book about Ruby on Rails instead..there exist many books about version control in any kind (Git, Subversion, Mercurial, Bazaar etc.)...so no need about that...in my opinion.
  • What about Unit Testing (Functional Tests etc.) e.g. in detailed working with fixtures etc. integration tests and so on.is very important (TDD) as a preparation for RSpec and Cucumber. Will the RSpec&Cucumber cover the news in RoR3 only? For RSpec there does already exist a book Ok..currently beta.
  • Why Javascript Testing with Selenium? I'm not sure if this should be there..
  • What about covering replacing ActiveRecord with other (Data? i don't know the name)...
  • What about deploying? (may be some examples? => Deploying Rails Apps).
  • Authentication (e.g. CanCan other plugins as well).
khmarbaise
Version control is so if they stuff something up they can roll it back later. Unit testing is covered early on when TDD is first shown, it's also covered later on in the authorization section and in possibly in other sections I haven't planned for. It will cover using RSpec and Cucumber with Rails.Javascript testing is something that is relatively "tough" to do with Rails. A guide on how to do it would be best.Replacing ActiveRecord is a maybe.Deployment to heroku and private servers are planned.For authentication, Authlogic. Authorization, not sure yet.
Ryan Bigg
I agree that VC seems out of place here. Are you assuming new to Rails, or new to computers? How about a chapter about text editors, too? Bug tracking? Setting up a wiki for your team? There's a million things you need for a real project, and this seems like an especially weird one to pick given there's a good chance they're already using a different one (e.g., Hg).
Ken
@Ken: You raise a good point, they could be using one already. I think that covering one is just a good way to get them going down the right path of using a VCS rather than using something such as FTP (I've seen it done!)
Ryan Bigg
+1  A: 

Do you want to write an introduction into Rails 3 for beginners? Or do you want to introduce Rails 3 to more or less experienced Rails developers? In the first case you should start with a short introduction into ruby and then proceed with an introduction into the core features of Rails 3. Then walk through the different parts of the framework, explain how to test and finally how to deploy an Rails 3 app. In the second case i would except an overview of the changes and then covering the mentioned advanced topics. But i would focus on conceptual things. Nobody needs a book '100 Rails 3 recipes', that is obsolete at the moment it was printed.

gregor
The idea is for the book to go from "This is Ruby/Rails" to "This is how you can make Rails scale" and the "story" is the development of an application throughout.
Ryan Bigg
This is a big project. And to be honest it think it would be a big beast. It sounds to me like a mixture of a Rails 3 encyclopedia and a Rails 3 cookbook. In my eyes, it would be better to split the book into multiple books. I think it would be better to write books: "introduction into Rails 3", "Whats new in Rails 3", "test driven or behavior driven development with Rails 3", "Scaling Rails 3" and so on. I think it is impossible to cover in one book the whole "Rails thing" with all its important parts and dynamics.
gregor
Yes, this is going to be large. It's less of an encyclopedia and more of a "This is Ruby/Rails" -> "This is how Rails scales" story. The "introduction into Rails 3" *should* cover testing! Why would you ever develop a real Rails application these days without testing the thing as you go along? It's just madness! Scaling Rails is also an essential part of a Rails application. I don't think I'm going to be able to cover *everything* in a book, but I'm aiming for the core concepts.
Ryan Bigg
+4  A: 

Unless you have an iterative, ship early/often publishing model in mind (something like Ruby Best Practices without the physical book coming first, perhaps) I think you've probably already missed the boat when we're at beta 3 and there are undoubtedly a shelf-load of books poised to ship hot on the heels of the final release. The one thing that every new technical author seems to discover is how much longer it took to produce a worthwhile book than they'd first imagined.

I think the audience can be divided into three broad groups:

New to Rails (and most likely Ruby)

This seems to be where you're mostly intending to go; are you happy competing with the (already in beta) 4th edition of AWDwR? It doesn't look like an easy win: they have the franchise and they're going to be shipping Real Soon Now.

Already building using Rails < 3.0

These guys don't want an introduction. Some may actually need one, but they don't want it and they won't read it ;-) Things they might want could include

  • Worked examples of where 3.0 differs from 2.0 and how to upgrade
  • Explanation of the new super-decoupled areas and the main options now available
  • Rack (the world needs a Rack book)

I'd consider buying that book.

Not interested in Rails

Probably not your target demographic...

Mike Woodhouse
I am quite happy competing with the 4th edition of AWDwR, and I acknowledge they have quite the franchise but I hope to slice off a bit of their pie. Those not interested in Rails are probably not going to be interested in the book. Those already building an application using Rails 2, well, I haven't worked out yet how to cater to those. Maybe inline comments. I'll have a longer think.
Ryan Bigg
A: 

One aspect of Rails that I haven't seen covered much is interaction with Javascript. There are several tutorials out there but they merely scratch the surface of it. For instance, a well designed RESTful Rails app/site is instantly available as an API with very little effort, that Javascript clients can directly interact with. It will be nice to see an example application or a part of it cover how Javascript heavy clients can be used in a Rails app. It may not seem relevant to Rails, but with the onset of HTML5, offline databases, local cache, etc., it would be important to see good examples of how well Rails plays with it.

Oh, maybe a chapter on the conventions Rails uses. I love the convention over configuration mindset and it simplifies things vastly, but lately it seems there has been a convention overload, with no central point of reference to lookup all conventions.

Best of luck with the book. I used the "Testing Facebook" post on your blog as a reference point for one of my projects as it was really easy to understand and covered some intricate details in-depth. Looking forward to the same quality of writeup in the book. Cheers.

Anurag
Agreed with the "convention overload" side of things. Do I use authlogic or clearance? Do I use paperclip or carrierwave? Do I use a document database or a standard one? In this book, I intend to show the authlogic, paperclip and standard database way, whilst describing that this is one of the ways you can do things. There's very little to do with "convention" anymore in that regard, and more to do with personal/professional preference.
Ryan Bigg
+1  A: 

Hey Ryan. One idea you might consider is making sure you cover the areas that people seem to have the most trouble with judging by the questions here. For example, associations, routing and nested resources. Show us how to do some of that stuff using Rails 3.

John Topley
A: 

I think testing (whether with Test Unit or RSpec/cucumber or something else) should be taught along side the coding of the actual app. See the http://railstutorial.org/ site/book for an example.

The PragProg book on learning Rails covers testing, but AFTER you've already built most of the app. I think this is detrimental, as by that point, you don't want to mess with the testing. The Rails Tutorial (which I ran through quickly the other day for fun) does it all in parallel.

Perhaps even have a highlighted (or somehow separated) bit on testing as you go along in building an app in your book, so that those who want to do the testing can do so, others can skip.

Bill Turner
I don't think that testing should be skipped at all and this is where the PragProg book fails miserably in my mind. Testing is more important than writing the code itself, and without it what insurance do you have that the code is still working besides your own manual testing abilities?
Ryan Bigg
I just looked over at the PragProg site and it looks like their 4th edition of the book, covering Rails 3, WILL include the testing (TestUnit) inline with the chapters, instead of a chunk at the end. And they've signed up the Rails Prescription guy's book as well, which may also be a test-first tutorial (sort of like how his PDF is).
Bill Turner
@Bill Turner: Test::Unit is not the industry standard, but then again neither is RSpec and Cucumber, but they have a greater approval rating than TU. Yes, Test::Unit is the standard but I do not agree that a Rails book should cover such a dreadful non-purpose-built library.
Ryan Bigg
Oh, I'm on your side. I think it would be perfect to come at the tutorial approach with using RSpec and Cucumber, since those have the most steam and support behind them.I'm eager to see what you put together. Honestly, there can never be enough tutorials out there. You have a weblog or something to follow on news about your book?
Bill Turner
@Bill Turner: A bit late, but better late than never ;) http://ryanbigg.com
Ryan Bigg