2 ms·
This breaks down as soon as you have a form, which is basically the next step. While the 'hello world' might be smaller, you outgrow it immediately. Whereas
by steveklabnik 14y ago
This breaks down as soon as you have a form, which is basically the next step. While the 'hello world' might be smaller, you outgrow it immediately. Whereas
$ rails new my_app
$ rails g scaffold post title:string body:text
is still easy to copy/paste/type from a screen, and gives you a lot more to start with.
- learc83 14y ago> gives you a lot more to start with. I realize there are differences in opinion, but I started programming seriously about 6 or 7 years ago, and I started with ruby/Rails. For me the scaffolding generated too much to easily digest. And separating everything into models/controllers/views is fantastic for a production app, but almost incomprehensible for a newbie. Veteren developers still argue about whether something should go in a model/controller or some other layer, how is a newb supposed to handle it? In addition you can build sinatra apps without even talking about hooking up a database. If you're trying to jump in on the deep end and build an MVP, rails is probably the way to go. However, if I really wanted to teach someone to understand what they were doing without being intimated, I'd start with sinatra.
- steveklabnik 14y agoIt's all about the amount of time you have. If I'm doing a 3 day engagement, we don't mention scaffolds until after they've hand-built all the code. If you're doing a 8-hour introduction, then yes, you need to use the scaffold.