Comparing the new and the old client-side programming model
Compare the current client-side programming model to the client-side programming model from previous versions.WebSphere Portal introduced a client-side programming model. It allowed you to use AJAX techniques in the portlets. We can use it for working with portlet preferences, user profiles, and the portlet state including the portlet mode, the window state, etc. Advantages of using the client-side programming model include an improved user experience by faster response times and performance. Portlets render faster, as the portal does not re-render the whole page, but only the aspects of the portlet that changed by the user request.
WebSphere Portal v7 introduces a new client-side programming modes that allows us to use static and dynamic content and portlets and widgets on the same page and on pages with the same theme. It deprecates the programming model from the previous versions. Although the old model still works, developers are encouraged to write new code to comply with the new APIs. The following sections compare the old API with this new API and explain how we can do things with the new AP that you did with the old API.
- Work with the PortletWindow object
The PortletWindow object represents portlets on portal pages and sends events to portlets; for example, when users minimize or close the window. Portlets can send also send requests to the window to determine the current state of the window.- Work with the PortletPreferences object
The PortletPreferences object stores, sets, and retrieves portlet settings.- Work with the PortletState object
The PortletState object determines the state of the portlet.- Work with the UserProfile object
The UserProfile object is used to set and retrieve user profile data.