Converting django app to iPhone app

50 views
Skip to first unread message

Larry Martell

unread,
Apr 22, 2019, 9:19:48 AM4/22/19
to django...@googlegroups.com
Has anyone here every taken a django web app and converted it to an
iPhone app? If so, can you share your experiences here please?

Thanks!

Nick Sarbicki

unread,
Apr 22, 2019, 10:28:28 AM4/22/19
to Django users
Kind of...

I've worked with several Django APIs that we use to back apps on Android and iOS as well as web apps.

I generally find that's the key, make sure you can pass all the data along as an API and the rest is just understanding how to build a frontend on the platform. Django doesn't really get in the way at all at that point.


--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY6R%2BLAw5BGYZtrC%2BTJ%2B13yApo7JH6xn-fVORiOP%2BoLU%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Larry Martell

unread,
Apr 22, 2019, 11:48:14 AM4/22/19
to django...@googlegroups.com
Googling I found where someone said you could leave the back end in
python and rewrite the front end in objective C or swift or rewrite
the entire app in objective C or swift. Why would you need to rewrite
the python back end that runs on the server?

Nick Sarbicki

unread,
Apr 22, 2019, 12:26:03 PM4/22/19
to Django users
That's the point, you don't. Assuming your backend has an effective way of delivering data (e.g. a REST API). 

If your Django server currently only renders HTML templates then you may want to consider adding an API on top of that. But the backend definitely does not need to be rewritten, only slightly expanded upon (using python).

Outside of that you only need to focus on the frontend, usually with swift.

--
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 https://groups.google.com/group/django-users.

Larry Martell

unread,
Apr 22, 2019, 12:28:48 PM4/22/19
to django...@googlegroups.com
Yes, it only renders HTML and also has a lot of javascript.

Nick Sarbicki

unread,
Apr 22, 2019, 12:43:39 PM4/22/19
to Django users
The JavaScript I assume is just for frontend logic so hopefully isn't very relevant - this will always need to be redone in the native language (unless using something like react native).

If it only renders HTML then there is a bit of work you need to do in python/Django land.

Think about what you want to show on your app and what data this will require from your backend server, as well as any other way it may have to interact with the server. Usually it will be standard CRUD operations. Write these down.

Then find a library that will allow you to transmit this data in a serialised format like JSON, and run the relevant operations. Usually you'd look at something like a REST API (Django rest framework) or websockets (channels), whatever you feel most comfortable with.

These generally work well with existing projects (django rest framework can often be integrated with <100 LOC). Once you have that integrated there is generally very little to think about for the backend, it's almost all about getting the frontend to make the correct requests and deserialising the data. Authentication often serves as a tripping point as well but there's n solutions to the problem.

On Mon, 22 Apr 2019, 17:28 Larry Martell, <larry....@gmail.com> wrote:
Yes, it only renders HTML and also has a lot of javascript.

On Mon, Apr 22, 2019 at 12:25 PM Nick Sarbicki
<nick.a....@gmail.com> wrote:
>
> That's the point, you don't. Assuming your backend has an effective way of delivering data (e.g. a REST API).
>
> If your Django server currently only renders HTML templates then you may want to consider adding an API on top of that. But the backend definitely does not need to be rewritten, only slightly expanded upon (using python).
>
> Outside of that you only need to focus on the frontend, usually with swift.
>
> On Mon, 22 Apr 2019, 16:47 Larry Martell, <larry....@gmail.com> wrote:
>>
>> Googling I found where someone said you could leave the back end in
>> python and rewrite the front end in objective C or swift or rewrite
>> the entire app in objective C or swift. Why would you need to rewrite
>> the python back end that runs on the server?
>>
>> On Mon, Apr 22, 2019 at 10:27 AM Nick Sarbicki
>> <nick.a....@gmail.com> wrote:
>> >
>> > Kind of...
>> >
>> > I've worked with several Django APIs that we use to back apps on Android and iOS as well as web apps.
>> >
>> > I generally find that's the key, make sure you can pass all the data along as an API and the rest is just understanding how to build a frontend on the platform. Django doesn't really get in the way at all at that point.
>> >
>> >
>> > On Mon, 22 Apr 2019, 14:19 Larry Martell, <larry....@gmail.com> wrote:
>> >>
>> >> Has anyone here every taken a django web app and converted it to an
>> >> iPhone app? If so, can you share your experiences here please?
>> >>
>> >> Thanks!

--
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 https://groups.google.com/group/django-users.

Larry Martell

unread,
Apr 22, 2019, 8:35:44 PM4/22/19
to django...@googlegroups.com
Thanks for the replies!

On Mon, Apr 22, 2019 at 12:43 PM Nick Sarbicki
Reply all
Reply to author
Forward
0 new messages