- The Benefits of Inter-Portlet Communication
- The WebSphere Property Broker
- Creating a Service Provider
- Testing the Service Provider
- Creating a List Portlet
- Creating a Detail Portlet
- Configuring the WebSphere Property Broker
- Alternative Communication Methods
- When to Use Inter-Portlet Communication
- Summary
- Important Points
When to Use Inter-Portlet Communication
When developing portlets, in WPF or otherwise, spreading an application's functionality across several inter-communicating portlets can help to provide a more customizable interface and ultimately produce more extensible applications. However, some scenarios are more conducive to inter-portlet communication than others. For example, you might not want to separate the list and detail portions of a data access function if they are going to be used on a page that already contains a list and detail portlet, because multiple list and detail portlets on the same page can clutter and complicate the interface. Similarly, if a list portlet depends on another portlet on the page for its information, you might want to include the list as a second page in that portlet, rather than as a separate portlet. The decision as to whether to combine functions into a single portlet is also influenced by how many other portlets you expect will be used on the same page and how much space they will take up. If you expect screen real estate to be scarce, perhaps you need to cater to 800x600 resolutions, and if you expect multiple portlets to be used at once, it might be best to economize and combine several functions into a single portlet wherever possible, rather than implement the same functions using inter-portlet communication.
Having said this, inter-portlet communication is a powerful tool for portlet developers to improve the usability of their applications and should be used wherever possible. As a general rule, potentially reusable, high-level functions, such as the list and detail components of a data portlet, are the best candidates for inter-communicating portlets, because they can be easily incorporated into other applications. The information sent between each portlet is fairly simple—usually just a uniquely identifying key for a particular record or document—which reduces the information sent between the server and the client, and therefore also speeds up your application. It is also the sort of information that could be meaningful to other functions or processes. Clicking on an item in a list portlet, for example, could trigger other portlets on the page to open charts, reports, or edit forms for that item.