[development] is drupal a MVC stuff
larry at garfieldtech.com
larry at garfieldtech.com
Fri Dec 11 16:40:24 UTC 2009
Andrew Berry wrote:
> On 2009-12-11, at 9:33 AM, Damien Tournoud wrote:
>
>> a big part of the view and the controller is
>> actually handled by the browser.
>
> This is true for how %99.9 percent of the Drupal installations out there, but a "view" doesn't have to be graphical. A View could be RSS, XML, Postscript, etc. IMO the $page array in D7 brings Drupal much closer to an MVC-like design, as you now have an abstracted representation of data before it's processed by the View (whatever your theme_* and .tpl.php files do).
>
> --Andrew
The defining attribute of MVC is, IMO, that the View component has
direct access to the Model component using an observer relationship,
without going through a separate Controller.
hook_page_alter() is in no way a direct observer relationship between
the View component and the Model component. *_alter hooks are a
pipes-and-filter approach, or, arguably, visitor pattern.
Drupal is very much not an MVC design. It's not true PAC either, but I
have and do argue that it is closer to PAC than MVC.
Someone needs to correct the Wikipedia page, which is simply wrong in
this regard.
--Larry Garfield
More information about the development
mailing list