Get Charged Up with Orchestrate, Polymer, and Pivotal Cloud Foundry

Originally appeared on the Orchestrate Blog

November 24, 2014

Share +

Over the past 5 years, the UK government has made a push to make government datasets easily accessible to the general public. These public datasets, when combined with Orchestrate (DBaaS) and a PaaS, prove to be a quite powerful combination. With a few lines of server code and a simple front end web app, you can build powerful tools to explore them.

Using a public dataset, a minimal go-based server app, a Polymer-based front-end, and Pivotal’s Cloud Foundry PaaS, we will demonstrate this power.

The Dataset

It’s widely believed that electric cars will play a large role in the future of personal transport. Fortunately for those living on the bleeding edge, the UK Government publishes a registry of all the UK’s electric car charge points.

Additionally, I provide the ability to filter by 24 hour access, free only, and the minimum power. You can inspect the queries used by the final app by clicking the info button in the bottom right hand corner.

Go

To proxy requests between Orchestrate and our front-end, I’ve built a minimal Go web server that both serves the static HTML that makes up the front-end and takes search request from the front-end and sends them with our app credentials to Orchestrate. The entire Go app is less than 100 lines of code.

The project is deployable to PaaS like Cloud Foundry and Heroku or can be containerized using Docker and deployed on any modern linux server. You can find the complete project on Github.

Polymer

Polymer is a relatively new front-end web development platform from Google based on what they call “web components”:

Web Components usher in a new era of web development based on encapsulated and interoperable custom elements that extend HTML itself. Built atop these new standards, Polymer makes it easier and faster to create anything from a button to a complete application across desktop, mobile, and beyond.

Polymer comes with a default set of components and some higher level components based on Google’s material design. Further, some really useful components are available on the web, namely a Google Maps component which we will utilize.

Cloud Foundry

Cloud Foundry is an open source Platform as a Service that’s gives everyone the power to host their own PaaS. Cloud Foundry boasts many great features, including compatibility with Heroku buildpacks.