indra: An Interface Specification for Web Applications



Indra is a set of programming interfaces that were defined with the intention of isolating web application code from specific back-ends. The goal is to be able to write powerful web applications with a clear separation that allows easily retargeting an application to a different backend, without having to rewrite the application code.


When I wrote these interfaces, I was writing my own web application framework, and I worried about writing code that could not be retargeted to another platform in the future. What I decided to do was formalize what the interface between my application's code and the web app framework. To this effect, I had to identify what were the core components that I was using and came up with this set of interfaces.

I have since implemented a web framework that implements all the interfaces provides by Indra. The interfaces are relatively low-level, and it would be easy to implement the same set of interfaces on other backends.


The value of those interfaces lie in

  • the fact that they have been tested with real application code;
  • the identification of orthogonal components for building web applications.

If you need to make decisions about an API for building a web application framework, or if you want to write a web application without committing to any one framework, this is a good place to start. All you have to do is implement those interfaces on whatever framework you would like to use.


The interfaces themselves are the documentation for the API.

While designing the interfaces, I wrote an overview of the various components that comprise it. It can be found here: Components of Web Applications.


Snapshots of the latest interfaces code can be found in the Download area.

Copyright and License

Copyright (C) 2005 Martin Blais. This code is distributed under the GNU General Public License.


The first framework I wrote was using the draco framework written by Geert Jansen. Many of the interfaces in this API originally evolved from the draco implementation.


Martin Blais <>