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

Comments

Projects
None yet
5 participants
@justinbmeyer
Contributor

justinbmeyer commented Dec 31, 2013

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().

@whitecolor

This comment has been minimized.

Show comment
Hide comment
@whitecolor

whitecolor Jan 29, 2014

Contributor

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.

Contributor

whitecolor 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.

@thomblake

This comment has been minimized.

Show comment
Hide comment
@thomblake

thomblake Jan 29, 2014

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

thomblake commented Jan 29, 2014

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

@stevenvachon

This comment has been minimized.

Show comment
Hide comment
@stevenvachon

stevenvachon Jan 29, 2014

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?

Contributor

stevenvachon commented Jan 29, 2014

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

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 30, 2014

Contributor

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

Contributor

justinbmeyer commented Jan 30, 2014

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

@stevenvachon

This comment has been minimized.

Show comment
Hide comment
@stevenvachon

stevenvachon Jan 30, 2014

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.

Contributor

stevenvachon commented Jan 30, 2014

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

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 30, 2014

Contributor

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.

Contributor

justinbmeyer commented Jan 30, 2014

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

This comment has been minimized.

Show comment
Hide comment
@stevenvachon

stevenvachon Jan 30, 2014

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.

Contributor

stevenvachon commented Jan 30, 2014

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

This comment has been minimized.

Show comment
Hide comment
@ccummings

ccummings Apr 28, 2014

Contributor

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

Contributor

ccummings commented Apr 28, 2014

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