Web and mobile app with Django? Kivy? sth else?

2,771 views
Skip to first unread message

Mariusz Wilk

unread,
Nov 21, 2014, 2:56:38 PM11/21/14
to django...@googlegroups.com
I'm new to programming. Eventually, I'd like to make a website and an android/ios app that would work together and display pretty much the same content on a mobile as on the the web. Each client would log in (via mobile or desktop) and continue solving some exercises from the place he previously finished at. I have a potential client for this app, I don't have any deadline and if it works fine I shouldn't have any problems selling it to him and getting some commercial experience! So my question is: what should I be learning to eventually reach this goal? I've done a few Python tutorials/courses online, I played around with HTML, CSS and JS, right now I'm learning Kivy. Django scared me a lot, but maybe I should give it another try.

Collin Anderson

unread,
Nov 24, 2014, 1:37:12 PM11/24/14
to django...@googlegroups.com
Hi,

Django can do all of those things except the native android/ios apps. Django specializes in websites and especially helpful for handling things like logging in, querying a database, processing form input, and generating html.

Here are some ways Django can help with your situation:
You could build native android/ios apps and use Django for the server side of your app, like how Instagram does it. You could handle the desktop side as a website made with Django. If you really wanted low-cost-maintenance, you could have your android and ios apps just be simple wrappers around a webview that's loading content from Django.

Collin

Fred Stluka

unread,
Nov 24, 2014, 6:27:59 PM11/24/14
to django...@googlegroups.com
+1 for writing a single RWD (Responsive Web Design) web app
using Django, instead of writing separate web, Android and iOS
apps.

If necessary, wrap the result in PhoneGap to mobile-specific
features, uploading images from the camera, capturing the
GPS location, showing maps, accessing the local file system
and contacts, etc.  But only if you need those features.

My current project uses RWD techniques to look good on
phones, tablets, and full screens.  Lots of jQuery, Ajax, HTML5
and CSS3 for a rich user experience.  Drag any of the pages
wider or narrower to see what I mean:
- http://helphopelive.org

--Fred
Fred Stluka -- mailto:fr...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e4e4ed98-407b-41c1-841c-0d91eb70de7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Cal Leeming

unread,
Dec 3, 2014, 12:56:17 AM12/3/14
to django...@googlegroups.com
Hi Mariusz,

Short answer - Hack something together in the fastest way possible, don't worry about it being clean, tidy or even tested. Because if you do, you'll still be working on this project in 2 years time... Look at using something like PhoneGap [8], just enjoy the experience and ship it :)

If you genuinely want to start learning this stuff, you need to ask yourself what it is you want to work on? Do you want to do backend (e.g. all the server stuff, nothing visual), or do you want to do frontend (all the visual/pretty stuff the user sees), or both? Are you doing this for immediate financial gain [7], or a spiritual journey of self discovery and learning [6]? The world of web dev is changing almost every couple of months, stay on top of your game by reading blog articles from other developers and keeping on top of tech new. Personally I use Feedly [9] to aggregate these feeds into one place. Consider getting an internship somewhere with other good programmers, learning from inspirational people will speed up your personal development massively (I wish someone had told me this 8 years ago).

Long answer;

Responsive/adaptive design does not necessarily make a good mobile experience, and rarely will you find a mobile app which has the same workflow as the website. Ideally you need to storyboard each experience and wireframe the UX accordingly. Likewise with the UI, colors and sizes which work well on desktop often won't work very well on mobile/tablet (especially if you are designing your desktop site mostly towards PC users, due to the variations in color display).

There are tools out there now which allow you to package up your HTML/JS/CSS/images into a native application bundle, meaning you don't have to learn how to write native applications. There are a whole bunch of these products out there [1], but most of them suck, here's why. Building a client side JS application is *hard*, you have to understand the different JS design patterns in order to write clean and stable code, whilst understanding the importance of unit testing [3] and real browser testing [4]. You also have to understand the impact of latency, if you don't compile your assets into a local bundle (instead opting to just wrap a browser window in an IOS app), then your app experience will lag between clicks (because each click is a page load). To get around this you need to build your client side app to be completely independent of the server side, which includes maintaining a view state (e.g. changing/rendering the display upon changes being made). Other libraries exist for doing this such as Ember [5] and others, but they are still quite alpha and have performance concerns too. Also in regards to bundling, there are very few tools out there which will automate this entire process, for example creating a spritesheet of UI images so you don't have to make multiple HTTP asset requests, or embedding the images as base64 in your stylesheet (although that has render performance concerns).

