[eluser]John_Betong[/eluser]
Hi Parrots,
I have written a couple of sites and the last one adopted this following style:
view folder
Code:
..
contactus.php
docs.php
formsuccess.php
hire.php
home.php
myform.php
products.php
_doctype_strict.php
_doctype_transit.php
_doc_faqs.php
_doc_links.php
_doc_privacy.php
_doc_sitemap.php
_doc_terms.php
_home_welcome.php
_com_analytics.php
_com_footer.php
_com_header.php
_com_menu_left.php
_com_pic_msg.php
_com_title.php
_hire_box.php
_hire_credit.php
_hire_cyclecarrier.php
_hire_dates.php
_hire_form.php
_hire_location.php
_hire_menu.php
_hire_vehicle.php
_home_products.php
As you may presume from the naming convention I have:
1. a controller and view with the same name.
2. all files prefixed with “_xxxx” are assocated with the “xxxx.php” controller and view.
3. files prefixed with “_com” (common) can be used with all views.
This worked well and especially because:
1. my editor automatically lists the files alphabetically.
2. I find it a pain to keep switching directories.
3. updates are easier when only the controller and view directories change.
Discuss: Are programmers lazy or efficient?
Cheers,
John_Betong