[Tutor] web frameworks

Alan Gauld alan.gauld at btinternet.com
Mon Sep 10 00:11:49 CEST 2012

On 09/09/12 20:41, Matthew Ngaha wrote:

> a very very very simple web framework would not be too much work for
> me to study once in  while. I decided on Flask because i read it's the
> simpliest framework

They nearly all claim that :-)

> supported on Python 3. i thought cherrypy, but was told it's not
> nearly as simple as Flask,

I've never used Flask but CherryPy is very easy to use if you understand 
the basics of OOP.

> simple web framework will be ideal only to understand how they work.

Web Frameworks are big and complex and designed to stop you from needing 
to know how they work. They are easy to use but hard to understand. If 
you want to know how web programming (what's behind all Frameworks) take 
a look at the cgi module and it's documentation and write a very simple 
web app. A form that you enter your name and hit submit. The app 
responds with a page that says "Welcome Matthew".
It doesn't get much simpler but it's the basis of how all Web Frameworks 
operate. Once you do that you can reproduce it in the Framework of 
choice and be amazed how much easier it is! :-).

> understand Javascript  only a little, but html and css a bit better
> etc..

You only need JavaScript when you get into real web UI design, for basic 
experiments HTML (and CSS only if you must) are ample.

> also is mod_python similar to a framework? does it perform the same
> tasks and also make good web applications?

No, mod_python is completely different. Most web frameworks will use 
mod_python under the covers but you largely don't need to know
about it. mod_python is basically a technology that works with
the web server to make launching python applications much faster.

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list