Downside / Critique of web2py

206 views
Skip to first unread message

43gm

unread,
Nov 28, 2008, 2:05:43 AM11/28/08
to web2py Web Framework
I have done my research, and have a good impression of web2py. When I
read articles on the net, I am amazed at the earnest effort of the
web2py creator to add his comments especially when are there are
reviews and opinions comparing various frameworks.

Here I would kindly like to request a honest critique of web2py: the
limitations, the gotchas, the downside. No software is perfect, and it
would be wonderful to know the pros and cons before making a major
investment of time and development using a particular tool.

I have tried to find info regarding how web2py scales in real
situations (not in theory). The reply might be that it scales as good
as Google, pointing to the reddit clone at GAE http://web2py.appspot.com
-- however, I wondered out loud when I got a ticket for some
"unrecoverable error." What are the largest sites that *truly* depend
on web2py? [This would address the "enterprise" part to the web2py
slogan.]

The type of critique sought is not a list of bugs -- one can see those
on code.google and launchpad. What is structurally annoying, what gets
annoying as a project grows in complexity, is the ORM really efficient
at large scale, etc. -- the big annoyances.

Viewed in another manner: in what areas should web2py be improved?

Thanks very much for your candor. Look forward to your replies...


mdipierro

unread,
Nov 28, 2008, 9:46:12 AM11/28/08
to web2py Web Framework
Hi 43gm,

if I understand your email you are seeking critiques form other users.
You are particularly interested in potential scalability problems. did
I understand?

If I do I would rephrase your request into the following explicit
questions to the users:

1) did you experience any scalability problems with web2py?
2) How large did you scale it?
3) What are the features that you believe are missing in web2py and
you would like to see in future versions?
4) How does it compare do other web frameworks that you have used?"

You also express one critique about the use of the word "enterprise"
in the name. That is explained here
http://mdp.cti.depaul.edu/AlterEgo/default/show/166

You can also find a comparison of features between web2py and other
frameworks here:
http://mdp.cti.depaul.edu/examples/static/web2py_vs_others.pdf

Massimo


On Nov 28, 1:05 am, 43gm <43gr...@gmail.com> wrote:
> I have done my research, and have a good impression of web2py. When I
> read articles on the net, I am amazed at the earnest effort of the
> web2py creator to add his comments especially when are there are
> reviews and opinions comparing various frameworks.
>
> Here I would kindly like to request a honest critique of web2py: the
> limitations, the gotchas, the downside. No software is perfect, and it
> would be wonderful to know the pros and cons before making a major
> investment of time and development using a particular tool.
>
> I have tried to find info regarding how web2py scales in real
> situations (not in theory). The reply might be that it scales as good
> as Google, pointing to the reddit clone at GAEhttp://web2py.appspot.com

Robin B

unread,
Nov 28, 2008, 10:51:18 AM11/28/08
to web2py Web Framework
> 1) did you experience any scalability problems with web2py?

More of an efficiency problem: web2py's exec magic means models, views
and controllers are read, parsed and compiled for every request on
GAE.

> 2) How large did you scale it?

Not large

> 3) What are the features that you believe are missing in web2py and
> you would like to see in future versions?

Models, Views and Controllers as classes, so you can mixin new
behavior without copy-paste
Environment modes (development, testing, production)
Better plugin semantics (versioning, dependencies)
Use WSGI middleware to customize applications (caching, routes,
exception handling)
Fix template nesting bug
Named routes, RESTful routes
MVC caching

> 4) How does it compare do other web frameworks that you have used?"

Web2py is the most productive and thanks to GAE most scalable
framework I have seen, but making web2py more productive requires
changes that break backwards compatibility, so you need version 2.0 or
a new framework...

Robin

On Nov 28, 8:46 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> Hi 43gm,
>
> if I understand your email you are seeking critiques form other users.
> You are particularly interested in potential scalability problems. did
> I understand?
>
> If I do I would rephrase your request into the following explicit
> questions to the users:
>
> 1) did you experience any scalability problems with web2py?
> 2) How large did you scale it?
> 3) What are the features that you believe are missing in web2py and
> you would like to see in future versions?
> 4) How does it compare do other web frameworks that you have used?"
>
> You also express one critique about the use of the word "enterprise"
> in the name. That is explained herehttp://mdp.cti.depaul.edu/AlterEgo/default/show/166

