Search code examples
web-applicationsframeworkscomparison

What are the main differences between the popular web frameworks?


There are lots of web application frameworks available these days, for pretty much every language out there. In your experience, what are their strengths, weaknesses, and unique features? Assuming the luxury of choice, what factors would lead you to consider one over another other?

I'm most interested in people's direct experience with one or more frameworks, rather than an exhaustive comparison of everything out there. Hopefully the SO community has programmers who have good and bad experiences with things like Rails, ASP.NET, Django, TurboGears, or JSF. It would also be great to hear if anyone is using one of the less mainstream frameworks like Seaside or Weblocks.

Programming language is an obvious difference, but a Java vs Ruby flamewar won't be much fun, and most of these frameworks seem to be at least as much an investment in technology, tools and complexity as their language of choice; so I'm more interested in things like:

  • Development speed and convenience
  • Barriers to entry - both in terms of developer training, and of infrastructure needed
  • Lock-in - how much code could you keep if you had to switch frameworks?
  • Flexibility - does the framework dictate your architecture or design? (Whether that would be a good or bad thing is probably best left to a separate discussion.)
  • Performance, scalability, and stability - obviously depending on the developers!

Solution

  • I am going to briefly address each area for three popular Python frameworks. This is only based on my personal experiences and observations.

    Development speed and convenience

    For TurboGears, Pylons, and Django, development speed is roughly equal. Being modern frameworks, it's easy to get started on a new site and start throwing together pages. Python is famously fast to develop and debug and I would put any Python framework as having a shorter development time than any other setup I've worked with (including PHP, Perl, Embedded Perl, and C#/ASP.Net).

    Barriers to entry - developer training and infrastructure

    If you know Python and are willing to watch a 20 minute video tutorial, you can create a fairly complete wiki-type site from scratch. Or you can walk through a social-bookmarking site tutorial in 30 minutes (including installation). These are TurboGears examples but the other two frameworks have nearly identical tutorials as well.

    The test/development infrastructure that comes out of the box with these frameworks is generally enough to complete most sites. At any point, you can swap out components to meet your production environment requirements. For example, SQLite is fine for setting up your models and loading test data, but you will want to install MySQL (for example) before going live or storing large amounts of data.

    In all cases, the requirements are very low and dictated entirely by your scalability requirements and not any peculiarities of the framework. If you are comfortable with a certain template language or ORM, it will probably plug right in.

    Lock-in

    This is a generalized problem across all frameworks. When you select a language, you limit your code-reuse options. When you select a templater, you are again locked in (although that's easier to change, in general, than other things). The same goes for your ORM, database, and so on. There is nothing these frameworks do specifically that will help or hinder lock-in.

    Flexibility

    It's all about MVC with these three frameworks. As you said, that's a very different discussion!

    Performance, scalability, and stability

    Well, if you write good code, your site will perform well! Again, this is a problem across all frameworks addressed by different development techniques and is probably way outside the scope of this answer.