Ionic, RESTful and read data in phone

sorry for my english…

Hello everyone,
I am a web developer and I would like to create my first app.

All functions of db (writing, reading and update) will be performed by a website.
I realized that the best practice is to use RESTful API. it’s right?
The questions are:

  1. how does my app to interpret and transform xml to html?
  2. there is a way to store a portion of the data of my db in the app?

Thanks

Hey,

if you are writing a restful api, you should use new data-standards like JSON.
JSON is simplier to write and read and very compact so you are able to save transfered data in comparison to xml.

Why transforming xml to html?
your html is part of the app and you only get and set plain data via your api.

To your second question:
It depends what you want to store on the clientside.
there are sqlite plugins for cordova/phonegap apps you can use with ionic. There your space is only limited by the device memory size. If you want to store some simple flags you can use the localstorage of the browser (limited by 5mb ??) something really small.

1 Like