Hi, i’m a web developer interested in building a hybrid app; at the moment i’m learning angularjs and im using ionic framework, this tools provides me enough resources to make a front development; my problem is, i really don’t know how to implement a database management for my app, as i want my users to be able to store data in a local database and synchronize it to server, do you have any recommendation on wich tools should i use? i’ve been searching but there are lots of them, pouchdb, sqlite, couchdb, etc… wich of them should i use knowing that i use php and mysql? Thank you for your help.
I will not suggest you to use local database. Because its mostly use for user specific settings.
You need to store information into database with the help of API.
See for hybrid mobile application development like Ionic you need to learn
AngularJs, Ionic Framework, SASS for frontend development.
But Every mobile application need to communicate with server to store information. for that you need to learn
Nodejs + mongodb
Asp.net + Sql server
You can use any server side programming language and database. For communication from mobile application to server you need a API , You can design RESTful API to communicate with server.
If you are beginner then I will suggest you go with NodeJs+MongoDb.
For learn AngularJs, Ionic Framework and Hybrid application Development Join , Google+, LinkedIn etc groups like
Note: Ionic 2 launched , Its better to start Ionic 2 now.
False… the first official alpha was released… so there will be some time until it is final ;).
Even angularJS is still in alpha phase.
If someone will use this in production … good night
There will be a guide to transform your ionic app to an ionic2 app.
Before starting ionic2 everybody should make experiences with pure typescript…
Back to topic.
It depends how your app will be used. If you need offline synchronization out of the box --> use couchDB/pouchDB as dbs. If this is not necessary. but you have thousands of users parallel using your app. or you need to write many data --> use a NoSQL dbs like mongodb (it plays well with nodejs, but can be used with many script/programming languages). If you only want to play around and it is an app for a small range of users you can use everything. Even PHP and MySQL.
But keep in mind… you can use the fastest dbs and programming language … if your code sucks --> your backend will be crap ^^
You right Angular 2 and Ionic 2 still in Alpha phase. But I think for beginner its better to start learn TypeScript, Angular 2 and Ionic 2. If they don’t want use Alpha version into production.
Hi, i really want to thank both of you for having taken the time to give me your answers, as my app must save data locally and synchronize with the server, and i told you i have experience with php and mysql; i’m thinking about using pouchDB for synchronization as @bengtler advised; i kind of need to be able to make queries to the database to print some reports. I’m thinking about making the RESTful API myself with php and mysql and use pouchDB for offline database and synchronize it with my API. Is that a good approach?
Pd. thanks @virender i’ll be looking all those groups.
this should work:
pouchdb works together with the cordova sqlite plugin
I know its been sometime since you replied here. Seems like I am in a similar situation as yours. I am planning to use pouchDB for my app, but later I need to sync this data to myremote MYQL DB in my servers. Did you solve this problem, and if so how did you do it? A little light on this would help us in moving ahead!
Hi, i really haven’t continued this project but I managed to use the cordova SQLite plugin for local database storage wich to me seems like a really good place to start, it has been easy to use and i only need to make my RESTful API with php and mysql using json to communicate.
I really am a beginner in Ionic so i couldn´t tell you wich approach is better, just telling you that worked for me.
Anything i can help you, just ask.
can u post us the code how u achieved it.did u follow the alogrithm http://havrl.blogspot.in/2013/08/synchronization-algorithm-for.html