Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Discourse doesn't use ember data and it has been an absolute pleasure to code in EmberJS. I think a lot of people don't realize just how simple it is to create an Ember object from an AJAX call and start using it. A finder is usually as simple as:

$.get("/user/eviltrout.json").then(function(json) { Discourse.User.create(json) });

I'll probably end up writing up an AJAX tutorial because I think a lot of people are underestimating just how simple it is.



This is our strategy as well at Uniiverse. This is also an effective way of ensuring that data is in sync, should that be a requirement in a particular state. Just attach the call on State.enter() and you're good to go.


We use this strategy also. In setupController functions, (of your routes), we typically run fetches and fill content of our controllers. Why does everyone get hung up on Ember-data?


How are ya'll caching your stuff? Sounds like all that is doing is just making fresh requests for every route.


The Controller. Then you can do a quick check to see if `someControllerForState.hasData()`.


We use a local storage method in browser and app data when running in phone gap


Same approach here. No ember-data just creating Ember objects within a type of DAO ember class/object using ajax calls to the server side. Caching is enabled both in client at that Ember controller and on the server side before hitting the data source, however this depends on the data requested. If offline capability is required on the browser or mobile device, local storage also comes into play. I agree that all this is really clear and simple.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: