Best Approach for Developing a Cross-Platform Mobile App alongside a Django Web App?

I’m currently working on building a Django app, and I anticipate that it will eventually require a cross-platform mobile app as well.

While the Django web app can be designed to be mobile responsive, I’m considering the option of developing a native app. I’ve done some research, and it seems like React Native could be a good choice. However, I’m open to suggestions since React Native involves a completely different world and language compared to Django and Python.

I’d appreciate any recommendations or insights you may have regarding the best route to take for building a native mobile app alongside my Django app.

Building a native mobile app alongside your Django web app is a great idea to provide a seamless experience for your users. React Native is indeed a popular choice for developing cross-platform mobile apps, and it can integrate well with Django. However, there are other options available as well. Let’s explore a few possibilities:

  1. Flutter: A cross-platform framework developed by Google using the Dart programming language.Resources:
  1. NativeScript: A framework for building native mobile apps using JavaScript or TypeScript.Resources:
  2. Kotlin Multiplatform / Swift Package Manager: Platform-specific approaches using Kotlin Multiplatform for Android and Swift Package Manager for iOS.Resources:

React Native would work perfectly fine for a cross-platform mobile app. If speed is a factor and you do not have experience with React, I suggest looking into Progressive Web Apps

You might want to look at HyperView project.

1 Like

Thank you @nafi-ullah @r3dm1ke @rtpm for your suggestions.

The reason I was looking into react native was because it’s the one I have found to be more of a future proof and the UI can be modern and native.

However, using react native looks like I am throwing away all the batteries included with django. django will serve only as the api to react native and I have to convert all the views to api and duplicating the codes. Also, I couldn’t use all the time saving features django provide.

I was looking for something from which I could build native mobile apps in as less time as possible.

Any suggestions for that?

If you want to use as much Django as possible you need to look for SDUI solutions (Server Driven UI). I used hyperview in a small project.

There are some other projects you might be interested. Google for react sdui, flutter sdui.

If not, Django-rest-framework + react native (expo) but yes… you will need to rewrite the logic, create rest endpoints etc.

Hope SDUI gets more popular.
Personally I will be more looking at hyperview as soon as “navigation” branch is completed (which lets you manage navigation stacks). Guys from InstaWork really do a great job.

@nexgen basing on your situation i think i might also end up having the same issue. can you share how you ended up solving the issue? it would help a lot thanks

I’d like to share a different solution here and I do not think many Django developers know this can be done.

Rails frontend solution, Hotwire (Turbo, Stimulus), is a mature frontend solution which is used by many successful startups.

You can use it with Django to build the modern web app, since it is lightweight, package like django-allauth can still work.

You can check awesome-hotwire-python to find useful resources.

After you build the web app with Hotwire + Django, and you want to build the iOS/Android app.

Well, the most interesting part is coming

Hotwire has packages called turbo-ios and turbo-android, you can use them to quickly wrap your web app as native app on iOS/Android devices.

Most of the code from the web app can be reused and it is very productive (because you can get many things done on web part and only write Swift/Kotlin code when you really need).

The Basecamp, Hey mobile apps are built in this way, and I also saw some Django people get mobile apps developed in this way.

You can check this youtube video https://www.youtube.com/watch?v=SWEts0rlezA to know more, can you imagine it is published on 2016?

1 Like

Excellent suggestion! will check it out.