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

2.1 API Changes #635

Closed
justinbmeyer opened this issue Dec 31, 2013 · 8 comments
Closed

2.1 API Changes #635

justinbmeyer opened this issue Dec 31, 2013 · 8 comments
Milestone

Comments

@justinbmeyer
Copy link
Contributor

Here's a list of API changes I'd like to make for 2.1 while still being backwards compatible with 2.0.

can.Component's scope property renamed context

scope was used because of angular and scope can be used to define a scope. However, one is usually defining the context of the component's mustache template. This will make ideas like scope and context easier to understand.

can.mustache and can.ejs

I want to be able to create a mustache template like can.mustache(TEMPLATESTRING) not can.view.mustache().

@wclr
Copy link
Contributor

wclr commented Jan 29, 2014

word "context" is more often seen in real life and thus more common to be used as model's attribute name. "scope" is pretty netural and rare. In British words corpus (http://corpus.byu.edu/bnc/) "scope" has 3394 frequency score, "map" - 4026 and "context" - 8441.

@tamzinblake
Copy link

Those numbers are within the same order of magnitude - not a very convincing argument.

@stevenvachon
Copy link
Contributor

I agree with context over scope. I never liked scope.

I'm not so sure about can.view.mustache, though. I'm probably complaining about something that's over my head but, how about moving all can.Mustache stuff into can.view.mustache and all can.EJS into can.view.EJS?

@justinbmeyer
Copy link
Contributor Author

@stevenvachon why not just have can.mustache and can.ejs? No one uses can.Mustache.

@stevenvachon
Copy link
Contributor

People on IRC are often expecting can.mustache instead of can.view.mustache, so I know where you're coming from. To me, I think can.view.mustache makes more sense as it's view related. The separation of can.view.mustache and can.Mustache in the docs sometimes creates a delay in finding what I'm after as well.

@justinbmeyer
Copy link
Contributor Author

Couldn't the same be said of can.Construct and everything that inherit, uses it?

What are you after that confuses you? Almost everything important is in Mustache/EJS.

I'm actually going to pull out bindings too. I don't want everything hidden under can.view.

Sent from my iPhone

On Jan 29, 2014, at 7:12 PM, Steven Vachon notifications@github.com wrote:

It just seems a little separated to me to have can.view and can.mustache when mustache is view-related. It confuses me every now and then and I've noticed the same for others on IRC. The separation in the docs sometimes creates a delay in finding what I'm after.


Reply to this email directly or view it on GitHub.

@stevenvachon
Copy link
Contributor

Yeah, but can.Construct is so broad. I guess the same could be said, then, for can.view as it continues to expand.

When I'm looking for info on what can.view.mustache accomplishes, I sometimes click on can.Mustache in the docs first, only to find that I'm in the wrong place. Hmm… so if can.view.mustache were to change to can.mustache, then it'd be in the place I often mistakingly look?

And, if you're referring to the can.view.bindinds, yeah, I never knew those were there until a few weeks ago. I knew of can-EVENT only from one of your posts on the JavaScriptMVC forums.

@ccummings
Copy link
Contributor

The can.mustache and can.ejs changes are going out with 2.1, but the context change will not.

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

No branches or pull requests

5 participants