You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Bob Morley <rm...@emforium.com> on 2009/08/05 01:54:11 UTC

Moving Json behaviour from event handler to response

Wanted to start a discussion on this.  I have created a JIRA ticket
(OFBIZ-2778) with a proof of concept patch attached.  The premise is that we
remove the JSON specific event handlers (JSONJavaEventHandler,
JSONServiceEventHandler, JSONServiceMultiEventHandler, and
JSONSimpleEventHandler) and alter the controller request to use a response
type of "json" instead.

This seems to make more logic sense to me; it allows us to use any event
type and simply serialize to a JSON string.  It also allows request chaining
(if that makes sense anywhere) and reduces the code base.  I also serialize
the RESPONSE_CODE for any client-side logic.

If we think this is a reasonable approach going forward, I can remap all of
the existing controller requests to this new response, depreciate (remove?)
the JSON event handlers, and smoke test.
-- 
View this message in context: http://www.nabble.com/Moving-Json-behaviour-from-event-handler-to-response-tp24818304p24818304.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.