Welcome Guest, Not a member yet? Register   Sign In
Model / Controller names
#3

[eluser]Michael Wales[/eluser]
I tend to name all of my controllers the plural (stories, users, etc) and the model the singular with an appended '_m' (story_m, user_m).

I run into a bit of an issue with my plurals and tend to do a lot of URL routing though. Sure domain.com/stories is great for listing the stories on your site, but domain.com/stories/the-title-of-a-single-story is a bit odd to me (using the plural stories when viewing a single story).

The combination may be a bit quirky, but it works for me.


Messages In This Thread
Model / Controller names - by El Forum - 09-28-2007, 10:44 AM
Model / Controller names - by El Forum - 09-28-2007, 10:58 AM
Model / Controller names - by El Forum - 09-28-2007, 12:15 PM
Model / Controller names - by El Forum - 09-28-2007, 09:13 PM
Model / Controller names - by El Forum - 10-02-2007, 07:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB