Recently I have dived back in to the RPC feature and I have managed to improve this quite a lot.
- No more isVoid/isAsync
These are no longer needed as all of this is automatically handled by the RpcBehavior. - Optional callbacks when calling methods, success, success+error, or none if the remote method does not return data or you just don’t care about it
- A shorthand notation for defining local methods, nameOfMethod: function(… instead of nameOfMethod: { method: function(…
- Smaller code base due to a simpler(!) RpcBehavior
This all means that the RPC class is much easier to use now, while still being backwards compatible.
There has also been some ‘improvements’ to the library overall
- Reduced the public API
This makes it more manageable for most - Proper documentation with code examples for Socket and Rpc
- Restructured internal methods so that they are faster and more easy to minify
Check out the new documentation for the Rpc class!
And as always, feedback is much appreciated!