An introduction to web development frameworks

Last week I wrote an introductory guide about how to develop web applications. I kept it short and simple on purpose because an in-depth description of the topic would fit in a book. I’d rather give an overview and then selectively dig in each step as I see fit.

Today, I will discuss about an important decision in the life of a web application developer, choosing a web development framework. It is important to note that choosing a framework is more about finding one that you’re comfortable with rather than finding the best. All the popular ones are good in their own way and are used to run all sorts of web apps.

Thoughts on choosing the right web framework

Disclaimer: I haven’t developed with all of the frameworks in existence so I’ll just be giving my general impressions based on my research and understanding of the frameworks. If you disagree with anything, please leave a comment so that everyone can benefit from your experience and knowledge.

The frameworks

In my previous post, I mentioned 4 main frameworks (ignoring the multitude of PHP frameworks) and I forgot an important one: JSP (edit: actually not a framework, Struts would be a  popular Java framework). I’m very unfamiliar with it so I won’t talk about it, just know that it is based on Java and that it exists.

ASP.NET

Microsoft’s flavor is a pretty solid, although costly, option. By using ASP.NET, you’ll be working with the very powerful C# language (or VB.NET if you prefer). The IDE of choice, Visual Studio, is one of the best code editors out there, but you’ll have to shell out quit a bit of money if you want to use the more powerful features of the professional versions. Without surprise, you’ll have to work in Windows and ASP.NET works best with the rest of the Microsoft stack, namely Microsoft SQL Server and IIS, both of which will take a hefty toll on your wallet. At the finish line, you end up with a reliable set of tools on which you can build a powerful and stable application.

There are two main ways of developing web applications with ASP.NET, you have the choice of using the tried and true WebForms or the newer MVC architecture based on RESTful principles (which is often the norm in the newer frameworks). If you are just starting web development I suggest that you go straight to MVC.

If the costs of developing with ASP.NET scare you, don’t worry, Microsoft’s BizSpark program can help you. You can also take a look at the Mono project, an open-source .NET development framework.

