I already tried to push for something in this direction about
one month and one year ago, and good shamblett made the step of
modifying his Auditor accordingly, but no devs succeeded (or engaged) in doing a usable component for what I asked. So there was a stale.
Now I don’t know MODx Registry but I imagine it’s something that gets us close to where we already were with shamblett’s upgraded Auditor, with the same issues that we discussed at the time regarding the db synch facilities as long as we start speaking about rollbacks, undo/redo, and such.
So what I am proposing this time is a bit different in concept, and a bit simpler too; as I’m a little scared of a new stale, let me clarify it better.
Of course the Extension could evolve in time with something bigger, with undo/redo facilities, snapshots, etc. But they will eventually be a plus, not the core.
So let me focus in explanation on the core concept:
In the manager UI, I see the core Extension exposing me only
one new switch (again, with time this number could grow with other features/options, but let’s focus):
[ ] enable sfs rapid development mode (?)
...unselected, in default installation, to use MODx like we all do it now, writing (or pasting) stuff in the manager UI, by clicking edit button, save, and so on.
If the switch is selected by the user, essentially three things have to happen:
1) when the user changes switch value, if it does not already exist, it creates the
sfs: a collection of files structured in folders, which are "twins" of documents and elements found in db, or - generally speaking - whatever is editable from the manager UI; if the sfs already exist, it alerts that a sfs already exists, and asks in which direction it has to do a clone: db->sfs, or sfs->db? It gives an hint saying that the freshest thing has been found in the db, or in the sfs; are you sure? type SURE all uppercase if you are SURE; ok it seems you are sure, let’s go. No rollbacks; no undo/redos; not at all;
2) when the sfs-RDM mode is on, there’s no way to delete stuff from the manager UI: when you try a popup appears explaining that sfs rapid development mode is enabled, so to delete stuff you have to delete the twin file; an option to this could be that "deleting" is interpreted as a "mark for deletion" when sfs-RDM is enabled, so that the Core Extension will do the real dirty work by killing the thing both in db and in sfs (but this probably would require a new "markdelete" field in modx tables);
3) when the sfs-RDM mode is on, when a page of the MODx-driven site/app or of the MODx manager is loaded, an automatic synch process between the db and the sfs is done by the Core Extension; the rule is that the freshest twin wins, and clones itself on its counterpart.
I can’t easily see how this can be done with the MODx Registry, but maybe it’s me. With the Audit fields on all the transactional tables I can see it well.
Please note that in my reasoning, every other thing besides those three, from editing stuff to versioning management, ftp synching, multiple developers, development/production environments, whatever, is left to user’s personal preferences, tastes, requirements, tools.