• twitter
  • facebook
  • google+
  • youtube
The value of your mobile application is often going to come from its back-end, be it to provide or collect data to and from the end-user. Canappi is capable of generating its own data services but most likely you will also need to connect to existing Web APIs (or Web Services as they used to be called). The "Programmable Web" is maintaining a directory of these APIs.

     document-logo.png connection.mdsl

Connecting a back-end Web API to your mobile application is a 2 or 3 steps process depending on whether you need a mapping definition or not to bind the data to the controls in your view. 

You can also check our library of connectors (YouTube, Flickr, MongoDB...)

Step 1: Define the connection(s) to the Web APIs.

For instance, this is a simple connection to the Canappi's twitter feed:

connection canappiTweets { 
	operation init getmyTweets 
             GET 'http://twitter.com/statuses/user_timeline/metapgmr.xml' {
	} ;

Step 2: Define the binding(s) between the operations of a connections and a layout

view canappiTweets 'Canappi' {
     controls {
    	layout canappiTweetsLayout bindings canappiTweets ;

Step 3: (optional) Define a mapping between the control names and the names of the data elements of the Web API

mapping roadside { 
	{"tweet" : "text"},

You can download the mdsl file here and watch the tutorial below. Here are the links to the libraries used by Canappi:

ASI Framework (1.8.1)

JSON Framework for Objective-C (v3.0)

Reachability.h and Reachability.m files (v2.2)


Powered by liveSite