How could deal with Ember Data in cross domain situation?


#1
wonder whether Ember Data can deal with cross domain successfully? If yes, how? If no, does it mean I have to fetch data by $.getJson and process the data by myself. thanks :)

#2
In addition, the backend part is based on Ruby on Rails

#3

Sure, Ember Data works cross-domain no problem; you’re just bound by the cross-domain security policies of the browser.

The two options for doing cross-domain communication are:

  1. JSONP (http://stackoverflow.com/questions/2067472/what-is-jsonp-all-about)
  2. Enabling CORS headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)

Because Ember Data is designed to work with any mechanism you might use for data loading, both of these are implicitly supported.


#4
thanks a lot Tom : ) I'll try it out as u told me. btw, I watched 2013 nds, the cage match, emberjs vs angularjs, that's really coooooooool~