Thursday, July 18, 2013

Re: [Rails] Laying out the flow of an application - where to start?

On Wed, Jul 17, 2013 at 11:25 AM, Chris Sciolla <csciolla1@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.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDHj%2BUuOtrqL3u_zaTu%3DSzm6ZSnSfDOM396UMrbMkk%2BUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate