Hi, I thought about posting this as a ticket at Lighthouse as a future 
"wish" item, but I'll post here instead.  One of the things that has 
bothered me about Cake has been that some of the built-in object names take 
names that would be very common for the user to want to use, for example 
"Model".  I was trying to whip up a quick demo for coworkers and created a 
database with automotive themed tables Makes, Models, Colors, and 
ColorsModels to show how "easy" it would be to do this in Cake.  Of course, 
after trying to bake I figured out that having a model named "Model" was 
probably not going to work!  Obviously my model "Model" was colliding with 
the base model.  Same thing happens if you want to create a model "Element" 
since the view folder Elements is for elements, or "Emails", etc...  
Obviously I can rename my models to not be the same as a built in, but it 
seems like a structural problem that is always going to cause issues with 
someone.  For example, future CakePHP versions could release a new object 
that collides with one I already have.  

My initial idea is that perhaps the built in objects should be prefixed so 
even if you use the same name (without the prefix) everything is happy.  So 
Model would be _Model, AppModel=_AppModel, AppController=_AppController, 
etc... and then the user is free to use any model name he wants.  Or is 
there another way to solve the problem that I am not aware of?

Thanks for your time!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to