Mono is a software platform designed to allow developers to easily create cross platform applications. Sponsored by Novell (http://www.novell.com/), Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of Linux applications.

PHP

PHP is without a doubt the most popular programming language for the web. All web hosting companies support it and there’s a ton of resources and tutorials available online. However, many people stay away from PHP because the language has been a mess for a long time, only recently receiving some much needed attention to its internal structure. Fortunately, there are plenty of frameworks available that hide most of the horrors of PHP. The most popular ones are CodeIgniter, Kohana, CakePHP, symfony, Zend framework, etc. I am not familiar with them, but if you’re interested in knowing more, I suggest that you read this discussion on StackOverflow about choosing a PHP framework. Most of the PHP frameworks use the MVC architecture and adheres to the RESTful principles.

Python/Django

python logo

A powerful combination and, unlike PHP, there’s no question about which framework to use, your only option is Django. If you’re in love with Python, there’s no doubt that this duo is for you, Django is a popular option and a solid offering once again. Furthermore, Python lovers benefit from a wonderful hosting option in Google’s App Engine which offers cheap hosting (free until certain very large limits are reached). Needless to say, with Google’s support behind Python, it’s hard to go wrong with this option. Once again, this framework follows the RESTful concepts.

Ruby on Rails

Ruby on Rails logo

Finally, the last contender in our list, Ruby on Rails. Rails abstracts a lot of the implementation work by providing a large array of generators (a common sight in other frameworks) and by simplifying the database work a lot by making heaving use of the ActiveRecord pattern. People tend to either love or hate this combination (Ruby is a scripting language) mostly because it seems to rely on “magic” in the sense that a lot of things happen behind the scenes without the developer knowing it. For example, Rails makes use of a pluralizer so that if you have a class name Person, you can access the instances by calling the People class. It’s all based on logic, but you have to trust Rails and some people just want to be in control of everything. Overall, Ruby on Rails is also a powerful and solid framework with a huge community behind it. Many people also consider it the fastest framework to develop with, taking you from the conception of an idea to an actual working app faster than any other framework. Rails favors MVC applications following the RESTful guidelines.

Still confused?

I’ve tried my best to describe the particularities of each framework, I strongly encourage you to do your own research. Always keep in mind that there’s no wrong answer, they’re all capable of helping you build your web application. Keep in mind that this list is far from being a complete list, here’s a more exhaustive list of web development frameworks.

Once you’ve chosen your framework, check the tutorials on their respective homepage and try them. As with anything new, you’ll only become proficient with the tools after having used them a lot.

16 comments
Rogério on November 8, 2010

You havne’t said about ColdFusion (CFML), it’s a really strong and powerful web programming language.

Edson Hilios on November 8, 2010

Where’s Java? With Struts 2 or Java Server Faces?

And still is missing to mention the deploy process, PHP you don’t need any advanced knowledge with Apache and UNIX shell commands to run and deploy.

But for Java, Ruby and Pyton this is also part of day-by-day work, .NET does’t need be so specific because, but must learn how to operate the IDE, it’s easier but also is tricky sometimes to solve some problems.

Joost Verbree on November 8, 2010

I indeed miss Java EE. As it happens to be, Java is still the most populair programming language (nearly tripple the usage of PHP) and for the most part it’s used serverside. This means a lot of servers and ultimately web apps out there are running on Java.

The default web framework of Java EE (JSF) is really nice. I love the so-called conversation scope it supports, which makes communication between multiple pages easy and safe for multiple browsers. There also is a very vibrant comunity that offers many ready to use high quality third party components.

Joost Verbree on November 8, 2010

P.s.

Jsp is not really a web framework by itself. It’s just a particular way to compose pages (which is fairly close to PHP, ie HTML markup mixed with programming statements). A lot of the APIs you would use on a JSP page would come from the Servlet API or from the JSF ‘API’.

In modern Java, JSP has been deprecated and is replaced by Facelets, which offers a far more modern way of creating pages based on templates and composite components.

Roel Bruggink on November 8, 2010

Why is Django ‘the only option’? There are so many options in the Python world, saying Django is the only option would be like saying Vauxhall is the only car brand.

simonfl on November 8, 2010

GWT FTW! Seriously, GWT is awesome, if only to avoid writing as much javascript as possible.

Michel Billard on November 8, 2010

@Joost Verbree: thanks for the clarification, I’m really out of the loop about any Java for web development.

@Roel Bruggink: while Django is not the only option, it’s the one I see most often recommendeded for Python web development. The others are very rarely mentioned.

@simonfl: oh yeah, GWT’s a good one if you prefer Java. It’s important to note that you can also get access to cheap hosting via Google’s App Engine.

REMY on November 8, 2010

Where is JAVA? Where is Spring MVC?

Goncalo Borrega on November 9, 2010

What about a 4GL like OutSystems? Model based, automated dedployment, easy to learn, improved maintanability….

Adam on November 9, 2010

I would recommend beside Java frameworks, which could be really complex when you want quick results, groovy framework Grails. In grails you could use all java enviroment and still you can deliver product quickly.

neo on November 9, 2010

GWT’s a good one if you prefer Java

henk on November 9, 2010

It seems like everyone prefers a different framework. Although that adds to a healthy competition, it also fragments the market.

Nevertheless, in the Java space I see that the old Struts is still the most frequently used web framework. Like it or not. Java’s default web framework JSF follows at some distance, and the many other Java web frameworks trail far behind.

Personally I very much like JSF. It’s a very powerful technology, has a lot of support and it’s relatively easy to find developers skilled in using it.

Roel Bruggink on November 9, 2010

@Michel Billard That’s like saying Windows is the only option for OSs ;)

arjan on November 10, 2010

If you want a good and powerful web framework for Java, just use JSF. This really is the best one at the moment.

WuMaster on February 6, 2012

and whats about Grails? very subjective point of view, ther’re dozen of well proved framewroks available outside those suggested list.

Vikas on March 18, 2012

I would suggest GWT Webapps. Its amazing. power of java language, Use of free editors like Eclipse and output is pure javascript+html+css code. Best thing is 98% code is common for desktop Browser + Mobile phones + Tablets. So go with it.