
As promised in a
previous entry, the
source for the next release (7.2) of OpenPortal is now being hosted from the
portal.dev.java.net project. Development is actively underway. Specifically, I am working on improvements to the AJAX portal container used in our samples. There is more information on the glassfish wiki on
building and
installing (and
release notes on Build 3). Scheduling for milestone builds is still being determined.

Wanted to post a quick wrap-up of my take-aways from JavaOne 2007. We had a good turnout for the "Dynamic Portals" BOF and had some good discussion. I was able to attend a number of good sessions, here are my favorites. Eventually, the sessions will be
downloadable, so if you missed them or weren't able to attend, you can check them out online.
- TS-9516: Using jMaki in a Visual Development Environment (Craig McClanahan; Gregory Murray; Ludovic Champenois) - This was a good overview of jMaki and how it can be used easily to add ajax widgets to your web apps. I didn't learn a lot new because I've been using jMaki for a while now, but it was good to meet Greg and see the presentation. They were kind enough to plug the "Dynamic Portals" BOF...thanks!
- TS-6410: Hands-on DWR (Geert Bevin; Joe Walker) - I had wanted to learn more about how to use DWR. They gave a fun demo building a web app that played battleship in the browser. DWR lets you remotely interact with your server-side java from javascript. Something to consider regarding portals, maybe using DWR in the portlet container to enable seamless JS access to portlets.
- TS-6029: Beyond Blogging: Feeds in Action (Dave Johnson) - Dave wrote the Roller blogging server and recently joined Sun. I'm reading Dave's book, so mostly this was good for me because it was like a quick training session on the topics covered in his book.
- TS-6836: Creating Amazing Web Interfaces with Ajax (Ben Galbraith; Dion Almaer) - These guys are apparent "rock stars". This session was jammed, even thought it was in the afternoon on the last day. You can read this JavaOne feature on them. They even played Guitar Hero on stage. Nice! :) Actually, they were definitely probably the best speakers I saw. Lots of good ajax information:
- SoundManager2 - Add sound to your ajax web apps. It uses the flash player and javascript to play. Read about it at Ajaxian. Also, a sound widget has been included in jMaki that uses SoundManager2. Could be applied to dynamic portals for portlet window changes (min/max could have a "window shade" sound) and portlet addition ("pop") and removal ("zip").
- sIFR - Allows fancy typography (beyond the limits of browser fonts) that is inline and selectable without having to create static images (that are not crawled by search-bots). Again, it leverages flash to do it's magic. No real specific portal implications, but cool none-the-less.
- Canvas - I have never looked closely at Yahoo Pipes. I assumed it was implemented with flash. It's not. It uses
<canvas>. Canvas is an HTML extension available from Firefox 1.5+ (originally introduced by Apple for Dashboard) that can be used with scripting on the browser to build and draw compelling graphics. It is not implemented for IE (I didn't know Yahoo Pipes was not supported on IE), but Google has built a project that uses VML to implement canvas on IE.
- New Dojo stuff - Dojo is developing a fully-featured offline toolkit for taking ajax offline. And new declarative data binding. They demoed binding a data service to a dojo table, quick and easy.
- Ext JS - And they touted Ext JS which leverage Yahoo UI library for slick widgets, specifically mentioned were drag-and-drop and data binding.
- TS-6807: Real-World Comet-Based Applications (Jean-François Arcand; Alex Russell; Greg Wilkin) - Another good group of presenters. Was particularly interested to hear Alex talk since he runs Dojo and Comet was another one of those technologies I've been intending to learn more about. They covered Bayeux, which is the early implementation of a proposed common API for comet. An API that would make comet pluggable into your app. Problems still persist with server support for comet, though. To be specific, ideally comet would be implemented with a server-side that supported asynchronous servlets to handle comet requests, but we have to wait for that to be put into the servlet spec. Until then, you can use Continuations (available in Jetty 6) or Java NIO API in Grizzly (with Glassfish). But this limits the servers where you can deploy comet applications. The specs need to catch up with the technology here.
One of the topics that has come up a couple times while here at JavaOne is JavaScript namespacing. There was a JavaScript "Best Practices" BOF last night where it was discussed and during our "Dynamic Portals" BOF it was again discussed. In particular, the problem is that if you have multiple portlets on the same page trying to load the same JavaScript namespace (for a particular JS library, for instance
dojo.*) there will be a conflict because the namespace may already be taken (by a portlet that has already loaded it). The polite way to handle this in your portlets is to check first to see if the namespace for your library is already defined. If so, use it. If not, then dynamically load the library.
Namespacing in JavaScript is simply achieved by specifying a named object and defining all your functions relative to that object. In the case of DOJO, the object is
dojo. As you see in the below
code sample from the AJAX Portlet, you simple check for the existence of the dojo object. If it does not exist, we define a <script> element with the reference to the DOJO library and insert it dynamically into the DOM. The AJAX Portlet war is here and the source is here.
<div id="<portlet:namespace/>_scripts">
<script type="text/javascript">
/* Load Dojo library, if it hasn't already */
if (typeof dojo == "undefined") {
/* build script tag */
var script = document.createElement("script");
script.src = "<%=renderResponse.encodeURL(renderRequest.getContextPath() %>" + "/js/dojo.js";
script.type= "text/javascript";
/* dynamically insert with other scripts */
var <portlet:namespace/>_scripts = document.getElementById("<portlet:namespace/>_scripts");
<portlet:namespace/>_scripts.appendChild(script);
}
</script>
</div>

Thanks goes out to all that were able to attend last night's JavaOne BOF,
"Dynamic Portals and Ajax in Portlets". There was lots of good open discussion about the challenges and successes of implementing new dynamic portals with AJAX. The
slides are available here. Below is a list of resources URLs for some of the topics we discussed. Check back here for new developments regarding AJAX in portals and portlets.
- Portals/Portlets
- AJAX
- Widget Standards
- Microformats
- COMET
- Mashups

We in the
portal java.net community have released the source code (under
CDDL) for Portal Server 7.1. As I've mentioned before, the Portal Server binaries are available with the Java ES downloads
here, and now the source code is available
too. As development is completed on our upcoming releases, all the code will go into a repository here...stay tuned for that.

JavaOne 2007 is only a week away. This year, I will be presenting the Birds Of a Feather (BOF) talk
"Dynamic Portals and AJAX in Portlets". If you are interested in learning more and want to meet others with similar interests, please consider attending. We will be discussing:
- the impact of Web 2.0 technologies on portals
- AJAX and JSR-168
- jMaki
- JSR-286
- dynamic inter-portlet communication
- microformats, COMET, mashups, and more...
Hope to see you there.