Laying out the flow of an application - where to start?

12 views
Skip to first unread message

Chris Sciolla

unread,
Jul 17, 2013, 2:25:58 PM7/17/13
to rubyonra...@googlegroups.com
I have a question regarding where to start with a particular app I'm building. Hoping someone can set me on the right path. The scenario is pretty straight forward.

This is the hierarchy of info:

States
Towns

Each state has many Towns

Each town has the following pages associated with it.
  • profile
    • geography
    • population
    • demographics
  • leaders
  • budget
  • history
  • recycling
  • maps
Part of my issue, due to lack of experience, is really where to start. I'm trying to learn what I should be doing first when starting a new project. I'm not sure exactly what should be models. I think my biggest confusion, is how to handle the subpages. I want the RESTful urls to be www.example.com/state/town/profile/geography and so on.

Hassan Schroeder

unread,
Jul 18, 2013, 11:15:59 AM7/18/13
to rubyonra...@googlegroups.com
On Wed, Jul 17, 2013 at 11:25 AM, Chris Sciolla <csci...@gmail.com> wrote:

> Part of my issue, due to lack of experience, is really where to start. I'm
> trying to learn what I should be doing first when starting a new project.
> I'm not sure exactly what should be models. I think my biggest confusion, is
> how to handle the subpages. I want the RESTful urls to be
> www.example.com/state/town/profile/geography and so on.

If you have this structure in mind, why not write a test for that and
go from there? e.g. an rspec request test like

it "responds to /california/idyllwild/profile/geography" do
get "/california/idyllwild/profile/geography"
response.status.should be(200)
end

(You could use cucumber or some other framework, of course.)

Start with some reasonable model name - Town, Place, Location -
and see how that fits as you add tests describing what the app does.

HTH,
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Reply all
Reply to author
Forward
0 new messages