As it is, the MODx "engine" does nothing to support Web20 and Ajax (not just fancy DOM scripting for local effects). It doesn’t do anything to get in the way, but neither does it acually offer any help. Ajax requests need to be made to stand-alone php files that have no access to the MODx class, unless you want to include the entire document.parser.class.inc.php file in every request processor file. And that is problematic because the class includes other files and paths become an issue. And including the parser class file includes all the logging, caching, TV and snippet and chunk processing, and user management methods, considerably bloating what gets loaded beyond what is needed. Even the DB api uses $modx-> class methods, so it can’t be used independently either.
This leaves the Ajax developer on his own; other than getting the initial document loaded he may as well not even be using MODx.
I am looking into developing an Ajax developer’s package that will be a parallel core with what is basically a picked-apart parser class file, broken up into several different class files that can be included into the Ajax request processor files as needed, and all stored in one standard location so paths won’t be an issue. It will contain a central server-side request handler, something like what is discussed in
this article.