domingo, 4 de abril de 2010

A Page to rule them all - English Version

Can you imagine a web application/site composed entirely of a single page? This is the proposal of the Single Page Interface Manifesto, published recently by Jose Maria Arranz Santamaria.

Driven initially by curiosity, I decided to check out this manifesto. This post summarizes the proposal of the manifest and the discussions that it motivated.

Motivation


The Internet was conceived as a way of sharing scientific papers, which usually contains references to other related documents. Hence its pages and links based nature.

Today the Internet holds much more than scientific documents. The ability to generate content dynamically opened the door for general purpose web applications. Truth be told, today the HTTP protocol is used to support things it definitely was not designed to.

This is why developing for the Web has always been so complex. One can say that a good portion of the evolution of web development occurred in the direction of becoming more like desktop development – which is more simple and natural. In this sense, we saw the emergence of front controllers that "capture" requests for pages that do not exist, creation event-based web frameworks, and extensible use of Ajax for creating more "desktop-like" interfaces.

SPI (Single Page Interface) would be the last step of this journey. The idea is to have a web application running entirely on a single page, just like a desktop application runs on a single main window. This approach would end a series of problems that takes the web developers' sleep away: back button, caching, navigation and forms' automatic completion, just to name a few.

Principles


The main idea behind SPI is replacing the concept of "page" for concept of "state". An application consists of a set of states (primary and secondary) that determine, among other things, the interface to be displayed.

The state control is made through URL references (the final part, which comes after '#'). Any changes in this part of the URL do not cause reloading of the page.

Ajax is a fundamental technology for SPI - without it such approach would be unworkable. In fact an SPI application makes heavy use of Ajax calls to avoid full page reload.

Of course such approach would not go without its criticisms. One can´t ignore the difficulties in integration with search and booking of visits. The manifesto proposes solution to such problems in the form of various Javascrit codes.

Following the paradigm associated with the development of web applications, this new approach could be called model 4.

Conclusion


I consider the SPI idea valid as an alternative approach for individual cases, primarily the ones involving complex interaction with the user - that would result in complex navigation rules on pages based web applications.

The fact that the solutions presented in the manifest consists mostly of "workarounds" exposes the need for maturation of the approach.

Despite the manifest to show the technical feasibility of the approach, much more is needed to gain space in the community: Productivity. There must be frameworks and toolkits that embrace SPI.

After all the idea is quite intriguing. Would that be the future of web development?

Nenhum comentário:

Postar um comentário