I think Rails 3 is awesome and kudos to the core team and hoards to contributors that made it happen.  However, I am sad that it has gotten more verbose to create a Rails app from scratch.  I know not everyone likes scaffold and not everyone uses rspec, but this is a common use case, and it gets a little worse if you use cucumber, like we do in the workshops.  In fact any test framework gem dependency is going to have this kind of a problem.  I teach novices periodically and frequently use scaffold in my own work for prototyping and for experimenting with new gems.  The fact that I have to open up an editor and modify my gem file creates a context switch, plus I’ve got a couple of extra commands to type.  There used to be 6 commands, now there are 8 to get the most basic webapp running.  I think we can do better…

———– old steps ————–
$ rails myapp
$ cd myapp
$ script/generate rspec
$ script/generate scaffold note title:string content:text
$ rake db:migrate
$ script/server

———– new steps ————–
$ rails new myapp
$ cd myapp
$ vi Gemfile

group :development, :test do
gem ‘sqlite3-ruby’, :require => ‘sqlite3’
gem “rspec-rails”, “>= 2.0.0.beta.22”
gem “webrat”      # currently generated view specs require this
end

$ bundle install
$ rails generate rspec:install
$ rails generate scaffold note title:string content:text
$ rake db:migrate
$ rails server

I wonder if there should be something like the git config command.  Such as:

rails gem rspec

Ideally it would run the generator if there is one and edit the Gemfile.  Ideally it would allow the specification of multiple gems with an optional parameter to call bundle install at the end:

rails gem rspec webrat –install

This would allow all of the goodness of bundler without the cognitive overhead (till you need it).

Is there anything special about mobile software development or is it the equivalent to developing for a very small laptop?  Do the devices and capabilities imply different patterns and processes?  Are there any implications for research and education?

The Workshop on Mobile Software Engineering in conjunction with MobiCASE 2010 will be exploring these questions.  Martin Griss and Ray Bareiss from Carnegie Mellon are chairing the workshop. I’m on the organizing committee and look forward to hearing from other people in the field.  At time I think the answers are obvious, but then find that other people come to different conclusions.  It is sure to be an interesting conversation.

The call for papers has been extended till Sept 28 to invite additional participation.  Please join us.

Not sure if this is a bug or a feature. I’d guess it is here for a reason, and maybe I’m late for noticing, but Rails 3 errors now provides an array for each attribute, whereas in Rails 2.3 it was just a string.  Here’s the output from two almost identical applications…

Loading development environment (Rails 2.3.8)
>> person = Person.new
=> #<Person id: nil, first_name: nil, last_name: nil, present: nil…
>> person.valid?
=> false
>> person.errors
=> #<ActiveRecord::Errors:0x1034d8f10 @errors=#<OrderedHash …
>> person.errors[:first_name]
=> “can’t be blank”

Loading development environment (Rails 3.0.0)
>> person = Person.new
=> #<Person id: nil, first_name: nil, last_name: nil, present: nil…
>> person.valid?
=> false
>> person.errors
=> {:first_name=>[“can’t be blank”]}
>> person.errors.class
=> ActiveModel::Errors
>> person.errors[:first_name]
=> [“can’t be blank”]

I didn’t see that in the release notes, but it failed my tests for ActiveRecord class. Someone else must have a list of these details, yes?