[Rails] (resend - sorry!) Which controllers?
Tony Mobily
merc at mobily.com
Mon Feb 27 00:37:51 GMT 2006
Hello,
I have recently started learning RoR. I think it's _fantastic_. I am
absolutely blown away.
OK, this is to prepare you to my idiotic question. Hopefully, I won't
be stoned.
I am designing a simple application, where users can register, and:
* Publish a photo album
* Publish a simple blog with comments
* Determine their list of friends and foes
The application will obviously have a front end and a backend.
The front end will give people a chance to search, and "find" members
and blogs
The back end will allow people to manage their profiles and add blog
entries.
Now: I like the idea of urls like this:
domain.com/user/merc/blog
Where:
* "user" is the controller
* "merc" is the user id
* "blog" is the action (in this case, show the blog)
The backend could be:
domain.com/backend/merc/blog
Where everything is as above, a part from the fact that "backend" is
the controller.
This does mean that each controller will have quite a few actions.
I guess my question is: how do you decide what a "controller" is and
does? How should I divide the application amongst several controllers?
Well... I hope I didn't embarrass myself too much.
Thanks a lot and bye!
Merc.
More information about the Rails
mailing list