I don't want to migrate from Liferay to Sharepoint
Staff Blogs February 7, 2013 By Ray Augé Staff
Ok, so don't. This doesn't mean you can't gain advantage of Liferay.
Also, what follows is not just a story about Sharepoint. If you have any HTML site of any kind you can gain advantages from using Liferay.
Liferay has this crazy simple mechanism called "widgets". Yup widgets!
The term has been used, we know, but Liferay has seriously had this feature since at least version 5.1.0 (possibly earlier) and yet I NEVER hear anyone talking about, or taking advantage of it.
Sure you can use Liferay as a WSRP provider and/or use other thick integration technologies like Web Services. You could even build Open Social apps on Liferay as full fledged gadget server (and also a client on whatever site you want to ingrate into).
However; "widget" are dead simple! AND they require only an HTML client! Nothing else!
Q: "Where do I sign up???"
It's extrelemly simple. Let's build an example.
Imagine you have a Liferay portal running somewhere (this is of course required).
Now, suppose on that portal you have a portlet on a page, and let's say the page is:
and on this page is portlet named:
It even happens to be instanceable, so the fully instanced portlet id is:
Wait! It also happens to be a plugin, it's not a native Liferay portlet, it's in a war called: XYZ_portlet.war (and so the context is
XYZ_portlet), and so the fully full instanced, plugin portletId is:
Ok, so given the page url, and the portletId above, we change the url to:
If everything is working as it should what you should see is a HTML page with ONLY the portlet in question; no headers, no footers (you can even tune the portlet's "look and feel" to show the portlet in borderless mode (Show Portlet Borders: uncheck, Save) so it integrates more smoothly with the host site).
You can even navigate around the portlet, clicking links, performing actions, and again if everything is working as it should, the portlet should remain in widget mode throughout. Even non-native (or plugin) portlets!!!
Now, back to this Sharepoint server you have, or the legacy website you can't, for whatever reason, get out of using. But you want to plug in the shinny new portlet you created (or existing one you want to use 'cause it's already designed and doing what you need/want).
On this host site, all you need is an iframe! That's it! Just an iframe which references the widget url you created earlier.
(In fact, you could probably even get out of using an iframe with some clever js which loads the content of an ajax request to the same url into some HTML container on the page. Adding a url or button event listener to handle the clicks via ajax requests can round out a pretty darn smooth integration.)
Now, you want to have that portlet behave in context of the user logged in from this other site? Sure thing!
Just plug in Liferay to whatever SSO you are using on the host site and BAM! you have integration!
I hope that helps someone out there.