Then you also have the API, building a clean RESTful api is difficult and in actual fact may be the wrong approach for your mobile app.. why? Because each API call has a lot of overhead, and this usually results in UI latency if the user has poor signal. There is some work being done to use websockets instead of ajax calls, but this starts to get into quite deep territory.

Gonna cut this short, as I try to limit myself to 30 minutes on any given reply. Again don't worry too much about what I've put in the long answer, that's just there to give you some insight into the things you'll start thinking about as you get deeper into your journey.

Hope this helps dude

Cal

[1] Google search for "app maker iphone"



On Fri, Nov 21, 2014 at 2:56 PM, Mariusz Wilk <szosta...@wp.pl> wrote:
I'm new to programming. Eventually, I'd like to make a website and an android/ios app that would work together and display pretty much the same content on a mobile as on the the web. Each client would log in (via mobile or desktop) and continue solving some exercises from the place he previously finished at. I have a potential client for this app, I don't have any deadline and if it works fine I shouldn't have any problems selling it to him and getting some commercial experience! So my question is: what should I be learning to eventually reach this goal? I've done a few Python tutorials/courses online, I played around with HTML, CSS and JS, right now I'm learning Kivy. Django scared me a lot, but maybe I should give it another try.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Mariusz Wilk

unread,
Dec 5, 2014, 2:03:29 PM12/5/14
to django...@googlegroups.com, c...@iops.io
Thanks for your advice! 
PhoneGap uses JS, HTML and CSS. Is there any way I could do this in Python or would it be unneccessarily complicated since maybe there's no PhoneGap-type-of-framework for Python?

Cal Leeming

unread,
Dec 5, 2014, 3:45:50 PM12/5/14
to Mariusz Wilk, django...@googlegroups.com, Cal Leeming
You *could* write your JS/HTML in Python using a preprocessor such as pyjs [1] or markup [2], but I'd *strongly* recommend against it.

This is mainly because of added complexity, you cannot guarantee your generated code will be optimized and you will most likely encounter weird edge cases, parser bugs or even outright incompatibility. The amount of people using this approach will also be very minimal, so you're locking yourself into a way of doing things which isn't "industry standard". This might be an interesting dev/research/hobby project, but probably not suitable for production (imho).

Russell Keith-Magee

unread,
Dec 6, 2014, 3:19:30 PM12/6/14
to Django Users
Hi Mariusz,

It depends how many sharp edges you're willing to live with. I've been working on a project to allow users to develop native mobile apps in Python:

http://pybee.org/toga/

It's *very* early stage though - nothing close to production ready. There isn't even really a tutorial for mobile development. 

I hesitate mentioning it at all, other than to point out that it is *possible*, and I'm looking into the space at the moment.

Yours,
Russ Magee %-)

graeme

unread,
Dec 6, 2014, 4:19:18 PM12/6/14
to django...@googlegroups.com
If you want to do everything in Python (which I like to) my choices would be Django for the backend, Kivy for the mobile apps, and Django Rest Framework to provide APIs for the mobile apps.

If you want to keep it simpler maybe a responsive web design will be enough, so you only need Django, HTML, CSS and JS.

Using a JS framework on the front end (e.g. JQuery) also makes your life simpler.

I can understand Django looking scary at the start, but remember that there is a lot of documentation because Django does a LOT, and that makes your life easier. Learning Django may look difficult, but it is less effort than all the work it saves you.

djangocharm2020

unread,
Jul 10, 2015, 1:27:01 AM7/10/15
to django...@googlegroups.com
Hi Gra
I noticed your comment Im using django but want to used Kivy do you have any tips on how to install it on windows its a pain in the butt

thanks
Robert
Reply all
Reply to author
Forward
0 new messages