I don't agree with Cassie on some of the issues here and I want to clarify some things because I sense some Abdera bashing. This email seems to imply something is wrong with the Abdera framework as opposed to the implementation attempt that was made. When I initially suggested Abdera for the Rest server framework, I was aware that it did not naively deal with JSON output in the most expedient manner and thought it should have a dedicated 'code pipeline' just for JSON. However, this is not a short coming of the framework.
I think the hand coding of the request handling in the manner Cassie would like can be done within Abdera. Why not make 3 JSON adapters and 3 Atom adapters where there are now 3 hybrid adapters and continue to use the rest of the HTTP server? The JSON adapters only have to implement the CollectionAdapter interface and can totally avoid all the XML pushups in the other adapters. Vasu and I had taken a path where we implemented the Atom handling first (in the standard, rather verbose manner of Abdera) and just converted it to JSON when it was serialized. This is obviously not the best way to do it. The processing that is necessary for Atom (which can include complex 'hoisting rules') is not necessary for JSON. I never intended it to stay this way. It's natural that the process of parsing the body of the request on a write operation and rendering the body of the response for read op should *not* use the same code across Atom and JSON. Here Cassie and I agree. However, there are many parts of the server that have nothing to do with this task and they should not be duplicated. And I think ignoring Abdera for JSON is throwing out the baby with the bathwater. I also feel it's important to point at that the effort to implement Atom-based Rest server is much higher and the task seems to be lower priority. Does this mean that the implementation should be completely separated from the JSON processing? Is it really necessary or possible to split up the server's code so that developers do not need to know the codebase of the other? I don't think so. This is where I disagree with Cassie. Some may wish to work on both JSON and Atom processing so we should make efforts to make the codebase as common as possible. davep On Tue, Jun 10, 2008 at 2:44 PM, Cassie <[EMAIL PROTECTED]> wrote: > We tried to use abdera to implement the opensocial json restful format > within Shindig.. and it didn't work out very well. The code is clunky, > overly complicated for simple json and is hard to come up to speed on. > > So... I am going to try an alternate implementation based on the existing > older json wire format code. I was going to start coding something in a > separate dir so that none of the current code is disturbed. Hopefully, in > the next couple days we will have a cleaner impl of the restful json that is > 90% the same as all of the current social code. (this means less migration > for current social code users too, yea!) > > And as for atom... well, we can figure that out later :) > > Please let me know if you have any huge objections to this. > And of course, if it turns out to be worse than the abdera impl.. we can > always go back. > > - Cassie >