I know MODX is already a CMS and maybe a framework itself but sometimes I feel the need to have a framework over it, if I can say that, or at least some rules to follow so I will not end up with a hundred of snippets and chunks and plugins and a bunch of extras. Maybe to much freedom is not good in all the cases?!
I have failed in creating something like this but maybe someone else is already doing that successfully and maybe he or she is willing to share that
I will describe my failure and maybe one of the more experienced modx users will be able to advice or maybe will be inspired.
My initial ideea was to use the core modx and to try to avoid the use of custom tables for creating things that could easily be mapped on modDocument. So, in my view, for each type of object I can define in a web application I would create a template and a set of templates variables that describe the object.
So if I would have to create an e-commerce site that will present products grouped on various categories, as an example, I would create:
template tplProductCategory with template variables: pcId, pcLabel
and
template tplProduct with template variables: pId, pcId, pName, pPrice, pImage, pDescription.
These would be my "classes".
I would create in web context a resource folder named category where "instances" of tplProductCategory would be stored, these being documents having their template property set to tplProductCategory.
"Instances" of products could be stored in a folder resource called products in the root of web context or under the category instances from which they are part (considering that a product can't be in two categories) and of course producta re documents with their template property set to tplProduct.
I guess this might be some what a nice and easy model, I think I am failing when I try to do a search on such a thing
If your site will need a search on these products with some filters based on the products properties I found it pretty difficult to implement .... or maybe I am not aware of the powers of xPDO.
Anyway, I am wondering if any of you have already "ways" or "rules" of doing things, or why not a "conceptual framework" in MODX rather than just doing things differently for every other project, it would be hear about that.
Thank you.