Given the zend_controller naming changes in zend framework 1.5, I’m trying to
figure out a recommended naming scheme that I can use for zf 1.5 and
onwards.  This forum post helped a lot: 
http://www.nabble.com/AW%3A-Normalizing-action-function-names-p16110540.html 
http://www.nabble.com/AW%3A-Normalizing-action-function-names-p16110540.html 
but it does not mention multi-word controllers and file and directory names. 
Here’s what I could figure out.   Comments?

The formatted prose is on 
http://develop2travel.wordpress.com/2008/03/28/naming-recommendation-for-controllers-actions-urls-using-zend_controller/
this wordpress blog post  because nabble would not keep my MS Word
formatting (sorry for the inconvenience, but it's much, much easier to read
this way ).

Here's some snippets from 
http://develop2travel.wordpress.com/2008/03/28/naming-recommendation-for-controllers-actions-urls-using-zend_controller/
that formatted post :

url: domain.com/controller-name/action-name 
Controller File name / Class name: MixedCase   
  eg: file RoadMapController.php contains class RoadMapController for url
domain.com/road-map 
View Action method: Use camelCase 
  Eg: componentsForHighLevelAction for
domain.com/road-map/components-for-high-level 
View File and directory: 
  Controller directory: All lower case with dashes between words.  
  View file name:  All lower case with dashes between words.  
  Eg: my_file_system/road-map/components-for-high-level.phtml 

This naming scheme is pretty complicated.  It sure would be nice to have a
complete example explicitly documented in the zend_controller reference
guide.  I’m really looking for the zend framework recommendation on setting
this up such that it covers the common cases, enables readable (word
separated) URLs, and will be stable for future releases.  Well, this is my
attempt at documenting it. 

-- 
View this message in context: 
http://www.nabble.com/Naming-Recommendation-for-Controllers%2C-Actions%2C-and-URLs-using-zend_controller-tp16362913p16362913.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to