1 2 3 4 5 6 7 8 9 10 |
$ rails new depot $ cd depot/ $ git init $ git add . $ git commit -m 'init' $ rails generate scaffold Product title:string description:text image_url:string price:decimal $ git add . $ git commit -m "create model, views, controller, and migration for products table" $ rake db:migrate $ rails server |
Comparing Rails to Catalyst
I recall (Central Park in fall ...) man i digress. I recall attempting to learn Catalyst many years ago and being hit with a lot of arcane rules and well ... just plain bizarre usage of Perl in general. I didn't like Mason nor Krang very much either but i managed to learn them. Catalyst just seemed ... nasty.
Well, now i really feel like i was correct. Catalyst sucks. And so does Class::DBI for that matter. Ruby on Rails and ActiveRecord blow each counterpart out of the water, respectively.
These commands, with no need to edit any code, produced a full MVC driven CRUD interface for a fictitious "products" database (SQLite):
So far i am sold on Ruby/Ruby on Rails ...