Quote from: xwisdom at Aug 13, 2006, 08:33 PM
I for one like the MVC and the Observer Patterns.
Me three; I think Ryan was just misquoting some of my rantings about MVC and PHP, which are generally, what he calls whooshy

Or maybe he was just wanting me to respond...well, now here we go... LOL
Indeed, they are key patterns in modern software architecture, and IMO, the MODx approach to templating, combined with traditional MVC and some newer patterns, patterns that have evolved out of years of experience implementing variations of the MVC pattern, provides the next generation of MODx a rare opportunity to evolve into a very agile and robust framework for developing web applications, with the same freedom of expression and ease of use we’ve all come to love.
From my perspective, most of the implementations of MVC architectures in PHP are a bit heavy and tend to either provide too much, or aren’t useful unless you are a very adept object-oriented programmer. This, too me, is not taking advantage of the major stengths of PHP as an interpreted templating language that is easy to use. My work with the MODx code since we started the project, along with research into various PHP MVC-style frameworks over the past 2 years, provoked my original prototype back at the beginning of the year and has fueled the ongoing development of my object-oriented rewrite of MODx ever since.
In this rewrite, what is referred to as a document/page currently, or what I will call a Resource (as in URI, or Universal Resource Identifier), represents an aggregation of what I consider small, specialized Application Controllers. Each little Application Controller, or Content Element as I prefer to refer to them, has access to other controllers in a loosely coupled fashion, and all have access to the Model, or data layer, directly or through another controller. In a sense, these Elements (think Snippets, Chunks, Templates, TV’s, Plugins, etc.) are individual Views from traditional MVC, with a lot more power and flexibility. Then you have the Front Controller, part of a more complex MVC-inspired pattern, which is simply the php page (like the current index.php) that is calling MODx Resources (again, just a collection of application controllers or Content Elements). Those Resources could be page resources, rendering a simple web page, or web link resources, or any number of xml-rpc services, ajax services, or custom page resources with custom behavior defined for it. And you can have any number of Front Controllers, too, called Contexts. This sounds complex, but really, it boils MODx down into three basic concepts, various Contexts of Resources that produce content via Elements, or in MVC lingo, various front controllers aggregating application controllers to producing dynamic views of the model.
Anyway, enough techno-babble I suppose, but combined with some exciting work we’re beginning now with the
Dojo framework and it’s powerful
AOP architecture, as well as my
xPDO project for managing persistence and building consistent API’s that are easy to use, and even easier to extend, I’m truly excited about what I believe will help further distinguish MODx as a revolutionary approach to open-source content management with PHP. Now, back to the work of getting it all ready to show off...