jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: Ajax updates via JSON

From: Kito Mann <kito.mann_at_virtua.com>
Date: Wed, 28 Nov 2012 17:56:29 -0500

On Wed, Nov 28, 2012 at 5:42 PM, Neil Griffin <neil.griffin_at_portletfaces.org
> wrote:

> Hi Kito,
>
> This sounds interesting -- just curious, are you experiencing the same
> performance troubles equally with Mojarra and MyFaces?
>
> Neil
>
>
The implementation doesn't matter -- this is a spec issue. For example,
let's say you're rendering an input control in response to an Ajax request.
Only the value property has changed. Right now, JSF will re-render the
entire component, including all of its markup, and then replace that
element in the browser's DOM. Instead, we could send JSON with the single
property, and the component could update itself based on that property. (Or
JSF could handle components in a standard way but allow components to
override that behavior or opt-out altogether.) For more complex components
(and this includes CSS-based input widgets that replace the standard JSF
input controls), the result is decreased bandwidth consumption and more
responsive UI changes.



> On Nov 28, 2012, at 5:40 PM, Kito Mann <kito.mann_at_virtua.com> wrote:
>
> Hey guys,
>
> It looks like I sent this to the wrong place. Thanks for the heads up,
> Andy!
>
>
> On Tue, Nov 13, 2012 at 7:38 PM, Kito Mann <kito.mann_at_virtua.com> wrote:
>
>> Hello volunteers,
>>
>> One of the primary complaints about JSF is speed. We have paid a lot
>> of attention to optimizing server-side state over the past few years,
>> but we can also optimize the processing on the client. When a
>> component is updated via Ajax, currently we render the entire
>> component, even if only one property has changed. It would be much
>> more efficient if we sent only the changed properties via JSON and let
>> the client-side representation of the component update itself
>> accordingly. I have implemented a limited version of this for one of
>> my clients, and Ajax updates are noticeably faster. Updating the spec
>> to support this would not be a major change (because components would
>> opt-in to this feature), but it would have a dramatic affect on
>> client-side Ajax updates.
>>
>> I have been meaning to write a formal proposal for a while, but I
>> figured I should at least share my thinking first.
>>
>> Thoughts?
>>
>> Sent from my iPhone
>>
>> http://www.jsfcentral.com
>> http://www.Virtua.com <http://www.virtua.com/>
>>
>
>
>
>
>