Hello, this is my first post on this website, but I'm all the time getting answers for my questions here, through other users, so thank you very much.
Well, actually I'm creating a web application, specifically on rails. All the models structure were built and now I was pretending to start to build the controllers and routing. So, I have a couple of questions regarding the proper way to build these routes.
First thing I did was search through some nice applications and check how they've built their routing structure. Twitter have nice ones,I noticed that they created a session for each login and all the following routing is based on the root level so the user/account is inherited to it. (i.e : http://twitter.com/status/update)
Well, the main structure of my app is:
account/blogs/#{id}/pages/#{id}...and so on...
Actually the account owner can be a developer or just a simple user while the developer have more features to deal with. But it's the same model just with the attr developer:Boolean setting its permissions.
Account{:id, :username, :email, :developer}
So my question is: What's the best way to create a some nice routes to create this account if I have two different types user/developer?
I was thinking if this would be correct:
/account/create for simple users
/account/create?type=developer for developers
Can I use extra parameters declared on the post request, or at least on the GET to display the form?
And at the same time I checked some guides and I read about some RESTful routing where we can have something like:
accounts/1/blogs/1/pages/1
but for example, the stackoverflow.com wesite acts this way:
/users/165750/ludicco and /users/edit/165750
So it's using a little bit different order. is this a proper formatted way to do it?
Sorry, but I'm kinda lost, so I don't know how to proceed on this field yet. Any help or tips about it would be much appreciated.
Thanks in advance