Skip to content

Add once-for-observer RFC#427

Closed
cbou wants to merge 1 commit intoemberjs:masterfrom
cbou:master
Closed

Add once-for-observer RFC#427
cbou wants to merge 1 commit intoemberjs:masterfrom
cbou:master

Conversation

@cbou
Copy link

@cbou cbou commented Dec 28, 2018

No description provided.

@tomdale
Copy link
Member

tomdale commented Jan 2, 2019

@cbou Thanks for the PR! My hunch is that this change, while well-motivated, is not something we're likely to want to champion.

There are two reasons for this:

  1. If you are using observers heavily and would benefit from this functionality, it's something that can be provided relatively easily in an addon.
  2. We want Ember developers to move away from observers, so any time and energy spent on improving them is probably better spent elsewhere.

This is just my personal opinion, and I will let other core team members chime in if they think this is something they'd like to champion.

@mmun
Copy link
Member

mmun commented Jan 2, 2019

@cbou Can you describe a scenario where you'd like to use this feature? Hopefully, we can describe an alternative observer-less implementation in case future readers run into the same issue.

@cbou
Copy link
Author

cbou commented Jan 2, 2019

My scenario is an edge case. I have a model which is save by our legacy code in JavaScript and then pushed back to ember store. When a user create one model and quickly want to open it, I have to wait until the legacy code a persisted it to our backend. I do it with an observer which is removed once it's fired.

We move to EmberJS with several steps and we kept a lot of our legacy code so it's hard for us not to use observers. I'm pretty sure we won't need observers once we move everything but it will take some time since we want to also add new feature to our product.

I read a lot that observers are bad and will be removed. I understand that but since there are no real alternative it's a bit frustrating for me to use them. I'm not speaking for this particular RFC, just in general how observers are cared.

@tomdale you are right, if EmberJS will move away from observers this RFC is a waste of time.

@tomdale
Copy link
Member

tomdale commented Jan 4, 2019

We discussed this RFC at the core team meeting today and had consensus that we do not want to expand the API surface area for observers at this time.

We're moving this RFC to Final Comment Period to allow folks who have not had a chance to weigh in an opportunity to do so. Assuming no new substantive issues are raised in the next week, we will close the RFC at that time.

@tomdale tomdale added T-framework RFCs that impact the ember.js library FCP to close The core-team that owns this RFC has moved that this RFC be closed. labels Jan 4, 2019
@rwjblue
Copy link
Member

rwjblue commented Feb 11, 2019

@cbou - Thank you again for your work on this, I'm sorry that it didn't work out as a go forward feature. I look forward to your next RFC 😃.

@rwjblue rwjblue closed this Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FCP to close The core-team that owns this RFC has moved that this RFC be closed. T-framework RFCs that impact the ember.js library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants