I'm a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.
As you may know, I'm really into Ionic framework lately and am helping out on StackOverflow with the knowledge I gained so far with the framework. I'm in the top 5 All time answerers.
I have a website project built in Django and want to build a mobile app for it. I did a lot of research but was confused between
hybrid app. My project is basically a Quora clone and just a college project. I also saw
Sencha but I am really confused about how they all fit. Do I have to use
PhoneGap or Apache Cordova or just
Ionic? What is the structure and where should I start?
My answer was:
TL;DR: Start with Ionic. Ionic uses Cordova "under the hood". No need for PhoneGap or Sencha, so don't be confused by that.
Disclaimer: This will sound like advertisement, so I have to say I'm in no way affiliated with Ionic, I just happen to like it so much that I'm sharing the love for it.
Let's take this one step by step:
What is Ionic?
What is hybrid mobile app?
Nowadays, luckily, with the Ionic Framework you can create one application by using the skills you already have as a web developer and then deploy this one codebase as an app to both iOS and Android stores. How cool is that, right? So, hybrid because it's a "simple" web app wrapped inside the native app with a so-called WebView.
Why is Ionic cool?
Ionic is awesome because it's not "just" a framework. Instead, it has a whole ecosystem built around it. For example, Ionic allows you to:
- generate icons and splash screens for all devices and device sizes with a single command:
ionic resources. This alone saves you at least a day of image preparing for various sizes.
- instantly update your apps with code changes, even when running directly on your device with
ionic run --livereload
- build and test iOS and Android versions side-by-side and see changes instantly with
ionic serve --lab
- share your Ionic apps with clients, customers, and testers all around the world without ever going through the App Store with
- easily accessing the full native functionality of the device using ngCordova (here you get to use any Cordova plugin - so Ionic is indeed much more than Cordova per se)
- Also, they're (Ionic team) building a full-stack backend services and tools for your Ionic app likeDeploy (for deploying a new version without going through Apple review process!), Analytics,Push notifications.
- Ionic CLI (command line interface) uses Cordova in the backend and allows you to build (directly using Ionic CLI) apps for iOS and Android (you by doing
ionic build iosor
ionic build androidand woila)
- Ionic uses Angular as a frontend framework so if you're familiar with it it will come as a bonus. They're working closely with the Angular 2.0 team too.
How to start your project?
If you take a look at my answer to this question you'll see that if you already have an API defined in your Django backend, then you can start using it quite quickly by leveraging the existing API and consuming it with Angular $resource.
Hope this helps and that you find using Ionic a pleasure.