Web2py is "Badly designed framework" and "Does not scale"

425 views
Skip to first unread message

Matheus Cardoso

unread,
Jul 15, 2015, 1:20:11 PM7/15/15
to web...@googlegroups.com
In Slant.com we have some Python Frameworks under criticism. One of them is web2py. But I got stunned when I saw two great cons:

- Badly designed framework
- Does not scale

The last one it concerned me more because was Rocha Bruno, a former web2py contributor (i guess), that said that. What you guys have to say about it. Are they are real two cons? Where truth and where is misconception?

Anthony

unread,
Jul 15, 2015, 1:30:05 PM7/15/15
to web...@googlegroups.com, matheu...@gmail.com
I don't see where the second con is attributed to Bruno - no source is listed for that one.

António Ramos

unread,
Jul 15, 2015, 1:54:13 PM7/15/15
to web...@googlegroups.com
Look in the right side  under activity .
You will see Bruno saying  it...

Am i wrong too ?

2015-07-15 18:30 GMT+01:00 Anthony <abas...@gmail.com>:
I don't see where the second con is attributed to Bruno - no source is listed for that one.

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Anthony

unread,
Jul 15, 2015, 2:11:17 PM7/15/15
to web...@googlegroups.com, ramst...@gmail.com
On Wednesday, July 15, 2015 at 1:54:13 PM UTC-4, Ramos wrote:
Look in the right side  under activity .
You will see Bruno saying  it...

Got it -- that is not visible in the mobile view.

Massimo Di Pierro

unread,
Jul 15, 2015, 3:01:18 PM7/15/15
to web...@googlegroups.com, matheu...@gmail.com
I posted a short rebuttal of those two negative points. It would help if somebody but me were to post sone positive comments. No need to target negative comments. Target prospective readers who may now know what web2py is.

Anthony

unread,
Jul 15, 2015, 3:10:48 PM7/15/15
to web...@googlegroups.com, matheu...@gmail.com
On Wednesday, July 15, 2015 at 1:20:11 PM UTC-4, Matheus Cardoso wrote:
In Slant.com we have some Python Frameworks under criticism. One of them is web2py. But I got stunned when I saw two great cons:

- Badly designed framework

Globally defined variables,

There are a small number of core API objects that are available in the web2py execution environment (i.e., models, views, and controllers). This avoids the need for a lot of boilerplate import code for widely used objects. There is no explanation as to why this should be considered "bad" or what problems it causes.

no real object-oriented design

This is obviously false, as most of the framework follows an object oriented design. Even if it were true, though, there is no explanation as to why that would therefore qualify as bad design (e.g., some frameworks take a more functional approach, which can also be good design).

and basically everything is all over the place.

Hard to respond to such a vague claim with nothing to back it up.

The source article cited raises some additional concerns, most of which are incorrect or overblown:

web2py doesn't support unit testing

It does, though does take a little extra setup work to make it work with models and controllers. This is a legitimate criticism, though much easier to overcome than implied in the article.

The error message for a syntax error or coding errors in web2py is ambiguous (try doing a mistake in the model) that's because web2py takes your code and merges it into larger file to run

This is incorrect. Perhaps the author is referring specifically to view templates, which are first converted to Python code -- when there is an error, the ticket shows the Python code, not the original template code, but this can actually make debugging easier because it is easier to see the structure of the code that was executed (and it is usually not difficult to find the associated line in the original template).

In development mode this is a headache, I really need to see the error instantly and not to see a ticket number!

While this is true, there is an easy workaround.

but remains the way you define the tables and fields a completely functional (not OO)

It's true that web2py does not have an ORM, and you do not define models by creating a Python class. However, the author fails to explain why the class-based approach is superior. Most of the functionality you would get with an ORM class you can also achieve with the DAL's virtual fields, table methods, and other functionality.

web2py has really poor IDE support and you cannot use standard python development tools without modifications

