
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
hassan-object
Advanced tools
- Start Date: (fill me in with today's date, YYYY-MM-DD) - RFC PR: (leave this empty) - Ember Issue: (leave this empty)
Provide a modernized object model that takes advantage of the latest features of the language.
Ember pioneered several features to improve the productivity of JavaScript developers working at application scale, such as a class system, mixins, and computed properties. Now that the language has adopted many of these features, we can reduce runtime cost and the size of Ember itself by migrating to the language constructs that supersede Ember's object model.
Why are we doing this? What use cases does it support? What is the expected outcome?
This is the bulk of the RFC. Explain the design in enough detail for somebody familiar with the framework to understand, and for somebody familiar with the implementation to implement. This should get into specifics and corner-cases, and include examples of how the feature is used. Any new terminology should be defined here.
Properties that are used as dependent keys must be annotated using the @property decorator.
CPs should use the built-in getter/setter syntax + decorators, so that it's "just JavaScript" and computed properties feel like a thin layer on top of built-in accessors.
Today Ember memoizes/caches by default but this comes with significant memory overhead.
For cheap/infrequently used computations it doesn't make sense to pay the memory cost.
In this proposal, computed properties are not cached by default, but can be opted in to
via the @cached decorator.
Simple computed property, no dependent keys
class Person extends EmberObject {
// this decorator is optional—works the same with or without it
@computed
get fullName() {
return "Tom";
}
}
let person = new Person();
expect(person.fullName).to.equal("Tom");
Computed property with dependent keys:
class Person extends EmberObject {
firstName = "Tom";
lastName = "Dale";
@computed("firstName", "lastName")
get fullName() {
return this.firstName + " " + this.lastName;
}
}
let person = new Person();
expect(person.fullName).to.equal("Tom Dale");
What names and terminology work best for these concepts and why? How is this idea best presented? As a continuation of existing Ember patterns, or as a wholly new one?
Would the acceptance of this proposal mean the Ember guides must be re-organized or altered? Does it change how Ember is taught to new users at any level?
How should this feature be introduced and taught to existing Ember users?
Why should we not do this? Please consider the impact on teaching Ember, on the integration of this feature with other existing and planned features, on the impact of the API churn on existing apps, etc.
There are tradeoffs to choosing any path, please attempt to identify them here.
What other designs have been considered? What is the impact of not doing this?
Per-object invalidation, or per-prop? keep tag on entire object, any property mutation increments the value of that tag
Support chain nodes? If doing per-object invalidation, this basically just means entangling a parent objects invalidation/tag with a child object's.
Do decorators operate on descriptors at invocation time, or do we just record configuration info and apply correct implementation at class/instance construction time?
E.g. if we mutate descriptors directly, there's a (confusing) difference between:
@computed
@cached
get foo() {
}
@cached
@computed
get foo() {
}
What is the syntax for this?
FAQs
- Start Date: (fill me in with today's date, YYYY-MM-DD) - RFC PR: (leave this empty) - Ember Issue: (leave this empty)
We found that hassan-object demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.