On Sun, Dec 28, 2008 at 8:08 AM, cgommel <[email protected]> wrote:
>
> Hello,
>
> being a very early beginner I want to build my first little rails app.
>
> I want to show the users (my co-workers) the menu table of our
> catering service.
>
> We can choose between five different dishes, some salads and desserts
> every day.
>
> Looking through all the (quite good) tutorials on the Internet I could
> not find a similar task - meaning a similar data structure.
>
> Is there anybody who can give me an idea for the data model I shoud
> use.
>
> I don't have any experience with Rails that makes me find a proper
> solution. Is there a way to define "Menu[1..n], Salad [1..m], Dessert
> [1..i] for  each day in an elegant way?

Hi there,

Honestly, one of the best ways for you to map out your data model is
to break down each element in your menu (assuming you have an existing
physical one) to get a clear picture. What does a Menu consist of?
What does a Menu Item consist? Are there different types of menu
items? Does each menu item have a name, description, and price?

Perhaps I helped you out a bit there, but that's really the best place
to start. Don't think about the technical relationships until you
answer those types of questions. While doing it, you'll see that your
data model will evolve organically.

Another tip, start with the easiest thing to model, which my guess
would be the Menu itself (sans-menu items). You can have an empty Menu
with your catering business information to start (name of business,
address, etc..). Then think about what needs to go inside of it and
begin to evolve your data model over time. This is also how you might
consider developing the application. Build it in small pieces and
evolve it as you go. This is one of the things that Rails encourages
you to do.

Keep it simple!

Cheers,
Robby
-- 
Robby Russell
Chief Evangelist, Partner

PLANET ARGON, LLC
design // development // hosting w/Ruby on Rails

http://www.planetargon.com/
http://www.robbyonrails.com/
aim: planetargon

+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to