[eluser]jedd[/eluser]
Sheep, pants, scissors - off the top of my head.
I have a sneaking suspicion that there may in fact by many, many more.
[eluser]Dam1an[/eluser]
Ah yes... Although I (beleive it or not) have never yet felt the need to call a model/controller 'sheep', 'pants' etc lol
In most cases, such as pants, scissors, maybe even sheep, I don't think they would be very good names lol
As soon as I come up against something like this, I'll let you know how I resolve it in a real world situation
[eluser]jedd[/eluser]
Okay .. here are some more 'real world' (though what is unreal about sheep escapes me - not just because I used to be a sheep farmer either).
fish - slightly more generic, and all the rage in the newspapers in the UK at the moment (notice how they can focus on only one story at a time, and never for more than 5 days?) so all those ex-NHS knobbers are off writing IT systems to deal with fish now
premises - probably going to pop up for anyone writing a housing, real estate, or trading-post style system
precis - might crop up, depending how literate your developer was
series - almost definitely going to pop up along your travels, in this context
species - something that I've already attended to in the database I'm working on right now
[eluser]Michael Wales[/eluser]
I also follow the plural controller singular model method and haven't run into an issue with words that are spelled the same in both instances.
Fish: If it was a shopping cart site it would be products/product. If it was an informational site it would be articles/article. Can't see any reason why I would specifically be talking about a fish in any of my applications.
Premises: Same thing, I'm not referring to premises, I am referring to listings/listing (for instance, a real estate sale site).
The only one I think has any merit is your species example, even then I don't see why I would ever have a model so strictly defined as Species. It would probably by animals/animal and species (as well as ,kingdom, phylum, class, order, family) would be properties of that class.
The fish example is a great one - because you have to think of your program as a developer. You the developer don't give a damn about fish - you only care about products, articles, whatever that data is representing.
[eluser]Michael Wales[/eluser]
Definitely a valid point and I completely understand that you weren't tossing examples out in a "what about this?" scenario.
[eluser]tonanbarbarian[/eluser]
[quote author="jedd" date="1246379516"]What do you do with words that are both plural and singular? Do you avoid using such words or just wear the inconsistency?[/quote]
I fudge things a little bit.
I either misspell one of them
i.e. sheep
controller: sheeps
model: sheep
or maybe i would use
controller: sheep
model: lamb
Pants
controller: pants
model: pant
scissors
controller: scissors
model: scissor
to make things more confusing i not only name my controllers plural and my models singular, but if there is a table that maps to the model is it plural, because it contains many records.
so controller: staffs, model: staff, table: staffs
just my way of doing things that makes sense to me (when used with a normal example)
The one real world example I have is staff
In this case I made the following
controller: staffs
model: staff