wlp with ajax_webinar
TRANSCRIPT
-
7/31/2019 WLP With Ajax_webinar
1/14
Desktop AJAXChris Jolley, Robert Bergman1/12/2007
-
7/31/2019 WLP With Ajax_webinar
2/14
Ajax
Asynchronous Javascript And XML
Acronym coined by Jesse James Garret, Adaptive Path
Widespread use triggered by Googles online applications: gmail, maps..
Widespread use also triggered by more powerful browsers and client
computers
Zero-footprint rich user interface, still a web page
-
7/31/2019 WLP With Ajax_webinar
3/14
-
7/31/2019 WLP With Ajax_webinar
4/14
Enabling These Features
AsyncContent on portlet
Attribute on
Crack open the .portlet file or IDE
AsyncMode on the Desktop
Attribute on the
Crack open .portal file of IDE
Enable via the admin tools
-
7/31/2019 WLP With Ajax_webinar
5/14
Enable from the Admin tools
-
7/31/2019 WLP With Ajax_webinar
6/14
What are the benefits
The idea is to only send back the content that has changed.
Reduce/eliminate page reloads
Increase speed/responsiveness
Enhance usability
Make applications more interactive
No modifications to existing applications
Working with standards
-
7/31/2019 WLP With Ajax_webinar
7/14
PortalServletHttp
text/html
Browser
FirstRequest
DOM
ajax.js PortalServletXHR
JSON
subsequen
t
Desktop asyncMode=enabled
-
7/31/2019 WLP With Ajax_webinar
8/14
DOM
async.js PortalServletXHR/iframe
html
http
PortalServlet
DOM
async.js PortalServletXHR/iframe
html
html
Browser
N+
1
Portlet asyncContent=[ajax|iframe]
-
7/31/2019 WLP With Ajax_webinar
9/14
When to use which
Both give quicker response times
Portlet AsyncConent
Enable for just that portlet (maybe portal does not work with entire
desktop enabled)
Long Running Portlets dont want to hold up entire pageN + 1 requests
Desktop AsyncMode
Inter portlet communication
Need context information (eg. PageBackingContext)Newer Web sites
1 request
-
7/31/2019 WLP With Ajax_webinar
10/14
First request, links wrapped in tag, Browser Refresh, Redirects,
Page change links
Http Request
text/html
Subsequent requests
XHR Request
application/json
ajax.js
-
7/31/2019 WLP With Ajax_webinar
11/14
What works/doesnt
WSRP
Threading
Cache
IPC
All Portlet Types
Nested Books
Redirects
Look and Feel Changes
Tree Optimization
Customizations
Themes
Portlet States/Modes
XHTML
While the goal is to just enable this feature and haveeverything work as before, only quicker. Reality
Do Work
-
7/31/2019 WLP With Ajax_webinar
12/14
Limitations and
May never Work
Portlets that expect to be refreshed without any interaction
Developer can call new methodPortletBackingContext.setRenderOnAjaxRequest(boolean);
Some javascript page events: onload(), onunload(), onbeforeunload()
Next release mimic these events
Delete button with old style look and feels
Disable
Adds request param _portlet.async=false
DesktopBackingContext.setAsyncMode(String mode);
-
7/31/2019 WLP With Ajax_webinar
13/14
Working With Other AJAX frameworks
Challenges
Some frameworks tend to want to own the entire page does not workwell with portals or mashups.
Multiple instances of a portlet on the same page
Namespacing issue
Javascript versioning issues
Synchronization of client and server.
Working through standards
JSR286, JSR301, WSRP, and the OpenAjax Alliance -- to resolve these
specific issues and to enable integrating other AJAX frameworks with
WebLogic Portal.
Recommendation
near-term, we suggest using a framework like Dojo, as this has been
used by many developers to create portlet content using AJAX.
Use WLPs additional AJAX features like drag and drop tags
-
7/31/2019 WLP With Ajax_webinar
14/14
Demo