mdipierro

unread,
Nov 28, 2008, 10:58:56 AM11/28/08
to web2py Web Framework
Hi Robin,

These are the number I get in one of my test:

http://mdp.cti.depaul.edu/AlterEgo/default/show/131

There should be a way to cache the bytecode compiled models/views/
controllers on GAE. It will be implemented soon.

Massimo

mdipierro

unread,
Nov 30, 2008, 6:41:46 PM11/30/08
to web2py Web Framework
1) point made by Robin has just been fixed in trunk. Now bytecode
compiled models views and controllers are cached in RAM on GAE.
This means a speedup of 10x or better.

Massimo

On Nov 28, 9:51 am, Robin B <robi...@gmail.com> wrote:

Timothy Farrell

unread,
Dec 1, 2008, 10:00:43 AM12/1/08
to web...@googlegroups.com
1) did you experience any scalability problems with web2py?

None, but I foresee some maintenance issues concerning the template system.  This complaint of mine isn't specific to web2py but fundamental to all text-based templating systems.  Try to read some of the templates.  IMHO, they are like reading PERL.  Difficult to understand at a glance.  For this reason, I use Genshi templates to great effect.

2) How large did you scale it?
About 10k hits per day so far.

3) What are the features that you believe are missing in web2py and
you would like to see in future versions?
Before I list mine, I'd like to note that web2py is much more powerful than it comes off as originally.  Like JavaScript, it's so flexible that it's easy to forget what you can do with it.  Some of RobinB's feature requests fall under this.  (As in, you can already do a form of them but it's not obvious or not well documented without buying the manual).

I would like to see in web2py:
- unittests! web2py already has as certain battery of functional tests, but I would like for it to adopt Storm's mentality of "an untested line of code is a bug."
- DAL and HTML helpers that don't rely on an auto-incrementing integer id column
- configurable admin availability (like set an ip/netmask to make it available to)
- better MVC separation with the HTML helpers (this one is kinda purist of me though)
- application inheritance - allow one application to automatically have the models and views of it's "parent" available to it without having to copy-paste models
- Quite a few source code cleanups that wouldn't affect the average user. (PEP 8 compliance, spelling fixes, better organization etc.)
- More validators
- A better, faster editor would be nice.  Editarea, the editor in the Admin interface is slow with large files.  There has been much talk over the Amy editor, but that's slower than Editarea and development on it has all but frozen.  I haven't found my ideal Ajax code editor yet.  Maybe I'll make one.
- Use the cgitb module for tracebacks in tickets, they are extremely helpful, but not compatible with the DAL for some reason (I haven't looked into this).

Having said that, these are all on my todo list.  As in, given enough time, I will submit patches for all of them.  It's just a matter of time.

4) How does it compare do other web frameworks that you have used?"
Frankly, I haven't used any other true frameworks.  I used Cherrypy alone for a while.  But I hit a brick wall when 3.1 came out and my app broke.  The documentation describing the changes in the new version were so meager that I couldn't fix my app easily.  I got on IRC and the guys there were not helpful.  Instead I switched to web2py which has a very nice manual and a very helpful community.  I've also used FormEncode for some of my data validation. That, like Cherrypy, broke compatibility (and my webapp) when it moved to version 1.1.  I have yet to move that code over to using web2py's validators but it will come.  There is a lot to be said for Massimo's commitment to preserving backward compatibility.

It seems to me that most of the questions on the list are about using the DAL.  It could be that data abstraction is more complicated than other matters of using web2py, but perhaps the DAL could be reorganized to be more clear for what's going on.  This, of course, would break backward compatibility and therefore must wait for the next major version.  I would like to see some things be more clear like changing db.tablename.drop() to db.drop('tablename') since drop is a database function not a table function.  That's just one example, but now I'm nitpicking.

All-in-all, I believe web2py is the best framework out there.  I'll summarize why I didn't go with the other major frameworks:
- Django: It's not flexible enough for me.  I'm making a true web-application (not just a blog) and that takes more effort in Django than I think it should.
- Turbogears: TG1 is too old with Kid and SQLObject and too hackish if I wanted to use Genshi and SQLAlchemy with it.  TG2 isn't stable enough yet for me to consider it.
- Pylons:  Pylons is the Java of Python web frameworks.  There is just too much boilerplate code.
- Spyce:  I like/want MVC model development, not the old PHP/ASP-style logic-in-page model.
- Roll-your-own from components: too much work, plus I wanted a community to go to rather than 10 communities.

Cheers,
-tim
-- 
Timothy Farrell <tfar...@swgen.com>
Computer Guy
Statewide General Insurance Agency (www.swgen.com)

Jonathan Benn

unread,
Dec 2, 2008, 8:01:23 AM12/2/08
to web2py Web Framework
Thanks for the great post, Timothy. You've made me feel good about my
decision to use web2py!!

I can't believe that CherryPy and FormEncode would break backward-
compatibility after only a minor version number change. That's not
acceptable for a library. I mean look at Python. It has a million
cludgy hacks in it at this point, but these are necessary to maintain
compatibility until the next major revision. And in fact, the next
major revision will come with an automatic transfer script that will
fix your old code.

Following Python's example would be my suggestion for web2py over the
long term. This way web2py can change it's API on rare occasions, and
still claim that it will never break backward-compatibility. ;)


