Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Once you get into MVC, it can be worthwhile to explore patterns beyond the "Gang of Four" book, and get into Martin Fowler's "<a href="http://martinfowler.com/eaaCatalog/index.html" rel="noreferrer">Patterns of Enterprise Application Architecture</a>."</p> <p>The <a href="http://martinfowler.com/eaaCatalog/registry.html" rel="noreferrer">Registry</a> pattern can be useful to make well-known objects available throughout the object hierarchy. Essentially a substitute for using global data.</p> <p>Many MVC frameworks also employ the <a href="http://martinfowler.com/eaaCatalog/frontController.html" rel="noreferrer">Front Controller</a> and the <a href="http://martinfowler.com/eaaCatalog/twoStepView.html" rel="noreferrer">Two-Step View</a> patterns.</p> <p>The "Model" in MVC is best designed as the <a href="http://martinfowler.com/eaaCatalog/domainModel.html" rel="noreferrer">Domain Model</a> pattern, although some frameworks (led by Rails) <a href="http://wiki.rubyonrails.org/rails/pages/Models" rel="noreferrer">conflate</a> the Model with the <a href="http://martinfowler.com/eaaCatalog/activeRecord.html" rel="noreferrer">ActiveRecord</a> pattern. I often <a href="http://karwin.blogspot.com/2008/05/activerecord-does-not-suck.html" rel="noreferrer">advise</a> that the relationship between a Model and ActiveRecord should be HAS-A, instead of IS-A.</p> <p>Also read about <a href="http://c2.com/cgi/wiki?ModelViewController" rel="noreferrer">ModelViewController</a> at the Portland Pattern Repository wiki. There is some good discussion about MVC, object-orientation, and other patterns that complement MVC, such as <a href="http://c2.com/cgi/wiki?ObserverPattern" rel="noreferrer">Observer</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload