Client Side Programming Model Support
Previous versions of WebSphere® Portal required that a request be sent to the server for each portlet operation. For example, if you changed a portlet window state to minimize or maximize, a submit request was sent to the server and then sent back. This would also cause an unwanted page refresh. These types of server side operations typically require multiple trips to the server.
To reduce this type of sever traffic, WebSphere Portal V6.1 now supports a client side programming model in which portlet state changes can be performed more efficiently on the client side.
You can use the client side programming model for writing your portlets. You can do everything with the client side programming model that you can do with the server side portlet programming model. Additionally, the client side programming model has the following advantages:
Client-side support is enabled automatically when you create a new portlet project.
- The client side portlet programming model works in both client side aggregation (CSA) and server side aggregation (SSA).
- Improved end user experience by faster response and performance.
- Portlets that use the clients side programming model render faster, as the portal does not re-render the whole page, but only the aspects of the portlet that change.
- The client side programming model allows you to handle changes of the portlet mode and window state, preferences, and user customization of user profile locally.
- This provides a faster response time for the user.
- A fragment that contains the customization is later sent to the server and saved.
- Writing portlets to the client side programming model does not require deep Java knowledge.
- You can write such portlets as HTML code with CSS style sheets and JavaScript.
- They have few or no JSPs. Example scenarios for writing client side portlets are:
- A user can add some markup to the portlet view by selecting options in a form.
- Preference changes that a user makes to the portlet are applied immediately in the browser view without reloading the whole portlet.
- The preference change is later sent to the server and saved.
- Access to the user profile on the client side.
- Portlet mode changes are performed entirely on the client.
- Performance improves as no server-client round trips are required.
- The portlet can retrieve markup fragments from the server.
Related tasks
Enabling client-side support for a portlet project