Play, Rails and Oauth
EasySOA is built to provide many features which need communication between Registry and the Runtime middleware & proxies. In this article we will talk about the choice of the framework which will allow us to plug in EasySOA Registry and configure our runtime monitoring proxy in a web UI and manage Event Subscriptions.
It was not easy to choose the most appropriate framework to build the Event Subscription UI. This UI will allow business users to access some Nuxeo web services information. Why ? In order to set up additional, event-like behaviors (such as calling another web service) when a given web service is called.
The chosen framework should answer many requirements including the OAuth 1.0 protocol (For flrxible user authentication and Nuxeo automation requests), MVC pattern (for agile development process) and should be well documented.
About Play Framework:
Play Framework uses the MVC pattern and minimal computer resources. It’s Java based which is a real advantage because EasySOA is Java-oriented. Play has his own embedded web server and ORM, so no download needed, all is about configuration in order to make Play use the right port. It’s Eclipse compatible and very easy to learn.
Ruby rails Framework:
In order to build a new EasySOA distribution, we already need as prerequisites Ruby, Rubygems and Buildr. So after these installations, all we have to do in order to deploy a rails application is merely to install Rails via one command. Rails is MVC based and provides many features through his gems repository.
Here is a sample of Event Subscription UI and Service Registry interaction: authentication.
We built two prototypes, one using each framework. Then we went further with Rails only, at least for the moment, mainly because of the poor Play 2 framework documentation – powerful indeed, but learning through the source code (made harder by having to learn Scala) is not what you expect of a web Rapid Application Development framework.
PS: A new Play framework release (2.0.2) is out, we will check if it’s more documented and specially the Java part.