Domanda

I'm writing a backend for my iPhone app and I'm looking for tutorials or sample code for writing the backend.

I'm using RestKit as the client. so it would be using JSON and a RESTful framework.

Thanks.

My main problem is that I don't know how to translate the request from the iPhone to return the corresponding objects and how to translate those models to JSON in the backend.

È stato utile?

Soluzione

I would check out StackMob. Their platform helps you build a complete backend to your mobile app. They provide core services you'll want from your backend (secured REST API, Custom Code, Push Notifications, Facebook & Twitter log in and more). They also help on the deploy side with clear development and deployment environments along with easy and organized versioning. And they help with the technical (handle growth/spikes in data/traffic) & business (analytics from the server & client side) scaling of your app. http://www.stackmob.com/product/

Altri suggerimenti

PHP is pretty nice with the built in JSON

<?php

    $data = file_get_contents("php://input");

    $jsondata = json_decode($data);

    $result = array();

// *****************************************************************
// do something with $jsondata and put the results in $result
// *****************************************************************

    $result['success'] = true;
    $result['message'] = "Call Successful!";

    echo json_encode($result);
?>

IF you want to write web service in ruby on rails then use Objective Resource It has iphone project and backend in ruby on rails

Now you don't need to write server side for you mobile applications (iOS, Android, Blackberry, WindowsPhone...), there are lots of free custom backends. I used QuickBlox custom backend in some my apps, there is great Custom Objects module with lots of features.

Look at iOS custom objects sample code example. It shows how to:

  • Create own server data structure & use it.
  • Get, Create, Update, Delete your data using a lot of filters.

Just download & run. Maybe it's all what you need.

Don't write server side code, save your time & money!)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top