Hello Developers,
I've just released the CMB utilities 0.1.
The CMB utilities library is a set of tools to ease the development of CMSimple_XH plugins.
Currently only a JSON encoder and decoder is available.
Any feedback is welcome!
Christoph
CMB Utilities
CMB Utilities
Christoph M. Becker – Plugins for CMSimple_XH
Re: CMB Utilities
Cool!
We had some discussions about that the last months and I really appreciate such a utility.
But how should I / we handle it?
IMO it's not a solution to deliver it with every plugin which use it because of issues with different versions.
I have a lot of ideas for useful functionality for this utility. Not only core-related. As an example I've often used a simple function to delete a complete directory-tree recursive on the server. Maybe such things are useful for others too?
OTOH: maybe it's better to stick only on core related things to keep the code small and maintainable.
Holger
We had some discussions about that the last months and I really appreciate such a utility.
But how should I / we handle it?
IMO it's not a solution to deliver it with every plugin which use it because of issues with different versions.
I have a lot of ideas for useful functionality for this utility. Not only core-related. As an example I've often used a simple function to delete a complete directory-tree recursive on the server. Maybe such things are useful for others too?
OTOH: maybe it's better to stick only on core related things to keep the code small and maintainable.
Holger
Re: CMB Utilities
Hi Holger,
I'm still not sure how to handle this best. Any suggestions are welcome! But as I was actually asked about the JSON library, I decided to release it. For now it might be best to just copy JSON.php into the plugin and to include it with the routine I described in the docs.
At least I'm hoping to reduce possible bugs to the minimum by adding unit tests, even if I'm quite unexperienced with this mighty tool. So I'll appreciate any additional test cases and general suggestions on how to improve the tests.
Christoph
That's the biggest problem I'm facing, and one of the most prominent reasons why I have delayed this utitlity so far. Of course it's easy to introce a version constant, which could be checked by version_compare()---but this would probably require the user to upgrade to a new utitlity version each time he installs/upgrades to a new (version of a) plugin. And even worse: if a regression bug or incompatible change will be introduced to the utilities plugin, another plugin might simply fail.Holger wrote:But how should I / we handle it?
IMO it's not a solution to deliver it with every plugin which use it because of issues with different versions.
I'm still not sure how to handle this best. Any suggestions are welcome! But as I was actually asked about the JSON library, I decided to release it. For now it might be best to just copy JSON.php into the plugin and to include it with the routine I described in the docs.
At least I'm hoping to reduce possible bugs to the minimum by adding unit tests, even if I'm quite unexperienced with this mighty tool. So I'll appreciate any additional test cases and general suggestions on how to improve the tests.
The CMB utilities are not meant to be restricted to add core functionality. I envision them as a set of tools for any extension developer (mainly plugin writers, though). So if you like to contribute some stuff, you're more than welcome! About the name: this can be changed. My intention simply was to choose something unique, that hopefully won't clash with some plugin name.Holger wrote:I have a lot of ideas for useful functionality for this utility. Not only core-related. As an example I've often used a simple function to delete a complete directory-tree recursive on the server. Maybe such things are useful for others too?
Christoph
Christoph M. Becker – Plugins for CMSimple_XH