Social Apps Proxy – Winning app in the Liferay Marketplace App Contest

MPAC-Winner-Badge-White-2Last month I entered and won this year’s Liferay Marketplace apps contest with my latest Liferay Portal app! There were some really good entries and it must have been a tough contest to call. Social Apps Proxy was my entry. It’s an app for drastically simplifying the building of other Liferay Portal apps that need to integrate with the social graph of its users. For example it can be used to retrieve recent mentions of the user on Twitter. That’s about 10 lines of code to achieve, and the full source code for this can be found here.

Social Apps proxy can be downloaded here.

Social Apps Proxy - Now available

Social Apps Proxy – Now available

James Falkner (Liferay community manager) wrote a good blog on the contest results.

In reality I started building the app some time before the contest was announced, because I wanted to combine my knowledge of a few different technologies that I had been working with in recent years. Namely XForms 1.1, OAuth 1.0a, and all things Liferay Portal!

The link to XForms 1.1 may seem obscure, but it was possibly my experience with XForms 1.1 that triggered the idea to build the app in the first place. XForms 1.1 has no native support for consuming OAuth services or parsing JSON data commonly returned by such services. It is however a superb framework for rapidly building complex forms using its model driven approach and excellent support for consuming HTTP services. So the idea was to create a HTTP proxy server which would do all the OAuth and JSON parsing (transforming it to XML) stuff on its behalf without it even being aware! Liferay Portal’s plug-able architecture provided a great opportunity to put a face on the proxy server for easy configuration and deployment. And from a user experience perspective, allowing users to managing their OAuth tokens for a whole website (web domain) hosted on Liferay Portal instead of using something specifically put together for an individual form (or portlet) is going to be more aligned with the user’s expectations of OAuth itself.

Integrating XForms with Liferay Portal is not something I will go into detail with, but Orbeon Forms is the XForms 1.1 implementation I am most familiar with and it comes with out of the box Liferay Portal integration. I’m sure other XForms implementations can also be integrated quite easily and Social Apps Proxy will work with those too!

So does that mean that Social Apps Proxy requires a XForms 1.1 implementation to be useful? Not at all. Any kind of app that can be deployed as a portlet to Liferay Portal can use Social Apps Proxy. Once installed, all portlets will automatically receive a special token as a render request attribute which indirectly links the app to all of the user’s OAuth tokens. Using the special token the app can request any OAuth resource as if it requires no OAuth token. Whenever this requires user authorisation the Social Apps Proxy will provide a special HTTP response with an authorisation URL which the portlet should simply send the user to.

So what’s next?

I’m going to be at a few upcoming Liferay conferences; The North America Symposium, London Solutions Forum, and the DevCon in Germany. It would be great to discuss how Social Apps Proxy could be improved so if you’re going to be at any of those events then great. Or you can simply leave a comment, it would be great to hear from you either way!

References

8th October 2013 Liferay UK User Group meetup – getting local!

A surprisingly local meetup this time, in Bristol! Thanks to Paul Brown of Jordans for organising this and his interesting talk on using Vaadin as a portlet MVC framework. It was great to finally have opportunity to meet the Gavin Beckett, Chief Enterprise Architect of Bristol City Council. Several of his team were present too, and I wish I had more time to speak to them. Bristol are doing some great work on redeveloping their online transactional services delivery platform and using Liferay Portal to achieve this. It is clear that they are taking time to understand citizen needs and using this knowledge to design a great citizen user experience. Prior to the meetup I had been approached by Digpen organiser Sophie Dennis who as turns out is helping project manage the Bristol on their Liferay Portal implementation. This was a really big surprise to me because I have known Sophie for some time from attending Digpen conferences and Exeter Web Dev meetups, but the topics of these have almost always been PHP or lifestyle related. Liferay user groups have mostly been in London, and a whole different group of developers to me. It is quite exciting that Liferay Portal projects are becoming more commonplace in the south west! A UK user group meetup may be hosted in Exeter in the not too distant future.

Continue reading

Achieving a federated single view of the customer

I am writing this post as I have just delivered a pilot implementation of a portlet driven web presentational architecture and it seems like a good time to reflect on the concepts that fed into its design to date, and also its long term prospects.

I would like to propose that modern portal and portlet technology standards as key to a realistic solution to the challenging problem of achieving a “single view” of the customer. The technique I will describe can be extended to any type of object whose information is spread across disparate applications of which the solutions architect has often very limited control. Continue reading