top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

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

0 votes
174 views

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:
StatesTowns
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.

posted Jul 18, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote

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.

answer Jul 18, 2013 by anonymous
0 votes

Very first place I always start is "What problem does this solve for whom?" and then start to ask "What tasks do they need to do? What problems do they have in performing those tasks? How can I make something that will help them do what they need to do?" Write user-centered stories of use cases. These become your early acceptance tests. When you have all that, the tasks and stories should lead to a navigation structure that will make sense to the user.

If you think you have all this information already, present it here and give us something to go on. Right now, you just have a collection of models, and we don't have a clue why.

answer Jul 19, 2013 by anonymous
Similar Questions
0 votes

When I view the output of the top command on ubuntu, I notice sometimes there is 6 ruby processes. When are each of these processes spawned?
http://tinypic.com/view.php?pic=2i24rwh&s=5

I cannot imagine that it's every time someone loads the rails application from a different ip address, otherwise I would assume there would be more ruby processes spawned.

+2 votes

I have one rails application from this I want to create another new rails application and start in different port.
I done with creating new rails application outside of my main projects but i stuck with starting server...
Please help or suggest any idea...

Now I have one idea and trying that one now but I don't know that way is good or not...the idea is like open new terminal window in background through ruby script and start the application (even this also I stuck, please suggest how to do this if this way is good)

...