This is a legitimate criticism, though overstated, as there are workarounds to allow web2py to work with such tools (and several IDE's come with built-in web2py support).

- Does not scale

I think Bruno is conflating scalability and efficiency. Scalability refers to the ease with which an application can be made to serve more requests by simply adding more hardware resources. In that regard, it is just as easy to scale web2py as any similar type of framework. So, web2py does indeed scale.

On the other hand, efficiency refers to the number of requests that can be served with a given amount of hardware resources. What Bruno probably meant is that web2py is not as efficient as other frameworks, in that it requires more time per request. This might be true out of the box, as web2py automatically includes some functionality (such as sessions) that is optional in other frameworks, and web2py must read model and controller files on every request. However, it is possible to optimize web2py code by bytecode compiling the app, moving most logic to modules, using lazy tables, caching, etc. Even after such optimizations, I suspect web2py will not be the fastest framework around, but for real applications involving databases (as opposed to idealized benchmarks), it probably won't be far off.

Anthony

rochacbruno

unread,
Jul 15, 2015, 7:36:18 PM7/15/15
to web...@googlegroups.com

Alex

unread,
Jul 15, 2015, 10:37:57 PM7/15/15
to web...@googlegroups.com
I never understood why ORM should be better than the DAL. Actually I think it's the other way around. I worked with ORM for years and I'm really happy I can now use only DAL. It's very easy to get performance problems with ORM when all references are automatically fetched, and then those references can trigger even more selects for their own references and so on... Usually we ended up to manually generate our selects and then just fill in the class instances. This approach can be done with DAL as well (and it should be much easier) - if someone needs entities.

Michele Comitini

unread,
Jul 16, 2015, 6:28:48 AM7/16/15
to web...@googlegroups.com
Added my 2¢ .  
I have many mission critical, emedded or huge projects on web2py, they make real work for real people.

2015-07-16 4:37 GMT+02:00 Alex <mrau...@gmail.com>:
I never understood why ORM should be better than the DAL. Actually I think it's the other way around. I worked with ORM for years and I'm really happy I can now use only DAL. It's very easy to get performance problems with ORM when all references are automatically fetched, and then those references can trigger even more selects for their own references and so on... Usually we ended up to manually generate our selects and then just fill in the class instances. This approach can be done with DAL as well (and it should be much easier) - if someone needs entities.

--

António Ramos

unread,
Jul 17, 2015, 12:26:48 PM7/17/15
to web...@googlegroups.com
As AngularJS died to reborn in this rapidly changing web world, i think web2py should also born again.


I see myself using web2py as a rest API, coding more and more with javascript and less with python and i dont like it!

It feels so "UGLY"

When will we have web2py with new "batteries" included ?



Regards
António


Richard Vézina

unread,
Jul 17, 2015, 12:41:43 PM7/17/15
to web2py-users
Massimo has done W3, and I think it should a per app to use a JS lib like angular of ractive...

Should web2py-next becomes something like web2py-brython (http://www.brython.info/)?

Richard

eric cuver

unread,
Jul 19, 2015, 11:10:19 AM7/19/15
to web...@googlegroups.com
can we use  brython with web2py ?

Anthony

unread,
Jul 19, 2015, 12:04:11 PM7/19/15
to web...@googlegroups.com, amihaco...@gmail.com
On Sunday, July 19, 2015 at 11:10:19 AM UTC-4, eric cuver wrote:
can we use  brython with web2py ?

Sure. Brython simply generates Javascript code that then gets executed in the browser, so you can use Brython with web2py in the same sense that you can use Javascript with web2py.

Anthony

António Ramos

unread,
Jul 19, 2015, 12:17:11 PM7/19/15
to web...@googlegroups.com
web2bry!

--

eric cuver

unread,
Jul 20, 2015, 2:14:45 AM7/20/15
to web...@googlegroups.com, amihaco...@gmail.com
thank you, I tested it works very well with web2py
Reply all
Reply to author
Forward
0 new messages