I see this both ways. For many people (myself included), being able to quickly edit templates and chunks directly in the manager is really nice. It is even nice to just be able to write a quick snippet in the manager to get something done fast. I don’t think any of this should go away.
On the other hand, if the elements were files, then:
* It would be easy to use Subversion, GIT, etc.
* It is much easier to use your favorite IDE or editor.
Tracking everything in svn is just a good development practice. It makes it much easier to find and undo mistakes and keep track of what you are doing. If you are working as a team svn is essential. I have lost work a number of times because someone else on my team accidentally overwrote my changes! Being able to manage a project within an IDE is also really nice (the thing I really hate about web-based editors is always having to find my spot in the code after every save).
So, why not have the best of both worlds?
I have been planning a plugin for Evolution that would keep a synchronized copy of elements as files. Templates, chunks, etc. would be kept in the database as normal, but there would also be a copy on the file system. The plugin would make sure that any time an element changed, the associated file would also be updated. A related snippet would update elements in the database with the files. Just put this snippet on a special page, and hit that page whenever you want to sync the db with the files.
Here comes the great part. Every element would actually have TWO associated files. One for content, the other for medadata. So it would be possible to track metadata in svn and edit in an IDE--and also to edit the content as a normal, clean html or php file. Want to create a new chunk? Just create myChunk.ini and myChunk.html and hit your sync page. Done. Check it in to svn and the other people on your team will have ’myChunk’ automatically created on their local copy of MODx. If you need to delete that chunk, then set ’deleted: 1’ in myChunk.ini, and it will be removed for everyone. (I also have a plan for renaming/moving elements.)
When you are ready to deploy, have the synchronization plugin delete itself and do an svn export.
If anyone is interested in collaborating on this, we can discuss it on this thread:
http://modxcms.com/forums/index.php/topic,38472.0.html
The metadata format I have in mind is something like this:
name: myChunk
description: This is my description of my new chunk
editor_type: 0
locked: 0
deleted: 0
I have ideas for how to make this work for documents as well.
Just to clarify, the purpose of this plugin and snippet would be to help developers use svn, an IDE, and work as a team. It is not intended for the end-user.