From my background as a Flash Developer I’m used to a more strict way of Object Oriented programming. Also I’m used to be able to do object movements within the object itself.
Since the visual part of a website is typically something for the client-side, we mostly use JavaScript to handle the movement. To merge this into one object, we will have to make some kind of conversion from PHP to JavaScript. But this shouldn’t be just it. Data needs to be written to the server too.
Getting data from a server and sending it towards a server isn’t something new. XML is a well-known way to get data from one place to another, and AJAX is used a lot nowadays.
A few weeks ago I stumbled upon JSON. JSON isn’t new either, but because it is the JavaScript Object Notation it can easily become an object in JavaScript (by using the eval() function).
The JSON-schema doesn’t allow functions, but in my opinion a true (for programming purposes) object needs to be able to contain functions. Thomas Frank already wrote something about this almost four years ago called Classy JSON and two months later he posted a better version of his code (Classier JSON).
In the coming days I will study Thomas Frank’s way of ‘converting’ and make an image of the layers that will be covered.