jQuery is one of the most pervasive scripting libraries in use today. The session “Developing Portlets Using Javascript and JQuery for Engaging Digital Experiences” by Stephan Hesmer, Web 2.0 Architect, IBM and Jaspreet Singh, Rational Tools Architect, IBM provided good insight as to how to leverage jQuery in IBM WebSphere Portal.
First, a couple of key statistics to indicate why this is important and cannot be ignored:
- 57.5% of websites use jQuery.
- jQuery has a 93% marketshare.
WebSphere Portal still includes Dojo but it isn’t required for view mode. It is required in edit mode however, especially for in place editing. One key change in portal 8.5 however is when edit mode, the edit panel is now isolated from pages so it will not conflict with the page.
The session was primarily demonstration based but some key items discussed included:
- jQuery is simple to include in a portal theme.
- Define the jQuery plugin as a module.
- Simply create a new folder with the plugin name.
- Update the prereqs.properties file.
- jQuery mobile is easy to use but it will take over the entire page.
- The OOB scripting portlet makes writing scripts simple. There is no need to code and deploy portlets if you are creating a pure script portlet.
jQuery tooling is available in Rational Application Developer
Many tools are available to help the jQuery developer be more efficient.
- Auto-generated code to get started with jQuery.
- Content assist in portlet JSPs.
- Drag and drop of jQuery widgets.
- Visualization of jQuery mobile widgets in the Rich Page Editor.
- jQuery mobile page generation using the Mobile Navigation View.
- Properties view to help configure jQuery widgets.
IBM Script Portlet
The script portlet has a couple of key goals:
- Enable line of business to have autonomy and not be dependent on central IT.
- Be able to write portlets without knowing Java.
Some of the key capabilities are:
- All code (HTML/JS/CSS) is stored in WCM.
- The script editor supports syntax highlighting and auto-indent.
- Script based applications can be zipped up and imported or exported.
- Data access is done with Ajax/REST services using JSON.
- Portlet capabilities (preferences, render parameters etc) can be accessed.
IBM has put an incredible amount of innovation and flexibility in its support for scripting in recent portal releases and updates. This really opens up the flexibility of the platform and widens the available developer base.