Updates from October, 2006 Toggle Comment Threads | Keyboard Shortcuts

  • Joe 21:26 on October 25, 2006 Permalink  

    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: 15%

     
  • Joe 23:18 on October 17, 2006 Permalink
    Tags: , Java, JSON stream,   

    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:
    (More …)

    Popularity: 35%

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel

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