views:

268

answers:

3

I'm planning to write a webmail service in Python but I can't decide which framework to choose. What criteria should I look into when trying to decide which framework to use ?

A: 
  • Model View Controller separation is a nice one, though standard with most frameworks. It greatly improves code readability, separation of tasks, testability, optimization later on, and maintainability in the future.

  • The ability to utilize a templating language of your choice. This allows you to balance speed, simplicity, and extensibility according to your own needs and habits.

  • Widget library integration (e.g. to ToscaWidgets) is a bonus, providing automated server-side (and with certain add-ons client-side) validation and type coercion.

  • The framework should encourage structured projects.

  • A variety of deployment options; pure WSGI, FastCGI, etc.

Note that the frameworks (off the top of my head) that meet these criteria are quite varied:

  • WebCore (I’m biased, it’s mine. ;)
  • TurboGears (I’ve used this one a lot on previous projects; it’s pretty good!)
  • Django (I hesitate to mention this one, but it’s quite popular.)

It also depends on how low-level you want to get and how comfortable you are with the support base. WebCore and TurboGears utilize standard WSGI middleware layers and provide helpful accessors for shared features, while Django takes the “batteries included” approach. The pure WSGI approach is much easier to customize, while Django has a huge userbase.

These are a few of my thoughts, and I’ll probably update my answer as I think of more things.

GothAlice
What about web.py and pylon ? I suppose documentation is also an important issue. I guess my problem is that I don't really know what possible issues I could face writing webmail.
coder
Web.py strongly discourages structured programming and limits you to RESTful routing dispatch. Pylons, by itself, requires that you hand-pick components and almost build a stack yourself, thus TurboGears (which has picked a default stack on top of Pylons for you).Documentation is good, but not nessicary if you can wrap your head completely around the framework. ;)Webmail requires access to IMAP and SMTP libraries. There are a number of IMAP libraries for Python, and TurboMail is (I’m biased, it’s also mine) the best mail delivery framework available.You need a DB for address books.
GothAlice
A: 

I'd like to add that you might want to look at posterity (http://posterity.edgewall.org/). Even though the project is basically abandoned, I guess there is at least some interesting code.

Felix Schwarz
+1  A: 

I know you're asking about which web framework but this might be very useful to you. Lamson is a framework for dealing with email, it lets you basically write your own mail server and do all sorts of useful stuff in Python, check it out here http://lamsonproject.org/

For the framework I'd recommend Django, while you might end up replacing bits as your needs change I think you should never underestimate the value of being able to get something working really quickly. Django's admin app is absolutely incredible and saves so much time building your own admin interface, that alone makes Django the one to use in my opinion.

Thomas Parslow
Lamson has not had any updates in 4 or 5 months, and I can't find any information re. it's status. It's author, Zed Shaw, said on his blog (http://www.zedshaw.com/blog/2010-03-25.html) that he is going to be concentrating on things "related to music or the sites I create"; I am not sure what this means, if anything, for Lamson. Also, it appears that the Lamson package is being removed from Fedora "at upstream's request" (whatever that means).I really hope Lamson carries on, it's a very interesting project.
threecheeseopera