Web2py mobile app using Kivy

670 views
Skip to first unread message

Joe

unread,
Jun 1, 2015, 10:19:56 AM6/1/15
to web...@googlegroups.com
I developed a web app with Web2py. It works great, I thing Web2py is fantastic.

I want to create a mobile app from my web app and I am not sure what is the best approach.
Does anyone have any experience using Kivy? Does it work with Web2py? Or, is there a alternative solution to Kivy?

eric cuver

unread,
Jun 1, 2015, 2:04:23 PM6/1/15
to web...@googlegroups.com
good question I am also interested in the answer

Jason (spot) Brower

unread,
Jun 1, 2015, 7:36:09 PM6/1/15
to web...@googlegroups.com
The best thing to do here is abstract your interface.  Web2py does a fine job of it.
Most likely your wanting to make the app and then communicate over json objects in post requests.
With Kivy you should be able to make something pretty interesting and you can use the same skills you have learned in python there. And then QML is pretty awesome stuff.  I used to work for Qt so I would know. :)
I haven't seen Kivy in production code yet, but you can be a first. :)


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

unread,
Jun 2, 2015, 3:23:56 AM6/2/15
to web...@googlegroups.com
Thanks! So, you would recommend QT instead of Kivy? Also, can you please expand on what is the best approach, in this case, to abstract the interface with Web2py?

Leonel Câmara

unread,
Jun 2, 2015, 5:36:23 AM6/2/15
to web...@googlegroups.com
I would suggest cordova, you can use pretty much the same skills you already have, and if most of what your app does is display content it downloads from the web it's pretty much one of the best choices.

Joe

unread,
Jun 2, 2015, 7:15:56 AM6/2/15
to web...@googlegroups.com
Thanks Leonel, my app is a pretty complex interactive application to teach kids to read. I am using database, and Python code, all developed in Web2py. It seems that Cordova might not work for this app.

Anthony

unread,
Jun 2, 2015, 8:04:15 AM6/2/15
to web...@googlegroups.com, degrou...@gmail.com
On Tuesday, June 2, 2015 at 7:15:56 AM UTC-4, Joe wrote:
Thanks Leonel, my app is a pretty complex interactive application to teach kids to read. I am using database, and Python code, all developed in Web2py. It seems that Cordova might not work for this app.

You said you already have a working web2py app, so why can't you wrap it in Cordova (maybe adding some JS based UI enhancements for the mobile experience)?

You could probably use Kivy, but then you'll need to re-create the app in Kivy and would be limited to using web2py for generating a backend API called by the Kivy app (which might look quite a bit different from your current web2py app, which is generating and responding to its own UI layer).

Anthony

Joe

unread,
Jun 2, 2015, 10:00:54 AM6/2/15
to web...@googlegroups.com, degrou...@gmail.com
Thanks Anthony, yes, I have a Web2py app. So, it's possible to wrap the Web2py web app in Cordova? Then, that makes much more sense than Kivy.  I will have to look into this to try to figure out how to do it.

Gary Cowell

unread,
Jun 5, 2015, 12:26:00 AM6/5/15
to web...@googlegroups.com
This UI independence is the most important thing, actually (for me)

There's the 'Visual Basic' way of coding, where each control component will contain the business logic for the thing that happens when you press the button. I see this so often.

But better, is to have a module, or modules, that perform the business logic, interact with other web services, and have web2py call upon these module functions when UI interactions take place. In this way, you can build useful things using your business rules, from command line admin tools, to web apps using 'framework of the day', to desktop or mobile GUI apps in Kivy or anything else, and you're always leveraging your module code.

Example, I was working on a tool to interact with Amazon Web Services, cloudformation stack creation etc. Originally I built the app using pyqt, but then I switched to pyside, not a huge change there, but still.   Then I built a new UI in kivy and deployed an android version. Finally the production version I built with web2py and it's there still.  I could have used django at that point, or turbogears, or whatever (although I most like web2py for web development in python).  Point is though, I didn't have to rewrite 80% of my code each time. Just the UI parts, and learning things like ajax reloading in web2py.

This was developing the entire app on a new platform.

If I'd started with web2py, and built and deployed the first version on that platform as you have done, then any mobile development would most likely have used web services exposed by my web2py app, and interacted with those.  Seeing you already have a web2py app running, exposing some services you want to access via mobile seems like the way to do it to me.

Jason (spot) Brower

unread,
Jun 5, 2015, 2:52:04 AM6/5/15
to web...@googlegroups.com
QT is ok if you can code in c++ but kivy works in python and using qml a powerful language to create your interface.
Cordova is great if you want a webpage in your phone.  I don't like how slow it is.

Matan Ben Moshe

unread,
Oct 11, 2017, 12:49:16 PM10/11/17
to web2py-users
Hi All,

Did someone try the suggested solutions here?
Kordova or any other one?
Is it working?

Leonel Câmara

unread,
Oct 12, 2017, 12:11:36 PM10/12/17
to web2py-users
I haven't done mobile in a while. But yes I've done several using cordova/phonegap quite easily. There's no reason why kivy or others like flutter won't work well since this is all about calling webservices that are standard and work with any programming language or framework. The advantage of cordova is more that you don't have to learn yet another technology and for many apps you don't really need it.
Reply all
Reply to author
Forward
0 new messages