In preparation for the main project, I've recently spent some time
developing a system to make nice PDF and HTML books at the same time
(see, e.g., the sample document at
http://www.railstutorial.org/sample), and now it's time to start
writing the actual book. I want to design the tutorial so that (a)
newbies find it interesting and comprehensible and (b) Rails experts
are enthusiastic about recommending it. Since subscribers to this list
are likely to be Rails experts, you are in a position to help me
achieve goal (b). In particular, I have two key questions about the
book's content:
1. Which testing framework should I use? Given my knowledge
(experience with Test::Unit and RSpec, among others) and my audience
(beginners), the choice boils down to:
(a) Test::Unit
Pros: comes bundled with Rails, is "good enough"
Cons: needs either fixtures (fragile) or something like Mocha
(external dependency); many, perhaps most, advanced Rails developers
eventually move on to something else
(b) RSpec
Pros: nicely designed, I know it well (it's my current primary test framework)
Cons: less standard than Test::Unit, adds an external dependency
2. The tutorial will teach Rails by developing a substantial sample
application, and the leading candidate for the sample app is status
updates with asymmetric following---i.e., a tiny Twitter clone.
Pros: A nice size (not too big, not too small*) with an interesting
data model; Twitter is hot right now, and it's written in Rails to
boot
Cons: Might seem too trendy, could be dated in a year or two
*Don't worry that it might be too small; making it bigger is easy. Add
support for @reply threads, direct messaging, RSS feeds, and
search---bam! that's 2-3 extra chapters right there.
So, what do you think? Test::Unit or RSpec? A tiny Twitter sample app,
or something else? Which choices would make for a tutorial you
personally would recommend? Feel free to email general suggestions;
for quick feedback, I've set up a survey form here:
http://mhartl.wufoo.com/forms/rails-tutorial-survey/
Thanks in advance,
Michael
--
Michael Hartl
http://railstutorial.org/
http://blog.mhartl.com/
Thanks for the feedback. Perhaps I wasn't clear: the idea is to
*write* a small, stripped-down version of Twitter as a way to teach
Rails, not to make a Twitter client or integrate with the real Twitter
in any way. Such an application might not be particularly
useful---it's hard to imagine why you'd want to launch your own
version of Twitter---but it would be instructive. And that is, after
all, the main point of a tutorial.
Michael