Creating an SPA with Polymer

I maintain a medium sized Microsoft Access application that is the operational system for a small business.  This business has offices in London, Birmingham Leeds and a copy of the Access application runs on PCs within the office system of these offices, allowing the staff to run the business.  A SQL Server database runs in the London office and all the Microsoft Access clients connect to it.

For reasons of confidentiality I wont give too many more details about the business, but this article and those that follow will concentrate on the technical aspects of creating a web based replacement that can sit alongside (but maybe eventually replace) the existing Access client.  The reasons for taking this path are both business driven and technical.  The key drivers are:-

  • Access is Windows only, but there is a desire to connect from other devices (such as iPads and Macintosh laptops).
  • Difficulties in distributing each new release of the Access client to all offices.  A web application doesn’t have this problem
  • Difficulties in doing multiple changes to the Access client simultaneously through lack of version control. The web application is essentially textual source code and can be version controlled (I will use git).
  • Ability to explore different UI approaches to existing processes to improve usability.

I am undertaking this project in the background, and expect it to take quite a while to complete.  For this reason, a key underlying driver is that the new and old applications sit side by side.

I have decided to build the web application as a Single Page Application (SPA) .  I did start this project before, about two years ago, and at that time started with JQuery Mobile.  A characteristic of this was I started to see quite large and complex files that would have become increasingly difficult to maintain.  The essence of using Polymer is that it possible to build relatively small self contained custom web elements, that comprise both the html user interface, but also the control logic surrounding it.  This encapsulation is what I am looking for.

The SPA will communicate with the database with small self contained PHP scripts called via AJAX requests.  They will use PDO to access the SQL Server database.  I could have chosen from a wide range of approaches, but this one is one I know and feel confident with.

My efforts at writing a series of posts to cover a project have, in the past, led to nothing.  I write the first post like this, then get dragged into the project and by the time I have emerged from the other side I have no desire to talk about it further.  This may go the same way, or maybe not.  Polymer, and web components in general, is a new technology that has yet to be fully explored.  I have some opinions about application structure and approaches that I hope to discuss in further articles.  Whether they see the light of day is another matter.  Lets just wait and see.