Have I got MVC all wrong?
Posted: Mon Sep 25, 2006 8:46 pm
My touchdown with MVC came from Fowler's Patterns of Enterprise Application Architecture. He boiled it down to these:
1. Model -- Business logic
2. View -- User interface
3. Controller -- Mediates between changes in the interface and the model (not as important, although with the rise of AJAX it may be)
So I was studying CakePHP, evaluating it on whether or not I'd like to use it, and noticed that they touted MVC as their architecture. For them, it boils down to:
1. Model -- Database access
2. View -- User interface
3. Controller -- Business logic
Ehh? Am I going crazy or does CakePHP have the naming all wrong? I understand that in the first trio database access is kind of missing, so I'd suppose I'd put with the model, but CakePHP seems to have taken the normally useless controller and given it a totally new meaning, which is a mix between an Application Controller and a bunch of Transaction Scripts.
Hrmm...
1. Model -- Business logic
2. View -- User interface
3. Controller -- Mediates between changes in the interface and the model (not as important, although with the rise of AJAX it may be)
So I was studying CakePHP, evaluating it on whether or not I'd like to use it, and noticed that they touted MVC as their architecture. For them, it boils down to:
1. Model -- Database access
2. View -- User interface
3. Controller -- Business logic
Ehh? Am I going crazy or does CakePHP have the naming all wrong? I understand that in the first trio database access is kind of missing, so I'd suppose I'd put with the model, but CakePHP seems to have taken the normally useless controller and given it a totally new meaning, which is a mix between an Application Controller and a bunch of Transaction Scripts.
Hrmm...