The Stack

The first task in building a new web service is to choose a scaffolding that supports the initial application development and, once in production, continuous delivery of new features and improvements.

In this series of posts we will be covering aspects of how we approach building and maintaining a web service.

The framework

A modern website usually includes an API for accessing/updating data from the client side. The Strongloop framework is great for developing websites and services using an API driven methodology. Strongloop provides tools for controlling access to API endpoints and hardening and validating input. The framework is built on Express which is built on Node so all the capabilities of those platforms come along with deploying loopback.

The Node.js ecosystem provides a wide range of quality npm packages which can and should be leveraged to implement many commonplace web development features elegantly and efficiently. You can often find a solution that requires little coding or, if not, you can likely adapt something that already exists.

Posts in this series are tagged as Framework

The delivery platform & development lifecycle

A modern scaffolding should be built with cloud origin and clustered serving in mind which brings along with it all the power of cloud services for scaling, service monitoring and automation. This architectural approach enforces a scalable discipline so the platform can grow to meet demand without additional engineering or general panic.

Development does not end at launch. A typical interactive business must plan for continuous delivery of new features. This requires an strategy for packaging, testing and deploying code regularly in a calm, confident and controlled manner.

Version control is a central part of packaging. Services such as Git are tightly integrated into the dna of the coding community and are essential to developer sanity. Most scaling computing platforms assume git will be used for deployment.

Posts in this series are tagged as Platform

Environments & Automation

Typically an application needs to support several environments for the development cycle:

  • localdev: a local development environment runs on developers machine using a local database.
  • development: a development environment staged on a server which connects to a test database.
  • production: a multi-zone cluster which connects to the production database.

Assets such as CSS & JS should be packaged using Grunt into single downloads to reduce page weight.

In the production environment the assets should be further processed by grunt into minified packages for even more optimal download.

In the ideal situation it should be as simple as typing eb deploy and pressing return to launch a new feature into an environment.

Posts in this series are tagged as Environment

The front end

Mobile first is a rational approach to content delivery that demands that you should deliver content in a device agnostic way. We take this one step further: Search engine first — serving up pages that are highly optimized for search engines helps with discoverability.

It may come as a surprise to some that most of the requests for pages on a typical website are not made by people. They are made by robots. Another secret is that for many large websites the home page is the least visited page because most of their visitors come from search. A site that can not be found will fail. A credible web business needs to build this thinking into the DNA of their business.

For actual human visitors the same pages that are delivered to the search ecosystem are progressively enhanced using css and javascript to add capabilities depending on the platform being used to view the content.

With this in mind, the client side should certainly be built using HTML5 responsive principles and HIJAX with full support of deep linking (bookmarks.) HIJAX allows for very quick page load as the javascript and css are instantiated only once per session. HIJAX also allows the site to behave as a web app on mobile devices. This capability can be further extended to build hybrid native app (iOS, Android etc.) using Cordova to build a native app using the same code base as the web app.

Posts in this series are tagged as Front end


Photo: A building site in Hong Kong (2013)
Document version 1.0