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

[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
 


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