While there are many custom algorithms and manipulations, which can be need (at least, we are talking about the logic which makes your page unique), there are still many common, repetitive but necessary tasks which are performed as part of everyday development activity.
For example, data copying, populating, validating, merging objects data and so on. They are not fun, but they are really should be performed to bring your application to life.
Sure thing, each operation and each piece of code that does something with object instance can be considered as something unique and exceptional one. The only drawback of this – lots of quite boring, stupid and error-prone code occurs.
It seems that answer is quite simple – we should have some uniform way to access elements of objects tree, to traverse and lookup individual components of the object graph, and to be able to perform operations over particular object instance. Oh, and of course, we don’t want to write that code – we agree just to write code which is salt of our application, not other mess, right?
Let’s return to XML. We can utilize one of two common technologies if we want to parse or transform XML element – either SAX (simple API to XML) or DOM (document object model) based approach.
In both cases, XML parser makes for us all dirty work of parsing initial XML (reading incoming streams, manipulating characters, insuring proper string encoding) and so on. DOM parser provides us in-memory presentation of original XML as set of objects with well defined interface, while SAX let us obtain information about XML viaset of events (like element start, element stop etc) generated by SAX parser via appropriate callbacks we provide to it.
Since JSONER performs all behind-the-scene operations necessary to traverse elements of objects graph, developer is free from it and needs to write code that performs only particular specific functions. That code is placed to appropriate callback function which will be invoked by JSONER.
Basically, the JSONER event-based API allows having a standard approach for solving different tasks, such as (just to name a few):
Comparison graphs of object;
Cloning /merging graphs of objects;
Lookup and searching for data in arbitrary graph of objects;
Modification of exiting object;
Building elements of UI based on JSON object;
In general, having unified algorithm of working with objects allows simplifying code and separate business logic required to implement specific tasks and, as result, to increase overall code flexibility.
However, it’s not necessary to write custom code for such tasks as, for example, data lookup, binding, comparing and many other – JSONER already includes ready-to-use implementation of various widely used algorithms.
Yes, that’s true. But if JSONER library handles cross-links correctly – should we really think about this too much?
Well, definitely, such a way to work with objects is different. But it is up to you to give it a chance,to cast a glance at it (come and see live JSONER there) and decide whether it helps you to be more productive, have more fun and more free time!
Oh, and finally, JSONER is free and opensource - so it's naturally that you can find that project on SourceForge!