A few questions for migrating from Ember 2.0 to 2.14


#1

Hello,

I’m working again on a previous Ember-based project after ~18 months. I’m in the process of updating project for the latest release of Ember.js. I wonder what changed since Ember 2.0 on component side:

  • What’s (in a few words) the status of Glimmer? And <my-component> in templates?
  • Is the attrs object still a thing in components? Can attrs.foo.value still be observed? I seem to have some issues in components using that. And I’m wondering about forwards compatibility with glimmer.
  • What are the current effects of foo=bar, foo=(mut bar), foo=(unbound bar) and foo=(readonly bar)?
  • More generally, what’s today’s preferred way to do two-way binding, upwards on-way binding and downwards one-way binding?

  • Someone told me that Ember.get and Ember.set were no longer necessary and ES5 properties were the way to go. Documentation still uses Ember.get and Ember.set everywhere. Which is correct?

Thanks alot!


#2

Very little has changed.

Ember uses glimmer. Angle bracket components are not a thing in ember yet.

It’s never been recommended to use attrs. Don’t use it, use normal properties instead.

No change,

In general, just use normal bindings and actions to change data. You can mark stuff as readonly if you want, but it’s not required.

This is not correct. Sometimes not using them works, sometimes it doesn’t. If in doubt, look at the docs, the docs are always the best place to start for best practices.


#3

Thanks a lot! Getting updates on Ember development is always touchy when not following closely. Your answer will save me a lot of time navigating through the blog and individual people’s articles on Ember.

So something did change. Back then, the docs were massively outdated. That’s great news, I have always thought the true value of Ember was not done justice to by its documentation.