CMB Utilities

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

CMB Utilities

Post by cmb » Thu Jan 10, 2013 8:22 pm

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
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: CMB Utilities

Post by Holger » Fri Jan 11, 2013 11:59 pm

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

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: CMB Utilities

Post by cmb » Sat Jan 12, 2013 12:33 am

Hi Holger,
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.
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.

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.
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?
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.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply