HACKER Q&A
📣 gitrog

What stack should I use for my mobile app?


I am about to start development on a mobile app prototype, which, if we can secure funding, would be used by hundreds of thousands of people daily.

I would like to build the prototype on the same stack as I'll use for the final product to start getting my head around architecture choices and third party libraries to include.

I'm predominantly a web developer, having experience in Ruby on Rails and Django on the backend side of things and having worked with React, Cordova (Phonegap) and Angular. I've built some mobile apps using these technologies, as well as a small mobile app using Kivy.

The app will largely be informational with some data capture and lots of updates pushed to users, probably several times a week.

So based on my experience, I was thinking of going with Django Rest Framework and React Native, as I've built an app with this before a few years ago. But I remember dealing with the state on the UI side being a bit of a pain and was wondering if maybe going with Django, GraphQL (Apollo) and React Native wouldn't be better (even though I don't know GraphQL yet).

Do I have better options? Would my suggested stack be able to eventually handle the workload? Obviously the API will have to sit on some solid cloud infrastructure as well.


  👤 theory_of_10 Accepted Answer ✓
In the last 6 months, I’ve built 3 mobile apps using React Native with Django Rest Framework. I can’t be more satisfied.

We tried GraphQL, it added a lot of complexity on the backend that you don’t really need

We like to keep things simple, so we avoided state management libraries and all we needed was https://github.com/async-library/react-async

We also liked onesignal to manage push notifications


👤 elamje
If you are a Rails developer, this Turbolinks presentation makes a strong case to be used for mobile apps. https://m.youtube.com/watch?v=SWEts0rlezA

It seems like there is a strong productivity gain from using rails here since it’s extremely productive and you can make simple wrapper apps to release to the Play and App Store that really just wrap the web view.

The biggest gain is obviously reusing most of the web app across three different platforms, and the ability to add native navigation and interaction as needed, later. You also avoid needing a big javascript library.


👤 charlie0077
Why not node.js instead of Django? In general I feel node.js community is more active in terms of web development. And you don't need to do context switch between node and python. I would go with GraphQL, the part that I like the most is the schema. You don't need to maintain doc now. There is also a playground, you can do integration test easily during development.

If you feel bad about all the boilerplate code you need to write in server side. There are many node libs/blackbox services that can help you, such as prisma, hasura. You can also take a look at a lightweight library that makes your life easier when building GraphQL server: https://github.com/charlie0077/graphql-server-crud/

I am the author of that library.


👤 hactually
Django is fine, if a little heavy but it will provide a good restful API. For the app - I'd really recommend dipping into Flutter. The language is simple, tooling is great and you can get up and building rapidly.

👤 kgin
React Native and Firebase

or, if you want to be more independent

React Native and FeathersJS