Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Portlet communication

 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am new to portal development and maybe I am asking some very basic questions. But I would really appreciate if anyone could guide me through.

When does it become important to go with the wiring approach for portlet communication? From what I have been reading there are 3 other approaches as well that can be followed, which are as below. How do we know which one to go for:

1. The PortletSession APPLICATION_SCOPE is there. So can we not put things in the portlet session and let the other portlets read from there?

2. Also we can put in database from where all the portlets that need those parameters, can obtain them.

3. Using the wps-urlgeneration tag, we can pass parameters from one portlet to another.


So how do we know when we should use wiring and when the above three ways?

Thanks a lot
[ January 27, 2008: Message edited by: Dorothy Taylor ]
 
Mahendra Phatangare
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use portlet wiring when you want two portlets to communicate on certain events like click or timeout. portlets can share information using PortletSession's APPLICATION_SCOPE but target portlet will not get when source portlet has set something in session.so some event is required to trigger communication. for exa. you enter search string in one portlet and get results in another portlet.
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So suppose that I have this scenario only like I enter a search criteria in one portlet and want to update the result is another portlet. Is wiring the only way this can be done or there is any other way as well like wps:urlgeneration etc.
 
Umesh Wale
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cant we try to add a Interceptor in between two portlets where in we are creating a HTTPServletRequest and put the Portlet parameter (the one which we are passing through the url generation). So as we can always retrieve the data from other portlet through the HTTPServlet Request.

but yeah always wiring will be the recommended way for the Portlet to Portle Communication.

POrtlet database can be accessible to you throught the different ways, but it can be updated in edit mode only throgh the Administrator privelages.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Dorothy",
Please check your private messages.
 
Abhishek Kanchan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dorothy,

I need to know with what decision you really ended with.
Is Wiring the better way to go.
Please reply. :roll:
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For me, portlet wiring has always been sorta an "IBM TERM" for mapping together two Portlets that use C2A, or Click-2-Action, an IBM specific implementation of portlet communication.

Red flags go off for me all over the place when people start talking about wiring. Not that it is always bad, but it sometimes indicates that people aren't using the portal properly, or aren't thinking from a portal mindset.

Why do two portlets need to message each other? If they are so heavily linked together, why aren't they part of the same portlet application? If they were, they could share the APPLICATION_SCOPE setting on the session, and your problem is solved.

Furthermore, why aren't the two portlets actually just one portlet? There's nothing wrong with a single, dashboard portlet. In fact, it's often a good idea. I've seen very good dashboard applications, that would be one good portlet, ripped apart into 10 different portlets, and then wired together in the most kloogy of fashions, creating a solution that is neither maintainable or manageable.

If there is shared data, put it in a commonly accessible database table. If two portlets need to respond to each other, package them as a single, common portlet. Don't fall back on wiring with C2A. It's not a long-term solution.

-Cameron McKenzie
 
Dorothy Taylor
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Starting this thread again after a long time, but i hope that's ok

So if I am going for co-operative JSR-168 portlets, is wiring still a not so good way of doing stuff. By wiring, I mean wiring using WSDL in Websphere POrtal server
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally, I avoid it.

It works, and it's cool. But it does have a learning curve, and whether there will be people around in the future to service it, work on it and understand it? That I'm not too sure of.

So, time to develop and ease of maintenance are my concerns. If those aren't big issues, well, C2A is pretty neat, and clients love it - gets them close to that Web 2.0 experience. There's value in that.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic