![]() |
Naming Models - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Naming Models (/showthread.php?tid=12491) |
Naming Models - El Forum - 10-21-2008 [eluser]iainco[/eluser] UserModel User_Model UserM User_M User_Mod UserMod Usermodel... and so on. What do you do? I can't seem to decide on the best model naming convention, it'd be better if I could just use "User", but will run into class naming problems if I have a controller called "User". This is pretty stupid, and it's just wasting time instead of actually getting work done, but that's the kind of day I'm having! Laters Naming Models - El Forum - 10-21-2008 [eluser]sl3dg3hamm3r[/eluser] I usually name them 'mdl_xyz' (and for libs 'lib_xyz'). This gives me another advantage: I use Eclipse, and with it, I usually have open several scripts in several tabs. With the prefix, I can recognize the right tab I want to select much faster, it is also about readability. Naming Models - El Forum - 10-21-2008 [eluser]The Wizard[/eluser] i preffer Model_x like: Model_user Model_message Model_info and so on ![]() |