Post details: Portlet 2.0 - Early Draft Review

Aug 04, 2006 : Portlet 2.0 - Early Draft Review

The Portlet 2.0 JSR has released an Early Draft Review. Here are my thoughts. Read the document yourself for all the details, and remember this is only an Early Draft.

Resource Serving There's a new interface that a Portlet can implement, which allows it to serve resources. Now you don't have to also set up a servlet to serve resources. But you can delegate to a servlet if you want. Looks like this means in addition to action URLs and render URLs there are now resource URLs.
Portlet Filter Great news! A standard implementation of this is needed for things like a Hibernate "Open Session in View" pattern, or handling File Uploads in JSF. Instead of different implementations in many projects, a standard filter will be very good.
Events Portlets can publish and consume events for interportlet communication and portal communication. There's an interface that your portlet would implement; and GenericPortlet's implementation of this interface has a nice helper method so that you can write one method per event name and simply annotate that method to indicate which event it is supposed to handle. I would like to see the specification list a few standard events (e.g. "javax.portlet.portal.logout"), perhaps in an appendix.
Sharing Sharing session attributes and sharing render parameters are new features, although session attributes may be dropped since events can be used for the same purpose. I haven't found a need for any sharing yet. Nothing that can't be done with typical sharing via real messaging systems or shared data (database).
Portlet Window IDs It sounds like these will let there be better support for a portlet knowning which window(s) it is in.
AJAX Better support for AJAXy stuff will be in the next draft, they say.

Besides a list of some standard events, and the AJAX support, I'd like to see better interaction with the portal, for example:

  • Insert JS/CSS references into the head
  • Link to another portlet, or a certain page in the portal. This may be difficult to spec generically for all portals, but it would be very useful.

Comments, Pingbacks:

Comment from: Dre [Visitor]
Dude, are you posting entries on work time? :-) It's 10:45 am Aug. 4, 2006 Do you have nothing else to do? Wanna play chess? j/k
Permalink 08/04/06 @ 10:46
Comment from: Topher [Visitor] ·
But can it generate rss feeds?
Permalink 08/04/06 @ 10:54
Comment from: serkan [Visitor]
you are damn right in "inserting css/js".
css can be acceptable because one can say all portal supposed to have same style. however some js functions dont work in "body", and the only thing left is to hack portals htmls to add your js :)
Permalink 08/09/06 @ 14:51
Comment from: Victor Volle [Visitor]
I would like to see a "Sharing" mechanism. Imagine I have a "Find Customer" portlet and all portlets should be able to determine if a customer is already selected. With an event mechanism (pull) all portlets would receive the event. In a shared data model only the portlet that needs this information would retrieve the data from the "context" (pull). If I have many portlets on the same page, a push model might be better, so that every portlet gets refreshed. But if I have portlets on different "pages", the not (yet) visible portlets must not necessarily receive the event, especially if there reaction to the event would be "expensive". Sure, I could achieve the same with a backend datastore, but if storing/retrieveing the data becomes expensive, a model where the data can be pulled from memory (leaving clustering aside) is useful.
Permalink 08/10/06 @ 16:29
Comment from: Victor Volle [Visitor]
sorry, the line "with an event mechanism (pull)" should read "with an event mechanism (push)"
Permalink 08/10/06 @ 16:31
Comment from: Dave Brondsema [Member] ·

That's a good example use-case that I hadn't thought of. You should send it to the jsr286 feedback email address, since they are considering not including some sharing support in the final draft.
Permalink 08/11/06 @ 08:42

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.
What is the 2-letter abbreviation for Michigan?
Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email & url)

<  October 2020  >
Mon Tue Wed Thu Fri Sat Sun
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  




Syndicate this blog XML

powered by