And Massimo: thanks for that awesome cache speedup on GAE, I will
really appreciate that when my site goes public. :-D

--Jonathan

43gm

unread,
Dec 4, 2008, 3:20:18 PM12/4/08
to web2py Web Framework
Talking with some python veterans (mainly SQLalchemists ;-), their
critique of web2py was summed in two words, "exec magic." In practical
terms, what does this mean... in terms of performance hits (at N
requests/sec), inefficient CPU / resource consumption, etc. ?

And ditto for MVC caching...

In general, how does one test a site under heavy usage conditions?


__ Thanks to Robin B for her insightful comments

She mentioned: "making web2py more productive requires changes that
break backwards compatibility."

The time for a major web2py revision could coincide with python 3.0 --
Guido in http://bit.ly/py3k mentions a lot things which will break
anyways without code modifications. Also see his remarks re exec.

Re critique: "Use WSGI middleware to customize applications (caching,
routes, exception handling)"

Why did you choose web2py over pylons?


__ Thanks to Massimo fixing the compiled pyc problem for GAE

At http://bit.ly/web2py-cloud he has expressed his willingness to
support SimpleDB which will great for computing on the Amazon cloud.


__ Thanks to all other members for your detailed responses.


PERMALINK for this thread at this web2py group:
http://bit.ly/web2py-critique

mdipierro

unread,
Dec 4, 2008, 4:19:34 PM12/4/08
to web2py Web Framework
Some answers below:

On Dec 4, 2:20 pm, 43gm <43gr...@gmail.com> wrote:
> Talking with some python veterans (mainly SQLalchemists ;-), their
> critique of web2py was summed in two words, "exec magic." In practical
> terms, what does this mean... in terms of performance hits (at N
> requests/sec), inefficient CPU / resource consumption, etc. ?

http://mdp.cti.depaul.edu/AlterEgo/default/show/131

> And ditto for MVC caching...

http://groups.google.com/group/web2py/browse_thread/thread/cab9ef6e60e535e2

obviously results depend on the complexity of the page but bottle neck
is always database access.

> __ Thanks to Robin B for her insightful comments
>
> She mentioned: "making web2py more productive requires changes that
> break backwards compatibility."

Robin! Anything you want to correct?

> The time for a major web2py revision could coincide with python 3.0 --
> Guido in http://bit.ly/py3kmentions a lot things which will break
> anyways without code modifications. Also see his remarks re exec.

none of the database drivers work with pyhton 3.0 because of the
unicode issues. Once the respective authors port the drivers - and
this will take long long time - it takes a week to make web2py work
with 3.0 because it is already almost 100% compliant. It may break
backward compatibility. Let's talk again about this next year.

> Re critique: "Use WSGI middleware to customize applications (caching, routes, exception handling)"
>
> Why did you choose web2py over pylons?

You can use many wsgi plugins with web2py. we do not use any because
the current implementation is cleaner and faster and bug free.
Moreover in order to promise backward compatibility we cannot depend
on third party packages.
Compare the size of pylons with the size of web2py to achieve the same
tasks.

http://mdp.cti.depaul.edu/examples/static/web2py_dependency_graph.pdf

Massimo

Reply all
Reply to author
Forward
0 new messages