Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you want here is an API that your apps can access. You can define these in any way you like, but some ways are more common than others, for instance RESTful imlpementations. </p> <p>Using rest you can define access points for your data on a domain using 4 verbs: GET, POST, UPDATE and DELETE. You probably recognize two of these. </p> <p>Using a library such as Slim Framework for php you can define access points like so:</p> <pre><code> self::$Slim-&gt;post('/document', '\MyApp\DocumentController::newDocument'); // Get all documents for authenticated user self::$Slim-&gt;get('/document', '\MyApp\DocumentController::getAllDocuments'); </code></pre> <p>In this example the web service will accept either post or get requests to /document, where get means "get all documents" and post means "create new". These functions are static, so that you don't have to instantiate all your controllers for any given case. </p> <p>In either case, the result is issued using JSON. Both iOS and Android can interpret JSON using built in functions or third party libraries. Personally i like AFNetworking for iOS. </p> <p>So in short, create www.yourdomain.com/api, and add entry points like /api/document using Slim Framework and have these points of entry do your logic. Respond using JSON, for instance with json_encode() in php. On the app side use AFNetworking to make requests and interpret the JSON data.</p> <p>Again, these are my preferences, there are other ways as well. </p> <p>Best of luck!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload