When I think back of 2006, the year I added “Freelance Web Developer” to my resume, memories of a simpler and somehow more welcoming Internet come to my mind.
In 2006 one of the most critical design decisions that a web developer had to make was: “Should we target 1024×768 or 1280×800 displays?” The Mobile Web was mainly mentioned in newspaper articles telling the stories of unfortunate men who were to pay hundreds of pounds to their mobile carriers for accidentally pressing a mystical button with a tiny globe icon on their new Nokia.
The iPhone did not exist, neither did Android and it was still O.K. to create an entire website using Adobe Flash.
Don’t get me wrong though, this is not some nostalgic note of times past, neither am I trying to argue that we were happier to design a button with rounded corners consisting of 9 PNG images. Internet Explorer dominated the Internet with a market share of well over 60% and implementing a two-column layout that looks identical in IE6 and IE7 involved more lines of CSS hacks than lines of style definitions.
Fast-forward 8 years and we have transitioned in an entirely new epoch of the Web. Web design is responsive– it reacts “intelligently” to the user’s device and does not make any assumptions about the media it is reproduced on. Websites have turned into Web Apps and the users’ browsers do the majority of the heavy lifting instead of the server. New tools have emerged that manage the entire lifecycle of a web application from dependency management, through provisioning and testing, all the way to user profiling and immediate pushing of hot-fixes.
All of that has allowed software developers to utilize web technologies and build amazingly complex application using just HTML, CSS and JavaScript. In this article I will briefly introduce some of the exciting new tools available to developers and share my humble predictions about the future of the web and software engineering in the next couple of years.
Platform as a Service
Eight years after the launch of Amazon Web Services [AWS], the Infrastructure as a Service model is hardly a new concept for anyone involved in the field of software engineering. Platform as a Service [PaaS] is the logical continuation of the AWS model, but made a whole lot easier. Heroku and OpenShift by Red Hat are two excellent examples of the powerful change happening in the field. These providers allow developers to deploy cloud applications in a matter of minutes, giving them the power of elastic scalability, load balancing and continuous deployment. PaaS providers expose APIs and command line tools that make the release of a new application version as easy as doing git push paas_provider.
I have been using the free tier of Heroku for well over a year now and it has allowed me to ship application prototypes and publish hot-fixes in unparalleled times. Its big disadvantage is the price of production deployment compared to Amazon Web Services.
Arguably the future of PaaS is in the further development of technologies such as Docker that essentially allows a team to host its own PaaS on any server environment they choose.
JavaScript for clients and servers
NodeJS is one of the server-side technologies supported by all major PaaS providers and the rate of its expansion certainly hints at a bright future for JavaScript on servers.
Node is platform built on Chrome’s V8 JavaScript engine. It has been developed specifically for distributed real-time applications that operate with a lot of data. The power of NodeJS lies in its simplicity and low-level applicability – it is equally suited for creating game servers, chat applications or content management systems. In fact recently a member of the WordPress dev team raised nearly 8 times higher than his goal in a Kickstarter campaign for a blogging platform based on NodeJS.
The reason I am an advocate of JavaScript on the server is the reduced tension between front-end and back-end development. It is ideal for small projects where the developer does not need to switch languages and browse multiple documentation sources. But the real power of NodeJS emerges in large teams where, if the appropriate coding standards have been followed, a developer is no longer responsible of a single side of the coin, but instead works on an entire flow of business logic that may span across both client and server.
A notable companion of Node is ExpressJS. This is a web application framework that builds on top of Node adding services such as routing, user sessions, hooks to database engines and many other essential features for building dynamic websites.
Server-side applications
Ever wondered how Google made applications such as Gmail respond to user actions in real time without refreshing you browser? Here is a hint: they did not use PHP.
In fact with the advancement of JavaScript browser engines and the adoption of techniques such as AJAX, developers have been able to offload the task of rendering views from the server and assign it to the user’s browser. The event-driven nature of JavaScript, on the other hand, allows UI elements to respond and views to be swapped as soon as the underlying data model has changed.
There are a number of technologies that aid the development of similar applications and the main difference between those lies in the amount of assumptions that the given framework has done for the developer.
Backbone is arguably the most powerful and flexible client-side application framework to date. It leaves to the developer the duty to set up data binding between interface elements and data models, as well as to choose engines for templating and routing. It is ideal for cases when performance is of the highest priority and the developers are ready to make the majority of the design decisions.
Angular on the other hand is Google’s own interpretation of the future of the web. Apparently it was developed when a JavaScript engineer at the Silicon Valley giant decided he could cut 6 months of development down to a few weeks if he took the time to complete his free-time project. Now angular powers a number of Google applications and has been supported by an overwhelming amount of open-source projects.
Certainly technologies such as Angular, Backbone or any of the frameworks “benchmarked” at the TodoMVC are overkill for simple websites with a few pages. But for large-scale browser applications, something that is becoming increasingly common lately, where speed makes the difference between keeping and loosing a client, these technologies are simply a must.
A few final words
The web has entered a new era and I find it increasingly surprising when software developers using more “traditional” languages and tools, label development for the web as a job for beginners. The web has truly allowed us to be more efficient, to develop faster and have a bigger impact on our users. Some have even reached as far as to state that JavaScript is the new Assembly.
I believe that the time has come for computer scientists to embrace the change and start making more beautiful, accessible and future-proof applications using the new Web.