jump to navigation

The sorry state of Java Portlets February 13, 2009

Posted by spikew in java, stax.
Tags: , , ,

Since 2003, I’ve had this weird fascination with Portlets and Portal Servers and I tend to revisit the space every few months. However, each time I look into coding some portlets, I get sick and depressed about how awful all the solutions for running them still are, and so reluctantly, I put my interest in portlets back on the shelf. I happened to run across this hilarious post about picking a Java portal server today, and it’s true in the worst way.

Ever since the initial portlet specification was published, I’ve been drawn to portal servers b/c the portlet componentization model is so nice and pluggable (at least compared to Servlet Apps) and I always have this dream of being able to quickly build my apps from a rich set of 3rd party components that do interesting things.  The portlet bug bit me again recently, and after looking around at all the solutions again, I actually became excited about using Apache Pluto which is just trying to be a portlet container, not a full-blown portal server.  Unfortunately, after hacking on Pluto a while I still found it to be too baked with portal server concepts for my liking.   I especially hated the idea of deploying portlet jars as war files, so I finally bailed on Pluto.  

In my frustration, I went back and dug up some portal container code I was working on last year and in my spare time am back to rolling my own portlet container so I can just run and invoke Portlets from my servlets as components and get rid of all the crappy portal server plumbing.  I’m now able to just fire up a Java class, tell it to load a portlet archive, and start invoking those portlets from my webapp. Maybe I can keep the portlet flame alive a little longer this time.

I’m also disappointed not to see more happening these days with WSRP which showed promise for letting developers make use of portlets hosted in other containers (including non-Java containers like SharePoint).  It seems like WSRP is available in most of the big portal servers, but there isn’t a generic Java client out there that makes it easy to embed these components into Java web apps.  I guess I’ll have to roll my own WSRP provider/consumer implementation now too. Ugh.

In a perfect world, Stax developers could fire up a new Portlet project, code some portlets, expose them as WSRP webservices, and deploy them on the Stax cloud. Then other apps running on Stax could start using them as components and we’d get an endless feedback loop of awesome portlets and apps feeding off each other.  I hope we get there some day.