Application Servers are the new Database

In the past decade, enterprise software development has gone through a major paradigm shift. This shift was the introduction of middleware, a.k.a application servers. The objective of the application server was to break the client-server model and move logic into a middle tier where the application logic could be cleanly broken down into discreet, testable layers implemented with object oriented languages. This push to application servers was driven both by the acceptance of object oriented programming and by vendors eager to make boat loads of money selling their middleware to businesses.

One of the side effects of the push to middleware was that databases no longer mattered. The goal of middleware was to abstract out the database. The thinking was that you designed a clean domain model at the middle tier, and various ORM technologies would map that to your database. Developers, in theory, no longer had to be experts in SQL, DDL, stored procedures and indexes. Application servers were going to save us from all this, turning databases into nothing more than data sources.

Another effect of application servers was the introduction of server controls, or widgets, used to help generate HTML views in the MVC pattern. Examples include tag libraries, JSF and JSTL. The application server would generate the entire view and return the complete HTML document to the browser to be rendered to the client. Applications servers were just reinforcing a similar layer of abstraction at the other end of the stack. Browsers were simply windows into the views being generated in the middle tier.

And then came AJAX. Suddenly, through the magic of web services, JavaScript and the XMLHttpRequest object, the browser proved it could be more than a simple rendering engine for HTML documents generated by the application server. The browser itself proved to be a rich application development environment that could be dynamically updated without making expensive round trips to the server to get full HTML documents. This acceptance of the browser as a platform in its own right is causing another paradigm shift that is going to do to middleware what middleware did to the database – render it irrelevant.

The future of web application development will center around JavaScript and the browser, not on application servers. Browsers will make AJAX requests for JSON data back to services, and no one is going to care how those services are provided. In the same way the application server really didn’t care about the underlying database, the next-generation browser application is not going to care how the AJAX request is fulfilled.

Good web applications will still implement clean, layered abstraction via MVC, but it will be implemented in JavaScript at the browser level, not in Java or C# in the middle tier. The ExtJS library is the best example so far of what the future is going to look like. Other possibilities include Adobe’s Flex and Microsoft’s Silverlight, but both these require plug-ins which the pure JavaScript solution doesn’t need.

It is entirely possible that application servers go the way of the dodo, being supplanted by simpler tools which handle AJAX requests. Web servers will serve the basic content (html, js, css) to the browser, which will then make the AJAX requests to populate the model of the application.

A side effect of all this will be the death of XML used for intra-application communication, to be replaced by JSON. This can’t happen soon enough. I have seen way too many applications use XML internally to pass data around. XML web services were designed for tying together heterogeneous processes across system boundaries and are not an efficient protocol to be used inside a homogeneous system. Unfortunately, developers got “high on XML,” which led us to the mess we have today of trying to use XML Web Services for everything. JSON will kill this silliness through its terseness, performance and ease of use within the JavaScript application layer.

Another possible side effect of the marginalization of application servers and middleware is that databases could start to matter again. I would expect that a smart database vendor will implement connectivity directly via JSON, in the same way they provide JDBC or ODBC connectivity today. The browser will send AJAX requests directly to the database server, which will return a JSON-encoded resultset. Expect to see standardization around what the database JSON request/result protocol looks like.

Leave a Reply

Your email address will not be published. Required fields are marked *