Webdev: the times, they are a changin'

Richard Esplin richard-lists at esplins.org
Tue Apr 17 16:00:38 MDT 2012

Thoughts below.

On Monday April 16 2012 21:45:39 Joshua Marsh <joshua at themarshians.com> wrote:
> I think there is a big difference between a programming language (PHP) and
> a web framework (Django). It's really easy to transfer from something like
> C to PHP because you can write junk like:
> echo "<html>...</html>";
> Sure you'll be done in a few hours, but it will be much more complicated
> for anyone else who didn't write it to manage it. Web frameworks like
> Django try to solve the problem by forcing you into a MVC framework. It
> would be more accurate to compare Django with something like Zend. I was
> doing PHP for years when my company decided to use Zend for one of our
> apps. It was a nightmare for months until we all got used to how to use it
> properly. Web frameworks have a steep up front learning curve, but if you
> are doing it regularly, it may be better in the end for you and for the
> person who takes over after you.

I want to expand on the point about how a CGI style web application differs from a web framework.

It is true that web frameworks require additional upfront learning, so it is important to keep in mind what you are getting for that effort. A good web framework will teach you standard ways of solving important problems in the web domain such as security, scalability, localization, data persistence, and session management. If your application has much complexity and you do not leverage a web framework, you will end up rolling your own solutions and likely make mistakes. You will do just as much learning, but it will be over time and through trial and error. Your code will not follow common patterns and be hard for maintainers to adapt.

It is like learning GUI programming instead of doing all user interface on the console. High level API's have a cost, but they bring additional productivity and fewer mistakes.

Once you are familiar with one modern web framework, learning another one will be quick. But if you are not familiar with the concepts of web development, it will take some time to absorb the architectural principles.

If I am solving a small need for an internal team, throwing a CGI style script together with Cherry.py is quick and makes a lot of sense. But if I am building something to live on the wild Internet, I want to use a framework that will help me avoid making the common mistakes.

BTW, I've spent lots of time building on top of Django and Drupal. I get smarter each day I use Django. I can't say the same about Drupal.


More information about the PLUG mailing list