In Defense of Web Frameworks

Sep 29 ‘09

Today I watched an intriguing talk titled Do Frameworks Have a Place in Web Development’s Future?, in which Django developer Jacob Kaplan-Moss states flatly, "web development sucks". He's right: web development is often difficult, repetitive, and boring. He takes us through the history of web development from the HTML-only stone age, through the less sucky but still terrible CGI and PHP epochs, to the current world of web frameworks, where life isn't as bad as it was, but it's not great, either. The talk covers a lot of ground and does not exactly predict the death of web frameworks, but challenges web framework developers think beyond application-based thinking to full-application ecosystem thinking:

  • Web frameworks need to be more modular to allow developers to rewrite or swap out pieces of the framework that ultimately fail.
  • Web frameworks need to fix concurrency issues to deal with the dying single-threaded world embrace the exploding multi-core world.
  • Framework developers need to think hard about the HTML5 spec where the differences between desktop and web applications fade to black.

I completely agree, but this talk really got me thinking about the chatter I've been hearing about the death of web frameworks their friends: the RDBMS and the HTML front-end. Frameworks like Rails and Django are bad choices -- they can't scale. You should't use an RDBMS because eventually you won't be able to change your schema. I have a response to these statements:

Bullshit.

Not only do frameworks have a place in web-development's future, but they will continue to grow, become easier to use, become more powerful, and enable innovative people to launch products faster than ever. Here's why.

Web frameworks are the fastest way to get to market

And succeed, or fail, fast. Or stay alive longer so you can iterate and refine your product and business to fit your customer's needs. If you have a business idea, a little cash, and zero developers, shops like Pivotal Labs (disclosure: I work there) and Hashrocket can bring you to market using the ARC model (Agile + Rails + Cloud) in a matter of weeks or months. This is not a sales pitch, this is reality. There is no foreseeable alternative for developing web apps quickly, and few startups have the luxury of building for scale on day 1.

Nor should they. I recently had a conversation with a chief engineer for a fast growing company, where he is shepherding a major part of their infrastructure from MySQL to a BigTable-like data store. I asked him strait-up: in his opinion, are relational databases dead? Should startups bypass them and dive into a more scalable solution?

No way, he said. Ease and speed of development make web frameworks with RDBMSs a no-brainer. MySQL got his company a long, long way, and much of the application still runs on it. Needing to migrate away from your RDBMS because of your company's success is a great problem to have.

Success is not about being as big as Google

Stealing a line from Kaplan-Moss, who stole it from someone else, I can count the number of companies as big as Google on one finger. If one day your company and user-base is so lucky to have a Google or Facebook-sized problem, then you'll have Google-sized resources to address it. Sit down, take a deep breath, and relax by picking out a private jet before freaking out about how it takes too long to migrate your database.

You can't fail if you don't try

Rhetorical question: how many companies would never have been born without web frameworks? If web frameworks were wiped from the face of the Earth tomorrow, which future companies would never exist? Web frameworks will continue to grow and succeed because they enable opportunity. Sure, you can say that they allow for the opportunity to create an unscalable site, but they also provide for the opportunity to create The Next Great Site, too.

Web frameworks are incorporating scalable, modular technologies.

The big ones here are alternatives to the RDBMS. For the most part, these are key-value, document-based data stores, or BigTable implementations. Adapters for web frameworks are already springing up here, such as HyperRecord for hypertable in the Rails world. More adapters and tools will be built in or easy to use plugins as these alternative data stores become more established.

In addition, Rails is already heading in the framework à la carte model with Rails 3: The Great Decoupling. Don't want ActiveRecord? Dump it.

If you fail because your web framework didn't scale you probably would have failed anyway

Ouch. Look at Twitter: if you are reading this, you've see the Fail Whale. Often. But you still use Twitter, don't you? Parts of Twitter's out of the box web framework, Ruby on Rails, did not scale and had to be replaced, and while they did this the site Whaled a lot. Yet people kept coming back and usage and signups soared because Twitter has an amazing product, who's users are tolerant of it's growing pains. If you're users bail on you at the first sign of a slowdown then you users were going to bail anyway.

... But don't be stupid

Web frameworks aren't going anywhere and will continue to be the right technology choice for many startups. That said, you can do stupid stuff with them. Not just create stupid products, but developers can write stupid code or pick the wrong framework for the application's needs. I am not always going to suggest Rails just because I know and love Rails. Sometimes you need to write some Java. Sometimes a RDBMS is not the right choice from the git-go, and developers should be honest and realistic with themselves if that is the case.

So, don't listen to the web framework FUD, but don't be religiously dedicated to your framework, either. Have fun writing code.

Comments on “In Defense of Web Frameworks”

No comments have been left yet.

Leave a comment

Markdown is allowed. If you’re a robot, don’t even bother.

Click here to go home
Powered by aintablog