Archive for October, 2006

Wordpress Microsummaries Plugin Updated

Now Firefox 2.0 is officially released, the Microsummaries concept my gain substantial traction. Time for me to review a few shortcomings of the wp-microsummary plugin.

Most improvements and changes are cosmetic – there is no need to upgrade if the plugin works for you.

See also my initial post about this plugin.

Popularity: 20%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Comments off

PHP, Reflection and JSON: stream your objects

Amongst all the improvements in PHP 5 is the concept of Reflection. If you’re a Java person, you will be familiar with this concept.

In just a few words, Reflection means that Objects are open to (self-) inspection, so that you can interrogate an object for all kinds of properties at runtime.

Now if you have classes with getter (and setter) methods, there are some very elegant techniques with reflection. Normally, these getters and setters are used to give access to the data contained in the object. Good Object Oriented practice makes use of these Data Objects to build a clean boundary between the data and implementation details.

So, let’s assume that you have painfully crafted a class definition with accessors and you want to serialize the contained data as JSON over the wire. Of course, you can write a getJsonString() method for every class. But Reflection gives you a much nicer option.

An example of serialization into JSON, entirely based on Reflection:
Read the rest of this entry »

Popularity: 43%

Post to Twitter Tweet This Post to Delicious Delicious Post to Reddit Reddit This Post Post to StumbleUpon Stumble This Post

Tags: , , ,
Comments off

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.