Thursday, February 3, 2011

Magnolia getting (even more) open & social

Recently, we were asked to integrate several existing web-apps (mainly GWT-based) into one Magnolia empowered website to build something like an enterprise portal.

Among others, the integration should
- be lightweight
- preserve the existing web-apps as far as possible
- allow to render different views for each app (minimized, maximized)
- allow communication between the apps

First decision was whether to go for a client-side integration (iFrames & more) or a server-side one like the Java Portlet specifications (JSR 168 and 286). It was quickly agreed to choose client-side because these are more lightweight by nature and reuse of the existing web-apps (especially the GUIs) should be straightforward.

So the next question was the classical make or "buy". Should a proprietary portal be developed, or is there anything existing that could fulfill our needs? Further analysis revealed that OpenSocial - the emerging standard for client-side, lightweight web-app integration and it's reference implementation Apache Shindig offer almost everything we were looking for - for free! So everybody agreed to opt for this approach.



Some people might ask why a standard originally developed for satisfying the demands of social network sites should be a good match for a lightweight enterprise portal. Well, it's because OpenSocial offers much more and can hence be a good match for various enterprise usages. In addition that's precisely the direction it is envolving to (see enterpise-opensocial).

By using OpenSocial/Shindig we get
- a well established standard (would take a lot of time to define yourself)
- gadget-to-gadget and gadget-to-container communication
- an easy way to reuse GWT-based web-apps as they can easily be transformed into OpenSocial gadgets
- a sophisticated security mechanism (OAuth)
- and more...

That's what I call a jumpstart.

We took the default approach to dig into OpenSocial by installing Shindig v2.0.2 as ROOT.war in Tomcat. I was really impressed when playing around with the samples. On the other side, trying to change the context path or the used port quickly stopped our container from working properly :-(

Plain Shindig wasn't our main focus so we then started creating an OpenSocial container within Magnolia encapsulated in a regular OpenSocial-Container module referencing Apache Shindig. Actually, this is somehow similar to what quite a few other companies did in the last 1-3 years. Here we quickly encountered similar problems as described above.

As we could not find good documentation on how to configure Shindig the right way and especially on how to create a OpenSocial container based on Shindig we started looking into the sources. There, Shindig revealed a well defined and understandable structure, so we're now realizing what issues are to be solved next and can hence steadily progress. In the meantime I stumbled over a Slideshare-presentation of one of the major contributors of Apache Shindig. Especially slide 30-40 helped me a lot in understanding what we have to do...

Although still being in a proof of concept, we already have the strong feeling that this will become a  very valuable extension to the Magnolia ecosystem.

So stay tuned - I'll keep you up to date!

Ps.: blogger itself is based on OpenSocial