Drop 'install.xml', use diff-patching instead
Posted: Fri Aug 21, 2015 7:23 am
As I have gone about developing my first ocmod, one thought popped into my head, "Oh my goodness, they've reinvented the diff-patch but this time in the worst possible way: XML! [gag, vomit]"
Using a real diff-patch allows for things like popular version control software to generate the ocmod. Git and other version control tools do diffs natively. The XML file is still potentially useful for the metadata about the extension but you might as well use JSON for the metadata once you drop the rest of the data into a diff file.
An even better solution is to burninate all the existing .tpl's and generate arrays of information. Those arrays are then used to construct the page and results in almost no HTML in the .tpl files. Then build out a plugin system that lets users hook the (1) start of each function, (2) modify content prior to output, (3) modify .tpl each array, and (4) finally hook the end of each function. Then there will be almost no need for ocmods at that point.
Using a real diff-patch allows for things like popular version control software to generate the ocmod. Git and other version control tools do diffs natively. The XML file is still potentially useful for the metadata about the extension but you might as well use JSON for the metadata once you drop the rest of the data into a diff file.
An even better solution is to burninate all the existing .tpl's and generate arrays of information. Those arrays are then used to construct the page and results in almost no HTML in the .tpl files. Then build out a plugin system that lets users hook the (1) start of each function, (2) modify content prior to output, (3) modify .tpl each array, and (4) finally hook the end of each function. Then there will be almost no need for ocmods at that point.