devork

E pur si muove

How to choose a web framework?

Wednesday, August 01, 2007

So I have a bit of organically growing information that is nice to represent on internal web pages in a semi-organised fashion. The first iteration just runs a few python scripts from some cron jobs that utilise SimpleTAL to create staticly served pages. SimpleTAL as templating language simply because we also use roundup as issue tracker and keeping the templating language the same seems like a sensible thing to do for a multitude of reasons. But as the number of pages grows and more and more features wanting cgi, e.g. to trigger a software build instantaniously instead of waiting for the next nightly cron job, creep up this seems like the right point to move to a proper framework that will make maintenance, organisation and code reuse a lot easier.

Only, how to choose? It seems to me that the current Python web framework world changes drastically every 6 months. And really, that's just plain annoying. I don't want to worry about an upgrade of the codebase in a few months time, whether because there's a newer version of the framework or it's simply not the hip way to do stuff in the flasy web 2.0 world and hence is left to die.

Django has been in the 0.9x releases for as long as I can remember, every time I looked as some of the docs they seemed to say "Don't use the lastest release as the svn repo is a lot cooler." Not very inspiring. It also seems a pretty steep jump from the so very light weight infrastucture currently in use, it is a big (but seemingly beautiful I admit) beast.

The turbogears approach of taking best of breed applications has always attracted me. Alas that does not seem to go hand in hand with the requirement to remain stable as the 2.0 announcements seem to prove. Although they do seem to promise 1.x continuity and easy 2.0 upgrade path.

I have formed no thoughts yet about pylons other then that it can't be that bad as turbogears 2 is going to use it, but I can say that paste has a nice paragraph right on the first page:

There's really no advantage to putting new development or major rewrites in Paste, as opposed to putting them in new packages. Because of this it is planned that major new development will happen outside of Paste. This makes Paste a very stable and conservative piece of infrastructure for building on. This is the intention.

Maybe I should check out their do-it-youself-framework...

Finally, did I mention zope just has way too much overhead? (I considered using a short script to compare all the dependencies of these packages in Debian, but it's too late at night...)

So, who in this web2.0-happy world is a stable building block for your web requirements? Seems a scary world.

Wednesday, August 01, 2007 | Labels: |

4 comments:

Anonymous said...

I use Webware. It gives me Request/Reponse objects and I'm happy to do the rest.

It's not as a sexy, but I'm not a web programmer. As such, I don't grok templating languages, javascript support libraries, I don't have mysql installed and I don't want to. If you just want to control the content of a web page, it's not a bad way to go. Then again, you can always just stick with CGI which is also not that hard.

I tried TurboGears and Django, but the documentation runs out pretty quickly if you are tackling a major project. As such, I prefer to DIY such things. Templates are really not that hard to write in Python.

Cheers,
-T

Anonymous said...

Zope 3 is pretty different to zope 2, so you might want to check that also. Although it can still take you a lot to learn it. Maybe grok (a RoR-like aproach to developing apps on z3) might help with that.

Ville said...

Just pick TG or Django, nevermind the size. You don't have to learn the whole thing (in fact what you do need to learn is trivial), and you'll have the full framework to build on if/when your requirements grow.

Don't underestimate the size of the community either.

Today, I'd probably pick django, mostly because it seems to have more buzz and I have already done a project in TG so learning a new one would be fun. :-)

Kevin Dangoor said...

Granted, I'm biased... but if your app has any serious database requirements, I'd make sure you can easily use SQLAlchemy with whatever tools you use. It is easily the best ORM I've seen.

TG2 does indeed break backwards compatibility, but like you said... the upgrade path is pretty easy. Web tools are still in a phase where they're changing rapidly as people come to grips with all of the new power browser-based apps have now. If the choice is stagnation over making some breaks in compatibility, I'd certainly go for the latter.

New comments are not allowed.

Subscribe to: Post Comments (Atom)