Yesterday, the classes AppController, AppModel, and AppHelper were moved from the “cake” folder to the “cake/libs/controller”, “cake/libs/model”, respectively “cake/libs/view/helpers” folders (see changesets 5997 and 5998). Due to this move, my code suddenly broke as the AppHelper class wasn’t found because CakePHP still looked for it in the original folder. Creating an empty AppHelper class in my “app” folder solved the problem.
Anyway, what I realized by this incident is that the implementation of this entire concept is unnecessary “complex”. I must have been blind I didn’t saw this earlier ;-)
If you, for example, want to add some functionality to the AppController, you have either to copy the file app_controller.php from the “cake” (resp. new “cake/libs/controller”) folder to the “app” folder, or you have to create the file yourself in the “app” folder. That’s because you shouldn’t edit any files in the “cake” folder and its subfolders. This often leads to confusion: if you tell a newbie he should add something to “app/app_controller.php”, then the file is not there…
But it also makes the life of the (framework) developers a bit harder, as you have to check whether the files exist in the “app” folder, and depending on this check you then load the files either from the “app” or “cake” folder.
Sure, the aforementioned topics are no big deal, but on the other hand there are no benefits in doing it in the way it is currently done (or at least I don’t see any benefits).
A simpler solution would be to add AppController, AppModel, and AppHelper to the “app” folder by default (which is already done by the bake script when you bake a project). So those classes in the “cake” folder would be redundant and could be removed (and you could forget what I wrote above). KISS, keep it simple and stupid!