Inter Portlet Communication: One size does not fit all

Inter Portlet Communication (IPC) is a hot topic nowadays. This was probably the most missed feature of the first version of the portlet spec (JSR-168), but has made it to the second version (JSR-286, supported since Liferay 5.0). Maybe this is the reason why more and more people are becoming interestind in IPC, and even in portlets in General.

As I've mentioned in previous posts, JSR-286 provides two very good methods for communicating portlets: shared render parameters and events. But this post is not about them, it's about the fact that while having standards is very good, it should not inhibit us from using other solutions when they fit. In particular, I think IPC is a very broad topic. There are lots of different scenarios and communication needs for a single solution to be the best for all IPC problems.

If the solutions provided by JSR-286 fit your needs, by all means use them. But it's also good to know other alternatives. In particular I'd like to highlight today a method provided by Liferay to communication portlets using a super-lightweigth JavaScript events system that runs completely in the browser. This method has been available for some time, and it's now documented in Client-side Inter-Portlet Communication. Take a look and let us know how it works for you.

Blogs
This "Client-side Inter-Portlet Communication" seems to be very similar to the Open Ajay approach (http://www.openajax.org/member/wiki/OpenAjax_Hub_1.0_Specification_PublishSubscribe).

Is there a special reason for inventing your own system?
Hi Rainer,

I didn't implement our current system, but I'm pretty sure it's been done this way because the developer either didn't know about the OpenAjax solution or because it wasn't final or stable enough.

In any case we are keeping an eye on all of the standards of OpenAjax so we'll be glad to implement all of those that catch up. There has been some concerns in the past with their implementation of their hub which is probably why they haven't been so successful yet, but I guess they have already fixed that or will soon.
Hi Jorge,

<a href="http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1036340">I just wrote a few lines in the forums</a> about why it might be a good idea to have a separate Liferay solution. If I have understood the motivation behind your decision correctly, I consider the two solutions complementary.
The link doesnt seems to work properly. Can you please edit the page for
(a) Client Side Inter Portlet Communication
(b) Other alternatives

The working link for Client Side Interportlet Communication is http://www.liferay.com/web/guest/community/wiki/-/wiki/1071674/Client-side+Inter-Portlet+Communication
This was really helpful to read. Thanks Jorge! btw, the new Liferay Wiki looks great!