Develop a REST Service using Play and PostgreSQL on IBM Bluemix: Part One

By Carl Osipov

Develop a REST Service using Play and PostgreSQL on IBM Bluemix: Part One

This post will show how to use the Play framework with IBM BlueMix to develop and run a very simple REST style web application. The application supports APIs to create, retrieve, update and delete objects represented by JSON in HTTP requests. On the backend, the application connects to a BlueMix managed PostgreSQL database to persist and query data parsed out by the application from the HTTP requests.

The data used in the application describes a note — modeled as two fields of text for note’s title and its contents. The application is just a sample and is not intended to be used in production. Future posts on this topic are going to describe how to address production concerns such as automated testing, authentication, authorization and more.

Security considerations are entirely out of scope for this post. While the REST API described here has some rudimentary protection against some attacks (e.g. SQL injection), the application should not be used to store sensitive information or be exposed to the web as part of anything other than a learning exercise. More sophisticated security features for the application are topics for future posts.

The steps in this post can be followed without an understanding of SQL, REST and Scala but those who invest some time in getting familiar with these technologies are going to get more value out of the content here. Read More…


Be the first to hear about news, product updates, and innovation from IBM Cloud