David et. al.: I've attached an admittedly crude drawing of how I think DWR works. Or rather, how I think it works in my setting. So, from this drawing (and I apologize for the quality, but I didn't have time to learn this new drawing tool...) you can maybe see where the XMLHttpRequest Object calls do not go through the Control Servlet. The Control Servlet is only invoked upon initial HTTP/S request for an OFBiz URI (web page). After that, all communications, while still using HTTP/S with standard HTTP/S header methods (like GET/POST/PUT), can't go through the Control Servlet because I don't know how to tell the Controller to examine the payload and then using the payload information, mediate for XMLHttpRequest Object destinations. Or, similarly, how to return response objects to the calling page. Anyhow, I don't know if this advances the discussion any or leaves us where we were before. Concerning the DWR comparison with OpenRico: First to the suggestion of a SOAP like request handler: While this technique would make implementing the XMLHttpRequest Object calls more tidy, I don't think it really buys me much over what I'm doing now. Here's the rub - because I'm not using any controller filter, I don't have the benefit of the authentication, authorization and access controls afforded by the OFBiz Servlet Controller. Instead, if I need those controls, I will have to code that stuff in my POJO or Servlet. I almost feel like my OFBiz component is about to run a muck, because there are large parts of the business logic that execute without benefit of any Servlet Controller's access filtering. (I hope this feeling is just a reflection of how ignorant I am of the runtime environment and not a true assesment of my exposure while using AJAX techniques.) Secondly, specifically concerning the LiveGrid scenario: the OpenRico LiveGrid code has very compelling application in many client side situations. LiveGrid, however, is targeted specifically at helping manage the orderly transfer of large data sets (that is table data) asynchronously from a page load or page refresh. So, for example, if you have a table on the server that has 10,000 rows of data and you only want to display 50 lines in the browser at one time, with the added capability of allowing the user to scroll past the 50 lines without refreshing the page, then LiveGrid is the solution for you. LiveGrid grid uses the XMLHttpRequest Object Call just like DWR, however it wraps the response data specifically to handle the LiveGrid scenario. (It keeps track of where you are in the data set, for example.) This, I think, would be a perfect candidate to implement as an OFBiz service since it has specific parameters that are passed on each data transfer. Maybe one way to compare OpenRico's LiveGrid with DWR is to say that LiveGrid is like an application whereas DWR provides the building blocks to create applications. One could use DWR functionality to build one's own LiveGrid application. Does that make sense? Just my 2 cents. Anyone have any suggestions for doing something with this? I'd be willing to do some of the work if only I knew what to do :-\ Ruth David E. Jones wrote: > > One way or another the AJAX requests coming in from the browser need > to be processed and logic run and the results returned. How we do > that is still up in the air. I guess DWR uses a servlet by default, > but we would need to wrap it some way so that the services to be used > can be configured just like in the Control Servlet, in fact it should > go trough the Control Servlet. > > -David > > > On Feb 8, 2006, at 10:34 AM, Andrew Sykes wrote: > >> Ruth, >> >> Can you explain in a little more detail why you think the DWR route is >> better than simply creating a handler that can route requests to a >> specific service as I suggested previously. >> >> Sorry if this seems like a silly question, I'm just trying to get my >> head around the advantage that DWR provides... >> -- >> Kind Regards >> Andrew Sykes <[hidden email]> >> Sykes Development Ltd >> http://www.sykesdevelopment.com >> >> >> _______________________________________________ >> Dev mailing list >> [hidden email] >> http://lists.ofbiz.org/mailman/listinfo/dev > > >------------------------------------------------------------------------ > > >_______________________________________________ >Dev mailing list >[hidden email] >http://lists.ofbiz.org/mailman/listinfo/dev > AJAXofbiz.jpg.zip (56K) Download Attachment |
Free forum by Nabble | Edit this page |