Hi,
I’ve been analysing ModX for a project I’m starting on. I’ve posted about this in the forum a couple of hours before but I’ve finally been able to name what I’m looking for.
Nowadays the JAVA world is talking about JCR (Java Content Repository) vs DB, some say JCR will replace the traditional DB. So some projects like Apache Graffito are developing what has been called OCM (Object Content Mapping) basically you just map the contents of an object to a content structure. I believe this could be done in ModX since the Templates, Template Variables and Widgets already provide some good grounds to build on.
Basically we’d have a template for the models in the domain and template variables for the model’s fields.
Relationships would require some new widgets to be created in order to define the type of model to relate to and the type of relation (ex in Rails: has_one, has_many, belongs_to, etc).
The datagrid could be extended to support this and the search could now have a template field that would limit searches to types of objects.
Advantages of this approach:
- Easily create new document types, the default template variables could be just part of a Page model or something like that
- Models would appear as documents in the manager’s navigation tree, We could expand the right button menu to add "Create [model]" instead of just the "Create Document" stuff
- We could have a parent model for all of these to allow different content in a directory to be displayed as a single page without the need for special snippets for each model type. This is very similar to the schema used in more complex portals like Typo3, Vignette, etc .. we have pages and page contents.
- Navigation tree could show also the model relations by using links, this would allow for tree like navigation even in complex relations
Disadvantages:
- Migration of legacy databases would require extra work. Perhaps a module to import data would help
- Speed ?
Well, I just hope I get some discussion going around this subject as I have to make a decision soon. Should I try this approach or just forget about the whole think and use separate DB tables for new models? I now is pretty easy to just develop a module from scratch to interact with new DB tables but this might put ModX in a higher level regarding other CMSs.
I have no answer to this but a few bookmarks to share :
This and the following messages from Jason (OpenGeek) might be of interrest to you
You could also check out this post from Jason :
http://modxcms.com/forums/index.php/topic,8462.msg59697.html#msg59697
Also, not directly related but giving away hints about the future :
http://modxcms.com/forums/index.php/topic,8421.msg59404.html#msg59404
http://modxcms.com/forums/index.php/topic,8096.msg57402.html#msg57402
.: COO - Commerce Guys - Community Driven Innovation :.
MODx est l'outil id