Comments on: Apache My Faces Trinidad: dynamically refreshing Non Trinidad components in a Partial Page Refresh ("AJAX") https://technology.amis.nl/2007/06/17/apache-my-faces-trinidad-dynamically-refreshing-non-trinidad-components-in-a-partial-page-refresh-ajax/ Friends of Oracle and Java Wed, 08 Jul 2015 07:37:03 +0000 hourly 1 http://wordpress.org/?v=4.2.3 By: Adam Winer https://technology.amis.nl/2007/06/17/apache-my-faces-trinidad-dynamically-refreshing-non-trinidad-components-in-a-partial-page-refresh-ajax/#comment-4682 Sun, 12 Aug 2007 22:27:27 +0000 http://technology.amis.nl/blog/?p=2077#comment-4682 I’m seeing this a couple months after it was published, but the primary benefits of switching to XMLHttpRequest from iframes are:

1. Better error handling (IFrames do a very poor job of letting you know when a request fails)
2. Far better (and simpler) handling of Javascript embedded in PPR requests
3. Finally, a public API for submitting PPR requests
4. A statusIndicator component for showing busy state
5. Much better opportunities for JS plug points (the statusIndicator uses one of these)
6. Simpler (and therefore more robust) code overall
7. Proper queueing of requests (instead of a fairly ad-hoc solution before)

It probably is a bit lighterweight, but that wasn’t the main goal, and I haven’t attempted to measure this. In fact, we do actually still use iframes when PPR needs to include a file upload (XMLHttp does not support file upload payloads), but it switches transparently.

All this is available in Trinidad 1.0.2, which will be released shortly, but has been available as nightly bulds for awhile.

I’ve also finally gotten off my rear and written documentation for Trinidad PPR: see http://myfaces.apache.org/trinidad/devguide/ppr.html

]]>
By: Lucas Jellema https://technology.amis.nl/2007/06/17/apache-my-faces-trinidad-dynamically-refreshing-non-trinidad-components-in-a-partial-page-refresh-ajax/#comment-4681 Mon, 18 Jun 2007 13:38:24 +0000 http://technology.amis.nl/blog/?p=2077#comment-4681 Seb, You are right and an XmlHttpRequest Object based implementation can hopefully be made leaner and little bit more intelligent as to what to render to the browser in a PPR request – not the whole page but just the updated component (‘s attribute values) ideally. Lucas

]]>
By: sebnoumea https://technology.amis.nl/2007/06/17/apache-my-faces-trinidad-dynamically-refreshing-non-trinidad-components-in-a-partial-page-refresh-ajax/#comment-4680 Mon, 18 Jun 2007 12:18:29 +0000 http://technology.amis.nl/blog/?p=2077#comment-4680 Hi,

Indeed, interesting things to know about PPR becoming XmlHttpRequest…

Ric, is there any plan for integrating XmlHttpRequest in ADF Faces before the release of the rich components that come with JDeveloper 11g ?

Lucas, one thing I think is really different is the fact that AJAX with XmlHttpRequest can be true asynchronous. It seems that the current implementation of PPR in ADF Faces leads to some weird behaviors … Am I wrong ?
Apart this detail, I agree with you, I am happy the way PPR works right now.

Seb.

]]>
By: Lucas Jellema https://technology.amis.nl/2007/06/17/apache-my-faces-trinidad-dynamically-refreshing-non-trinidad-components-in-a-partial-page-refresh-ajax/#comment-4679 Sun, 17 Jun 2007 19:17:13 +0000 http://technology.amis.nl/blog/?p=2077#comment-4679 Ric,

Thanks for your reaction. Interesting to see that development., When will it be available in the regular Trinidad builds?

One remark though: why do you only consider frameworks using the XmlHtppRequest Object to be “true AJAX’? As far as I am concerned what matters most is the effect we achieve: interactive, responsive, appealing, productive applications. And Asynchronous communication between client and server is an important means to that end. And the XmlHtppRequest object is just one way to achieve that asynchronous background communication, just as the IFRAME is a mechanism. I have never considered PPR in either ADF Faces (or UIX) or Trinidad to be inferior to other AJAX solutions because of the fact that it does not use the XmlHttpRequest object.

If this new implementation is more light weight (faster, less network or server load) or easier to use (don’t think that will be the case though) I am happy. If it is the same with a different underlying implementation, I am not so much thrilled. I have never really understood the “true or proper AJAX” discussion.
Lucas

]]>
By: Ric Smith https://technology.amis.nl/2007/06/17/apache-my-faces-trinidad-dynamically-refreshing-non-trinidad-components-in-a-partial-page-refresh-ajax/#comment-4678 Sun, 17 Jun 2007 17:47:48 +0000 http://technology.amis.nl/blog/?p=2077#comment-4678 Lucas,

The architecture you describe is no longer invalid with the next release of Trinidad. Adam Winer just put the final changes intro Trinidad that removes the iFrame dependency from all components except for file upload. Trinidad now relies on the XmlHttpRequest object. Thus, Trinidad is now a true Ajax framework.

Regards,
Ric Smith
Principal Product Manager
Oracle JDeveloper & ADF

]]>