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

Advertisements

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

The fall and rise of XForms

Yesterday I gave a talk about the W3C XForms specification at the @Exeter_Web (http://www.exeter-web.org) web developer meetup. Unsurprisingly only 1 out of the 30 or so strong audience had heard of this specification and that’s why I called this talk “The fall and rise of XForms”. XForms really is one of the hidden gems of the web and there seems to be strong interest in learning more from many of those who attended. Hopefully we will have opportunity for more great conversations about this topic in the future and who knows, maybe next time you’ll be tell me about the great solutions you have been able to create using one of the many implementations of the specification. So if you found the talk interesting, why not leave me a comment below! The slides from the talk are available and linked from this post.

Intelligently merging XML documents using XForms

Looks like my blog is withering a little bit. To help bring it back to life, I thought it would be good to start a series of shorter postings that are quick to post, hopefully meaning less time in between!

These days I spend a considerable amount of time developing applications and forms using Orbeon Forms, which if you are unfamiliar, is one of the leading implementations of the W3C XForms 1.1 recommended specification. For the most part I use this for intelligent data capture and validation, but XForms is a very versatile technology with far reaching potential and is a very useful tool for any developer working with XML technologies. In particular for those already familiar with XPath and XML Schema. The local authority I work for is quite SOAP webservices centric, which is why I advocating XForms as a strategic tool for building user interfaces to our SOA.

I recently had the need to intelligently merge a series of XML documents valid to the same XML Schema. It was important that the merge only merged in elements from the second document that did not already exist in the first document. This required a definition of XML element equality. Continue reading