Evaluating web frameworks

Abundance

Article from Issue 145/2012
Author(s):

Stop re-inventing the wheel and build your web applications with the excellent tools already available.

One theme I've noticed in many large web applications is badly reinvented wheels. I suspect a lot of this is caused by the "not invented here" syndrome or by developers who want to avoid external dependencies (portability is nice). The problem is that virtually all web applications have a rather complex set of requirements and security needs that often are not implemented well (if at all). And, a lot of us who have been programming web applications for more than a decade might still be a bit mentally stuck in the 2000s, when a little HTML and some form fields were all you needed to make an "interactive" site that actually worked quite well. Conversely, I can't help but think newer programmers aren't aware of all the problems already discovered and solved in frameworks during the past decade and a half.

Why Frameworks?

One compelling reason to use frameworks is that they not only do a lot of the heavy lifting, the better frameworks do it properly. I say "better frameworks," because at this point there are literally thousands, and many are terrible. Additionally, the more popular frameworks, like Django and Ruby on Rails, have tens of thousands of add-ons (Ruby Gems, Django plugins, etc.) that can be used to provide functionality. Plus, someone else maintains the code for you: win-win! The downside of these frameworks is that you have to build your applications using their idioms and design patterns: If you haven't read Design Patterns [1], about designing object-oriented software, you might want to buy a copy.

MVC and REST

One popular design pattern with web frameworks is the MVC (Model, View, Controller) pattern (Figure 1). In a nutshell, you have a controller, which sends commands on the basis of either user actions or other external or internal events, like an order generation; a model, which represents the system, essentially a large state machine; and a view, which is output sent to the user or other systems. One reason this design pattern is popular is that it supports stateless protocols (like HTTP) rather well, whereas many traditional design patterns assume a fully stateful system.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Security Lessons: Web Frameworks

    Stop re-inventing the wheel and build your web applications with the excellent tools already available.

  • Rails Framework

    Most web libraries make 90 percent of the job simple and the rest impossible. Rails,an open source framework programmed in Ruby,is flexible enough to succeed with that remaining 10 percent.

  • Stream Processing 101

    Batch processing strategies won't help if you need to process large volumes of incoming data in real time. Stream processing is a promising alternative to conventional batch techniques.

  • Django Web Framework

    We talk to one of the creators of the Django project about the formation of the Django Software Foundation, and we show you how to get started with this user-friendly web framework.

  • Secure Online Passwords

    Securely storing passwords online can be a complex task. With a few tools, websites can offer better security, but users still need to choose their passwords wisely.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News