View Post
Development

Announcer

When registering event listeners it seems that there are many different and duplicate implementations of iterating over the listeners and broadcasting your event. This broadcaster takes the strain out of many uses of this pattern, by reflectively calling the notification method(s) on all registered listeners.

View Post
Development

Microtypes

Passing Strings and doubles around in an application can significantly increase the likelihood of inadvertantly passing incorrect parameters to methods. By strongly typing all string and number parameter types, this can be simply avoided. Its then also possible to add behaviour to these types, meaning that “utility” classes are removed, keeping behaviour close to the objects that need it.

View Post
Development

Convert XML to JSON

There are many ways that you could convert XML to JSON, but it isn’t easily a reversible transformation - XML, with namespaces, elements, and attributes models a more nuanced system than JSON, but many things don’t need all that complexity.

This may or may not suit your requirements. It loses lots of information, but maybe good enough for you.