I don't want to migrate from Liferay to Sharepoint

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:

http://host.my.tld/web/site/page

and on this page is portlet named: XYZ

It even happens to be instanceable, so the fully instanced portlet id is: XYZ_INSTANCE_1234

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: XYZ_portlet_WAR_XYZ_INSTANCE_1234

Ok, so given the page url, and the portletId above, we change the url to:

http://host.my.tld/widget/web/site/page/-/XYZ_portlet_WAR_XYZ_INSTANCE_1234

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.

Blogs
This is super great article. Thanks

I can hit the portlet using Widget. Is it possible to reach a page(hitme.jsp) in that portlet. Just being curious.

Thanks
One of the reasons Liferay is still appealing to prospective clients is that it has a comprehensive set of tools that offers open access to developers. Liferay Portal features include Out–of–the–Box tools, Single–Click Configuration, SOA Framework, Dynamic Drag and Drop, Secure Single Sign On (SSO), Work from Desktop Tools, Granular Role–Based Authorization, Search and Tagging, Communities and Organizations, Personal User Pages, and Multi–Language Support.

In addition, Liferay Portal offers practical, functional tools that are innovatively designed to satisfy technical and usability concerns. The suite of tools uses an open SOA strategy for easy, affordable enterprise application integration. Clients can integrate legacy system data, HR, Accounting or Sales systems data and any other sources of important data. Liferay Technology incorporates the open source frameworks and technologies of many popular toolsets, suites and languages including Java vendor neutral framework for Windows and UNIX,, JSR 168 Java portlets, Apache Struts web application framework, DWR Java AJAX framework, Spring application framework, Hibernate ORM, Velocity lightweight template engine, exposed tools and widgets for Velocity templates, Lucene Java search engine, and TinyMCE cross-platform WYSIWYG. In the hands of the right developer, these tools can create a powerful solution for the client and Liferay’s documented record of outreach does factor into the decision to deal with them as an organization that is involved with the community.

<a href=”http://www.elegantmicroweb.com/capability/tc/ecm-portal/liferay-portal-development.htm” title=”Liferay Developers”>Liferay Developers</a>
I would say this is almost like magic, and should indeed be talked about / demonstrated more to both prospects and users of Liferay!