Web2Py: a python web framework we like

At Gioorgi.com we have used plenty of web frameworks.

Giovanni Giorgi used Seaside,  a lot of PHP frameworks, Java Struts, RubyOnRails, and Python Django.

We have started to look for Web2Py, a compact,  easy to learn  python web framework.

From the most notable feature, it runs also on Google App Engine.
Written by an Italian University professor for teaching web development, spots a very clean design, and a robust security infrastructure.
We  suggest it because installation (and upgrading) is a snap.

Let’s take a look to it…

On Web2Py’s Tutorial page we read:

Programming web2py is as easy as programming Rails but, if you do not know Python nor Ruby, web2py is easier to learn than Rails.

What is most important is that web2py requires much less code than J2EE equivalent or PHP equivalent, while enforcing a vary good and safe programming style.
web2py prevents directory traversal, SQL injections, cross site scripting, and reply attack vulnerabilities.

web2py manages session, cookies and application errors for you. All application errors result in a ticket issued to the user and a log entry for the administrator.

Web2Py rocks also for these reasons:

  • Is easy to set up  (self-contained)
  • Is very easy to download and install new applications. It is also easy to update them from the web
  • It retains a lot of Django‘s philosphy, which we think is it a very good thing
  • Minimal Unit Testing is encouraged by the admin interface. It is easy run the well-known python  “docstring” tests.

Conclusion: There is no silver bullet

It is impossible to say “X is the Best Framework”, because every framework has its own strength and weakness.

Jakarta Struts for instance is good because everything is configured on its XML Files. No conventions at all.
You can change all your team with other struts-guy in a snap, and you will lose little time, compared to other solutions (like Django).

But Jakarta Struts is very boring, and you need at least a week to get started.

Django is nice, but its logic is a bit obscure, because of a lot of automatic feature built-in.
Web2Py is well balanced: you can start working on it with little knowledge, and it can grow with you.

2 Replies to “Web2Py: a python web framework we like”

  1. How would you compare web2py to Seaside? I've used web2py in a couple projects and really enjoyed working with it, but am interested in trying out Seaside.

  2. Hi, i have used seaside years ago., so forgive me if I am a bit "outdated".

    Seaside is very strong because of the continuations.

    With continuations, it is very easy on Seaside to define a callback on a button: the MVC model is very nice.

    Web2Py/Django haven't this feature, but they have a very good object relational mapping, which sometimes is more userful.

Leave a Reply