Skip to content

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Sep 21, 2023

wip, no looking, shhh

Rendered

What finally motivated me to get this going:

TODO:

@github-actions github-actions bot added the S-Proposed In the Proposed Stage label Sep 21, 2023
NullVoxPopuli and others added 2 commits September 21, 2023 12:29
Co-authored-by: Sergey Astapov <[email protected]>
Co-authored-by: Sergey Astapov <[email protected]>

## Summary

Leading up to the Octane Edition, we laid out a plan to get rid of `<object>.get` and `<object>.set` in favor of `@tracked` class properties, which paved the way for writing reactive code in a way that is _the most_ "just javascript" out of our framework peers at the time,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Leading up to the Octane Edition, we laid out a plan to get rid of `<object>.get` and `<object>.set` in favor of `@tracked` class properties, which paved the way for writing reactive code in a way that is _the most_ "just javascript" out of our framework peers at the time,
Leading up to the Octane Edition, we laid out a plan to get rid of `<object>.get` and `<object>.set` in favor of `@tracked` class properties, which paved the way for writing reactive code in a way that is _the most_ "just javascript" out of our framework peers at the time.


## Motivation

The ember ecosystem has a number of "third-party" abstractions for some core reactive primitives, that could benefit (from teaching, performance, and cohesion perspectives) from being pulled in to a cohesive set of utilities from one source. This will help with longer-term goals of [simplifying imports](https://github.com/emberjs/rfcs/pull/946) -- today we have a _pit of exhaustion_ when it comes to how many imports are needed to make components.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The ember ecosystem has a number of "third-party" abstractions for some core reactive primitives, that could benefit (from teaching, performance, and cohesion perspectives) from being pulled in to a cohesive set of utilities from one source. This will help with longer-term goals of [simplifying imports](https://github.com/emberjs/rfcs/pull/946) -- today we have a _pit of exhaustion_ when it comes to how many imports are needed to make components.
The ember ecosystem has a number of "third-party" abstractions for some core reactive primitives, that could benefit (from teaching, performance, and cohesion perspectives) from being pulled into a cohesive set of utilities from one source. This will help with longer-term goals of [simplifying imports](https://github.com/emberjs/rfcs/pull/946) -- today we have a _pit of exhaustion_ when it comes to how many imports are needed to make components.

- define integration points
- manager pattern is fallback, rather than default

[starbeam]: https://www.starbeamjs.com/
Copy link
Contributor

@MrChocolatine MrChocolatine Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a vital or really required change but, to keep things consistent, should this "link-reference"

  1. be moved into the section where it is first introduced? (just below, ### Preface)
  2. at the bottom of the file?


### Preface

Before getting in to details of what **each thing is, how it works, and how we'll integrate and support it**, we need to go over some _equivalence_, because there is some overlap between [Starbeam][starbeam] and exports from `ember-modifier` and `ember-resources`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Before getting in to details of what **each thing is, how it works, and how we'll integrate and support it**, we need to go over some _equivalence_, because there is some overlap between [Starbeam][starbeam] and exports from `ember-modifier` and `ember-resources`.
Before getting into details of what **each thing is, how it works, and how we'll integrate and support it**, we need to go over some _equivalence_, because there is some overlap between [Starbeam][starbeam] and exports from `ember-modifier` and `ember-resources`.

expect(num.current).toBe(0);
```

In `@glimmer/tracking`, `@tracked` can be thought of as a wrapper of `cell`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In `@glimmer/tracking`, `@tracked` can be thought of as a wrapper of `cell`
In `@glimmer/tracking`, `@tracked` can be thought of as a wrapper of `cell`.

}
}
```
which would be the exact same as what folks are used to today in Ember:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
which would be the exact same as what folks are used to today in Ember:
which would be the exact same as what folks are used to today in Ember:

}
```

Also note that originally, the cell API was motivated by and being a way to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Suggested change
Also note that originally, the cell API was motivated by and being a way to
Also note that originally, the cell API was motivated by being a way to

Comment on lines +314 to +315
In ember-modifier, a modifier is an arrow function registered with a _modifier manager_
for each created modifier.
Copy link
Contributor

@MrChocolatine MrChocolatine Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks redundant.

Suggested change
In ember-modifier, a modifier is an arrow function registered with a _modifier manager_
for each created modifier.
In ember-modifier, a modifier is an arrow function registered with a _modifier manager_.

});
```

This is the _least_ typing of the options, and it make make sense to keep this API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is the _least_ typing of the options, and it make make sense to keep this API
This is the _least_ typing of the options, and it makes sense to keep this API

- `TrackedWeakSet`
- etc?

Note: performance issues, incomplete implementation as ecma advances
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity.

Suggested change
Note: performance issues, incomplete implementation as ecma advances
Note: performance issues, incomplete implementation as ECMAScript advances


We have an opportunity to improve a lot of performance in how ember renders by collapsing abstractions.

The "third-party" libraries are:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tracded-toolbox, too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, ember-async-data, and one of its utility classes is duplicated in ember-data

@NullVoxPopuli
Copy link
Contributor Author

Superseded by #1122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Proposed In the Proposed Stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants