11436 SSO

The New Three Tier Architecture: HTML5, Proxy & APIs

Brian Mulloy
Oct 23, 2012

The web and now the mobile web have been powered by the 3-tier architecture of presentation, logic and data. Each tier includes established technologies.

The presentation tier is primarily about the web browser. The de facto standards across the Web for the presentation layer are HTML, JavaScript and CSS. Along with images, the things a user sees and interacts with on the web are driven by these three technologies.

Behind the presentation tier is the logic tier. There are many different ways of building a logic tier for the web. The leading technologies are .NET, Java, PHP, Python and Ruby on Rails.


The web is powered by data. Behind the logic and presentation layers sits the data tier, which has been driven primarily by relational database management servers. The leading DBs include Microsoft SQL Server, Oracle, Postgres, and MySQL.

The data tier is currently undergoing the greatest amount of change and driving change up through the logic and presentation tiers.

Because there are so many rich APIs available for developers to use for storing the data needed by apps, a traditional relational database is often not used by modern-day apps. And because the services behind an API (whether it’s Twitter, Amazon s3, or Apigee App Services) include their own logic, there is a new opportunity to access APIs directly with JavaScript in the presentation tier. This eliminates a whole bunch of required knowledge, development effort, and operational expertise.

This new world looks like a lightweight presentation tier
and a rich set of API-powered data capabilities.

Another vector affecting the traditional application tiers is the growth of mobile applications, which often use web APIs to store data in the cloud, plug into social networks, and help grow the usage of the apps.

Mobile apps often store their data
via APIs.

The leading mobile apps are iOS and Android. However, there are some really interesting new mobile development platforms like PhoneGap, Sencha and TRIGGER.IO, which allow developers to build apps with the standard presentation tier tools they know - like HTML5, JavaScript and CSS – yet package them up as native mobile apps.

Working with APIs we don't control.

As app developers who have been working with APIs quickly realize, they don’t own all the APIs. Sometimes app development just stops as a result. Why?

- Some APIs return XML but not JSON, which is what JavaScript wants.

- An API may not support cross origin scripting, which is required for a JavaScript-powered web app.

- An API might return big chunks of data that drown the network capacity of a mobile app.

How do we get development going again? With a new logic tier called an API proxy.

The power of the API proxy is that it lets developers change the way an API works without actually owning or controlling that API.

A couple of recent events help illustrate the point.

Twitter drops support for XML. Will every app powered by the Twitter API with XML break? It’s possible, but can be avoided by transforming a JSON API into an XML API using an API proxy – no need to change the original API.  

Amazon S3 announced support for CORS making it possible for JavaScript running in a browser to call the S3 API directly. However, many APIs don’t yet support CORS and developers don’t always control the API on which their apps are built. Instead of resorting to a traditional web stack, developers can use an API proxy to solve a CORS problem. See Cross-Origin Access Issues? An API Solution to an API-Driven Phenomenon.

With a rich set of API-powered data capabilities replacing traditional relational database management servers, the landscape for app developers is evolving to one with a lightweight presentation tier, a new set of mobile development platforms, and APIs.

Scaling Microservices