Two data plugins done
I have just finished rewriting two old data plugins – User and Rating – into a much nicer implementation
The new plugin classes are fully tested and will be included in the next alpha release.
During development, however, I came to the decision that all functions that returns an error code/array when an operation fails should throw an exception instead (except the validate function, which returns any errors). The Wigbi AJAX handler should then always return a [result, error] result, which the Wigbi.ajax callback method will always receive as a parameter.
This makes it possible to implement a really clean solution, where server exceptions and AJAX errors are exposed in the same way. I will rewrite my code so that it behaves in this way, which will be the big difference between the alpha 1 and 2 releases.
