8 ms·
Curious for yourself? Try following my simple starter app tutorial of Rails + Ember.js here: http://www.devmynd.com/blog/2013-3-rails-ember-js http://www.devmyn
by tonycoco 14y ago
Curious for yourself? Try following my simple starter app tutorial of Rails + Ember.js here: http://www.devmynd.com/blog/2013-3-rails-ember-js http://www.devmynd.com/blog/2013-3-rails-ember-js
Though, I understand the pain of coming from a server-side MVC architecture, I found it refreshing that Ember.js takes the "desktop" MVC approach. Our web apps are now living on the client, acting like desktop apps. Most people struggle with this reverse at first, but can conceptually catch on if shown the way. I think what really needs to happen is a good screencast or two walking through these concepts. I'm interested in putting something together and will when I have the time.
- tmzt 14y agoWhile there is quite a deal of information on integrating ember-data with rails, there is much less on integrating it with other server-side MVC/REST frameworks. This means that using it with another framework often means modifying that interaction pattern to be more like how rails views ajax, complete with the root objects ({"model":{}}). This may more accurately apply to the REST driver in ember-data, but that is quite tightly coupled with the rest of it.
- tonycoco 14y agoThat's def a job for the adapters. Django, for instance, has a REST adapter that has been worked on here: https://github.com/toranb/ember-data-django-rest-adapter https://github.com/toranb/ember-data-django-rest-adapter As far as the root objects are concerned, I've always been a fan of that part of Rails. Not to say that it cannot be easily gotten rid of with something like this (for ActiveResource)... ActiveResource::Base.include_root_in_json = false Or, like in my example app, with this (for ActiveModelSerializers)... https://github.com/rails-api/active_model_serializers#1-disable-root-globally-for-in-arrayserializer-in-an-initializer https://github.com/rails-api/active_model_serializers#1-disa...
- ffreire 14y agoThere seems to be some very positive buzz around this screencast mentioned both in the OP's blog and around HN in general: https://peepcode.com/products/emberjs https://peepcode.com/products/emberjs . I found it particularly instructive but found that it only scratched the surface of this new framework. At least, it scratched enough off the top that I feel comfortable rooting through source and API documentation to figure out the rest. YMMV, of course.
- tonycoco 14y agoAgreed. I'd like to spend some time and come up with a longer screencast that did a little bit more of a "deep dive".
- tbatterii 14y agoi felt it did very well as an introduction. I think a deep dive into ember-data would be great for those who have been traditionally server side devs now getting into more of the client side stuff.