Case Study: CRUD UI - Without Table Specific Code

Polymer UI for CRUD Operations

Using Google Polymer for the UI stack, PolyRest is a fairly standard CRUD UI was written for basic Create, Retrieve, Update, and Delete operations. At first, one might conclude that as a UI, there is nothing spectacular about this work, much like PhpMyAdmin or similar toolsets, it provides only fundamental operations for data persistence. What follows may clarify the what makes it pretty cool.

There isn't a lot of code to it - and that's a good thing. Because it is written in Polymer, which could almost be described as a scope engine for javascript UIs, even for this small app, much code could be shared between screens without copypasting. This was a nice test bed for using the power of Polymer to write more maintainable code.

No DDL Required - HATEOAS Data Source

Unlike PhpMyAdmin or similar toolsets, PolyRest requires no SQL DDL. Unlike Ruby on Rails or Grails, it generates no table specific code. It does it's work totally on the fly, by reading the data itself. It consumes and produces HATEOAS data, which can be from any data source, SQL RDBMS, NoSQL, graph, or .... any persistence source with a JSON HATEOAS REST API should work.

No Back End Server - JavaScript

PolyRest does it's work without a back end server to interpolate the data for the UI. Again, this is unlike toolsets such as Grails, which uses a middle tier server to feed the UI. The browser itself does all the work, eliminating one more piece of intrastructure to maintain. 

PolyRest is also written in plain javascript, without frameworks such as JQuery or Angular to add to the code maintenance stack. Though this claim could be considered questionable because PolyRest does use Polymer to scope the javascript and even provide pre-scoped Polymer services, such as iron-ajax.

Proof of Concept Only

PolyRest is neither production code, nor is it the type of toolset you would use to front end your data in a real life user app. This makes it much like PhpMyAdmin, which shares this same limitation.

The code for PolyRest is public, and is available on github.