Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

How to pencil out a design for a Rails app

I am pretty familiar with php and mysql. Usually, when I am working on a design for a php application I get out my notebook and tend to follow the below

  1. Draw out rough draft of database scheme
  2. Draw out what I imagine pages to be like
  3. Write code snippits for parts of the pages
  4. Eventually get to computer and start fleshing the whole thing out

With the MVC structure of Rails, I think it makes this process a little more difficult. Do any of you guys start with a pencil and notebook for your application and what does that process look like?

3 Answers

I'm in no way a Rails expert, but I gained some basic knowledge with the Cucumber test framework. Cucumber focuses on the high-level aspects of an app. I think Cucumber (paired with RSpec for lower-level testing) is a great tool for systematically developing a Rails app. You basically write down beforehand what your app is supposed to do; then you write the code that fulfills these requirements.

Of course the same could be achieved by using Test::Unit like in the Treehouse videos, however Cucumber is tailor-made for this kind of stuff.

Here's a nice introduction:

http://railscasts.com/episodes/155-beginning-with-cucumber

I think that is probably a good way to take care of things once I'm at a computer. Seems straight forward and a nice way to plan out an app. Would be somewhat tough to "doodle" that in a meeting however. Hence the need for some pencil + notebook systems

Michael Hopkins -

Doing this for MVC is not really all that different from what you are doing now. The trick is to tweak how you are thinking about the parts of your.

model = database schema view = what pages look like controller = business logic (aka pseudocode snippets)

Just draw all 3 things on the same sheet of paper with arrows to show how data flows between them.