Should I name my actual controller files the same as my view files in Codeigniter?

b.tumtum

New Member
I'm writing my first Codeigniter site using the MVC pattern. I'm building some controllers that load views now (haven't gotten to Models yet) but I'm noticing that my View and Controller files have the same filename (like products.php). They are in their respective folders of course. For example I have an About controller, that loads an About view, both of which are named about.php. I have a Products controller that loads a Products view which are both named products.php. Is this good practice? From reading and studying it seems everyone names their models differently, like Products_Model.php, which makes it easy to distinguish, but I can't recall seeing anyone doing anything different with the controllers and views.Am I setting myself up for a headache down the road when this site develops more? Thank you!
 
Back
Top