On 27.03.2012 13:07, vitalif@yourcmc.ru wrote:
JSON is the internal serialization format.
You're suggesting to use MediaWiki as a model :) What's stopping you from implementing it as a _file_ handler, not _article_ handler?
Because of the actions I want to be able to perform on them, most importantly editing, but also having diff views for the history, automatic merge to avoid edit conflicts, etc.
These types of interaction is supported by mediawiki for "articles", but not for "files".
In constrast, files are rendered/thumbnailed (we don't need that), get included in articles with a box and caption (we don't want that), and can be accessed/downloaded directly as a file via http (we definitely don't want that).
So, what we want to do with the structured data fits much better with MediaWiki's concept of a "page" than with the concept of a "file".
I mean, _articles_ contain text (now wikitext). All non-human readable/editable/diffable data is stored as "files".
But that data WILL be readable/editable/diffable! That's the point! Just not as text, but as something else, using special viewers, editors, and differs. That's precisely the idea of the ContentHandler.
Now they all are in File namespace, but maybe it's much more simpler to allow storing them in other namespaces and write file handlers for displaying/editing them than to break the idea of "article"?
How does what I propose break the idea of an article? It just means that articles do not *necessarily* contain text. And it makes sure that whatever it is that is contained in the article can still be viewed, edited, and compared in a meaningful way.
-- daniel