views:

83

answers:

1

I'm about to begin a Ruby on Rails project and I'd love to hear how others go through the process of starting an application design. I have quite a bit of experience with RoR, but don't have that many starting from scratch with only a vision experiences and would appreciate the wisdom of others who've been there.

I'm looking for an order of events, reasons for the order, and maybe why each part is important. I can think of a few starting points, but I'm not sure where it's best to begin

  • Model design and relationships (entities, how they relate, and their attributes)
  • Think of user use-cases (or story-boards) and implement the minimum to get these done
  • Create Model unit-tests then create the necessary migrations and AR models to get the tests to pass
  • Hack out the most basic version of the simplest part of your application and go from there
  • Start with a template for a rails app (like http://github.com/thoughtbot/suspenders)
  • Do the boring gruntwork first (User auth, session management, ...)
  • ...
+1  A: 

I found myself looping the following tasks for most projects:

  1. Gather User requirements
  2. Design database Models
  3. Build Views
  4. Streamline Layouts
  5. Find and learn Plug-ins/Gems
  6. Testing
  7. User Review/Acceptance
  8. Deploy the app
  9. Documentation

After these years of working as a freelancer, I think step 1 and 2 are the most important (at least for small projects). Before writing any code, I urge users to finalize all UI first. HTML skeleton is better than written document. Users do not and will not understand software specifications. They can only give feedback after they see can click something. So being fluent in building a HTML site is a helpful skill. Sometimes I delegate the task to a partner, as a SA role.

Rails is very good for building an ever-evolving schema. Try to use migrations and data seeding instead of writing SQL statements directly. I find myself rely on ActiveRecord more and more overtime. The script/console is a nice tool to test out those many-to-many relationships and building :conditions =>.

I worked on a few legacy database lately, the establish_connection and set_table_name feature in ActiveRecord glue old and new database elegantly.

I'd also like to use this chance to thank Ryan Bates, I learn a lot of Rails from his railscasts.

ohho