Chris Sciolla
2013-Jul-17 18:25 UTC
Laying out the flow of an application - where to start?
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. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/906a0f54-0938-42a2-87e8-756d2f0ebe5e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Chris Sciolla
2013-Jul-17 18:45 UTC
Laying out the flow of an application - where to start?
Hi all, first post! 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 profile - geography - population - demographics leaders budget history recycling maps Part of my issue, due to lack of experience, is really where to start. My main confusion is how to associate the pages to correlate with each state and town and how I would build the main navigation. The routing and url structure I would like is www.example.com/state/town/profile/geography. I have gone through many of the normal tutorials, but I can seem to get a breakthrough mentally on this. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7894672cd30ef2c1ab5553a3bebb9ae5%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Hassan Schroeder
2013-Jul-18 15:15 UTC
Re: Laying out the flow of an application - where to start?
On Wed, Jul 17, 2013 at 11:25 AM, Chris Sciolla <csciolla1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Tamara Temple
2013-Jul-19 07:05 UTC
Re: Laying out the flow of an application - where to start?
On Jul 17, 2013, at 11:45 AM, Chris Sciolla <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi all, first post! 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 > > profile > - geography > - population > - demographics > leaders > budget > history > recycling > maps > > Part of my issue, due to lack of experience, is really where to start. > My main confusion is how to associate the pages to correlate with each > state and town and how I would build the main navigation. The routing > and url structure I would like is > www.example.com/state/town/profile/geography. I have gone through many > of the normal tutorials, but I can seem to get a breakthrough mentally > on this.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. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/102BC701-A91F-4810-8DDE-EE72DB3F4408%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Chris Sciolla
2013-Jul-19 14:15 UTC
Re: Laying out the flow of an application - where to start?
@tamouse_m, thank for your insight. Those are great questions and I''ll be sure to note them. So here are the best answers I have. In this particular situation, users are visiting static pages of information. There are no real dynamic tasks involved, just browsing pages and subpages. In this case, a user will visit www.example.com. This root page lists all states included in the database. The user will click on a state, and that page will list all the towns, within that state, that are in the database. Next the user clicks a specific town link. On this particular page, there is a main navigation with each of the pages I originally listed in a navbar. Profiles has three subpages. In each of these pages, there is static HTML, that differs for each town, for viewing purposes only. So it''s fair to assume that these pages and subpages exist for each town. Nothing dynamic. On top of this, I would like a simple admin are where I can add new states, pages, and information to the pages/subpages as well. This is easily handled by something like WordPress, because it''s a simple CMS tool. However, I want to use this particular example to learn more about RoR. Hopefully I''ve clearly stated the tasks involved in the ux. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cef3370dcd504da44dc1d7e0972276f7%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Colin Law
2013-Jul-19 15:33 UTC
Re: Re: Laying out the flow of an application - where to start?
On 19 July 2013 15:15, Chris Sciolla <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> @tamouse_m, thank for your insight. Those are great questions and I''ll > be sure to note them. So here are the best answers I have. In this > particular situation, users are visiting static pages of information. > There are no real dynamic tasks involved, just browsing pages and > subpages. > > In this case, a user will visit www.example.com. This root page lists > all states included in the database. The user will click on a state, and > that page will list all the towns, within that state, that are in the > database. Next the user clicks a specific town link. On this particular > page, there is a main navigation with each of the pages I originally > listed in a navbar. Profiles has three subpages. In each of these pages, > there is static HTML, that differs for each town, for viewing purposes > only. So it''s fair to assume that these pages and subpages exist for > each town. Nothing dynamic. On top of this, I would like a simple admin > are where I can add new states, pages, and information to the > pages/subpages as well.That all looks ok, so what is the question that you are asking? I presume you have already worked right through a good tutorial on rails, such as railstutorial.org, which is free to use online. If not then do so and you will understand the basics of Rails. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvRCLegG7oCVkX4DRetVjEtKKf%3DUsNUDg%3D43zqnePQkDg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
chris sc
2013-Jul-19 15:41 UTC
Re: Laying out the flow of an application - where to start?
I guess I just need to wrap my head around associations. That''s what I''ve been reading more about and it seems like it''s taking me down the right path. What I''m still confused about, is how to separate the admin side from the user side. I know there are gems for this, but I want to understand the logic behind the way it works. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/857681b1b3269a5f532068f7da270a46%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Joel Pearson
2013-Jul-19 15:49 UTC
Re: Laying out the flow of an application - where to start?
I think when you say "static" html for the pages, you really want dynamically generated content. You need a simple template which presents the requested information with links up and down the chain. The first thing you need to do, particularly if you have data to start off with, is sort out the database structure. Once you''ve got your database links mapped, you know the page order as well: You start with an index which may or may not contain a search function. The index contains, for example, rows of dynamically generated data and links. In this case, States. Each state links to another template populated with dynamically generated content: towns. Once you plan the Model, the View should be obvious. After that you just need to start with the default view (index) in the Controller, and then you can let the database links guide your way through the different sub-pages. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/cd88d9604620a01728f335b8254403ac%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jul-19 21:30 UTC
Re: Laying out the flow of an application - where to start?
On Jul 19, 2013, at 8:41 AM, chris sc <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I guess I just need to wrap my head around associations. That''s what > I''ve been reading more about and it seems like it''s taking me down the > right path. What I''m still confused about, is how to separate the admin > side from the user side. I know there are gems for this, but I want to > understand the logic behind the way it works. >What I''d suggest in the latter case is a good long look at active_admin; not necessarily to use, as you say, but to understand how one implements such a thing. After you''ve perused it, you might decide it''s okay to use, or roll your own (as you say this is primarily a learning project). -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/B4ECFA02-E1ED-445A-A542-B4901464131F%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Tamara Temple
2013-Jul-19 21:37 UTC
Re: Laying out the flow of an application - where to start?
On Jul 19, 2013, at 7:15 AM, Chris Sciolla <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> @tamouse_m, thank for your insight. Those are great questions and I''ll > be sure to note them. So here are the best answers I have. In this > particular situation, users are visiting static pages of information. > There are no real dynamic tasks involved, just browsing pages and > subpages. > > In this case, a user will visit www.example.com. This root page lists > all states included in the database. The user will click on a state, and > that page will list all the towns, within that state, that are in the > database. Next the user clicks a specific town link. On this particular > page, there is a main navigation with each of the pages I originally > listed in a navbar. Profiles has three subpages. In each of these pages, > there is static HTML, that differs for each town, for viewing purposes > only. So it''s fair to assume that these pages and subpages exist for > each town. Nothing dynamic. On top of this, I would like a simple admin > are where I can add new states, pages, and information to the > pages/subpages as well. > > This is easily handled by something like WordPress, because it''s a > simple CMS tool. However, I want to use this particular example to learn > more about RoR. Hopefully I''ve clearly stated the tasks involved in the > ux.I''m still unclear *why* a user would be browsing these pages. What information are they looking for? What question does this information answer for them? What sorts of things will they be able to do once they have this info? The steps you list are necessary to outline, for sure, but why do you want/need to put your user through them to get at the information they are seeking? That is the important question to answer early, I think. If you think about it, drilling down can be a very slow exercise for users, especially if they have a slow network connection and have to wait for page loads, etc., even if your app is serving up largely static data. Think about how your user is going to see this and get right down the bone on what they need to see, and not put operations in their way if not needed. I think, perhaps, you''ve spent quite a bit of time thinking about how to organize the data, which is a good thing, really, but not necessarily enough time yet thinking about how the user would be best served in accessing it, which can be completely different than how it''s persisted in the backend. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/275E688C-4D91-4534-AF1B-1F13CE8D3EE6%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.