after two weeks fighting to sort out deprecated tutorials and documentations I begin to get some grip with Ember 2.0…
From the perspective of an iOS programmer I would like to know how to store data (say preferences or credentials) on the client side.
Imagine a route which builds the model straight from a JSON fetch. Is there a way to keep that data inside the Ember app for a certain time (user session) and avoid re-loading that data every time once the route is visited again? Do I need ember-data straight from the beginning? Want to avoid making the learning curve even steeper…
Do you know a good website or someone who covers Ember for rookies like me which is not mentioning deprecated practices or methods?
How to sort that thingy in the appr. controller? Ember 2.0!
Welcome to Ember! I can recommend this blog I came across recently. It’s one of the best beginner sources I’ve seen. Covers everything from basic concepts to Ember Data customization. Have a look:
You’re talking about local storage. You can use it but it comes with it’s own caveats - I would consider trying to work with the web instead of trying to make the web more like an iOS app - you’ll struggle a lot less
Ember has a local storage adapter, but as @Wayne_Douglas stated, it would probably be better saving things server side. When starting out, I would also recommend using ember-data along with ember-cli-mirage to mock up your DB without actually needing a backend. Works really well when you’re learning Ember. For user sessions, I would recommend looking at Ember Simple Auth. I’m still learning Ember, and I’m still on 1.13.x as I’ve found some addons do not work properly with Ember 2.x yet. Books to read are Ember CLI 101 as well as Rock & Roll with Ember
OK, been playing a while with Pretender to feed my app with mockup data. Quite nice. Meanwhile I got a DS.RestAdapter (and a DS.RESTSerializer) working; it begins to be really fun. Will enter Ember Simple Auth tomorrow…
Oh man am I experiencing your pain LOL ;). I know a lot of developers that have given up on ember and moved to angular because it’s easier to pick up, but luckily for me, I hung in there, and it’s starting to make sense. Anyway, thought I would share a couple resources I found helpful with you.
Worth the money and ember2.0 specific: https://www.ludu.co/course/ember (this site seems to be down sometimes, but just keep checking back it’s worth it)
Hi Jeremy, thanks for sharing those useful resources. Currently fighting ember-simple-auth… It is very confusing to see ember-simple-auth and ember-cli-simple-auth hanging around. :-/