Is Web2py ill-suited for apps that heavily interact with other services?

114 views
Skip to first unread message

WhoSoLovesUs

unread,
Nov 9, 2014, 11:38:59 PM11/9/14
to web...@googlegroups.com
Hi, I'm in the beginning stages of building my app.

One of the most important things it will do is connect to 3rd party services via their APIs (e.g. Google Analytics)

I ran into a disconcerting comment on this stackoverflow thread.


web2py has many good features, but be very wary of the global environment which becomes a real pain after a short time. It makes interacting with third-party tools like test-runners very difficult. Django is much more mature, being older than web2py, and has a much larger community and number of installations.

Can anyone here comment on this? Not being a programmer myself, I need some more information about what this exactly means and why Mike would be of this opinion.

Thanks :)

Michele Comitini

unread,
Nov 11, 2014, 6:33:10 AM11/11/14
to web...@googlegroups.com
Nonsense.
The guy has never used web2py or is  involved in the other framework.
I think exactly the opposite.  Django on complex applications requires a *lot* of extra modules and it becomes difficult to update the framework.
Lots of boilerplate that wastes space in the editor windows and distracts from the real problem.
The only thing that is true is that is older, and shows all its age ;-)

mic



--
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.

Anthony

unread,
Nov 11, 2014, 12:18:29 PM11/11/14
to web...@googlegroups.com
I think there is a confusion between third party services and third party tools. web2py has absolutely no problem accessing third party APIs (such as Google Analytics), and this will be exactly the same as you would handle things in other frameworks. The comment you found on SO has nothing to do with accessing external APIs. Instead, it refers to some complications that arise specifically when using third party unit testing tools due to the way web2py executes application code. In any case, that comment vastly overstates the difficulty. There are several recipes and existing libraries for doing testing in web2py, and once you understand how it works, it is not difficult to deal with (though admittedly not quite as straightforward as testing in other frameworks). Of course, there are many other areas in which web2py will make your life much easier.

Anthony

joseph simpson

unread,
Nov 11, 2014, 9:05:45 PM11/11/14
to web...@googlegroups.com
Anthony:

Would you be willing to share specific information about web2py testing approaches.

I plan on starting a web2py project early next year and would like to use a TDD approach.

What do you suggest?

Have fun,

Joe

--
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.



--
Joe Simpson
"All that is gold does not glitter,
Not all those who wander are lost;
The old that is strong does not wither,
Deep roots are not reached by the frost."  J. R.R. Tolkien

Anthony

unread,
Nov 12, 2014, 9:47:26 AM11/12/14
to web...@googlegroups.com
The "Background" section near the end of this post explains the general issue with unit tests. The rest of the post describes one possible approach, which is to use web2py to create the standard environment but change the way unit tests are executed.

Another approach is to run the unit tests as normal, but create a fake environment within the test setup. This approach is used by the web2py Test Runner module.

Here are a couple of examples for implementing testing:
https://github.com/viniciusban/web2py.test
https://github.com/niphlod/welcome_augmented

Also, web2py itself includes a basic functional testing module, described in the book: http://web2py.com/books/default/chapter/29/14/other-recipes#Functional-testing.

Anthony
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

joseph simpson

unread,
Nov 12, 2014, 11:07:15 PM11/12/14
to web...@googlegroups.com
Thanks for the clear and complete reply..

Have fun..

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.
Reply all
Reply to author
Forward
0 new messages