Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using something other than "content" #598

Closed
davewasmer opened this issue Aug 4, 2015 · 3 comments
Closed

Consider using something other than "content" #598

davewasmer opened this issue Aug 4, 2015 · 3 comments
Milestone

Comments

@davewasmer
Copy link
Contributor

The ESA 1.0 blog post mentioned plans to ditch the proxying behavior of the session service, and instead access the session data directly via the content property.

I'm all for ditching the proxying behavior, but I'd like to suggest that you consider a name other than content for the data namespace. content is used by proxy objects everywhere, and it's generally a bad idea to reach into the content of a proxy directly. Even though the session service will not be a proxy any longer,I know when I see an object with a content property, my first assumption is that it is a proxy. And it's often quite difficult to tell if it's not.

I'm imagining all sorts of potential confusion when newcomers try using the service session like a proxy, and either end up confused as to why their service.myProperty is undefined, or they start binding directly to content.myProperty on other proxy objects because that's how ESA says to do it.

@marcoow
Copy link
Member

marcoow commented Aug 4, 2015

Good point - suggestion for an alternative would be nice ;)

@davewasmer
Copy link
Contributor Author

Fair enough 😉

Perhaps data?

@marcoow
Copy link
Member

marcoow commented Aug 4, 2015

Sounds good. Would you want to send a PR (targeting the ember-cli-addon branch)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants