July 4, 2006

Web Frameworks, Underlying Technologies, and You

Posted in Development, Software at 9:41 pm by mj

Ian Holsman asks What should your framework do for you? in response to a post by James Bennett on Django and AJAX.

Do I know how how to write javascript? yep. I also know SQL, and have writen webservers modules (although not much lately) but knowing how to do it doesn’t mean I should be doing it every time I want to develop an application if I don’t have to. Having me writing (and debugging) javascript is not a good use of my time. I should be spending my time doing more valuable things like creating job sites or content aggregators. If django had a fancy javascript layer those sites would be using it right now, instead of waiting for me to develop and integrate it.

While the context of that discussion is what, if any, toolkits the Django framework should tie into, the philosophy runs deeper. I think Ian hits it on the head: frameworks should simplify your life most of the time, but give you the flexibility you need in special cases.

Of course you have to expect that any engineer or web developer you hire understands what’s going on under the hood. Using an ORM toolkit doesn’t mean you can get by with not understanding SQL or how to optimize queries or how indexes are used. Using an abstract REST API doesn’t mean you can get by with not understanding HTTP.

In the base case, using a higher-level programming language doesn’t mean you can be effective without understanding what’s going on underneath, what the CPU sees, how your VM utilizes memory, and so on. But you rarely see people anymore arguing that programmers need to always be burdened with these details. (You used to see that argument, but it’s rare.)

A framework is an abstraction, which frees up the developer’s mind to concentrate on delivering (if not perfecting) the overall functionality of the application on time. Frameworks represent the commodification of certain development skills, which is good, because it means more can get done. But to be effective, you have to know the limits of your framework, and be able to circumvent the framework when necessary.

Which isn’t to say that frameworks aren’t without their risks. If you depend too heavily on a framework that ceases development, your entire company can freeze. (So don’t use proprietary frameworks!) If the technological landscape changes and your framework doesn’t keep up, or represents an “outmoded” way of approaching the problem, your basic skills (whether it’s SQL or Javascript or even HTML) might have softened too much to make the switch. Bad frameworks can even restrict you to less efficient solutions. But, on the whole, having fewer problems to deal with and less code to write is a good thing.

Back to James’ original reluctance, though:

[O]ffering built-in systems for automatically doing XMLHttpRequests and other effects would tie Django to a particular JavaScript toolkit, which I think would be an awful idea. Or else it would require us to maintain code in the framework for all of the popular JS toolkits, which would be an even worse idea.

All of that is true (except the “worse idea” is really the first). But that’s the responsibility you take on when you develop a framework. In
this case, if Django is a framework for developing web applications, then regardless of whatever level of Javascript knowledge web developers ought to have, the framework itself will need to provide hooks to make life simpler for everybody. Otherwise, it’s going to fail, because it will become less and less a web development framework, and the companies who use it will more and more get outclassed in user experience because their competitors are the ones spending less time writing and debugging Javascript to provide simple effects.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: