Skip to content

Instantly share code, notes, and snippets.

@MattWoelk
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MattWoelk/18528fdef3aa39d9bd23 to your computer and use it in GitHub Desktop.
Save MattWoelk/18528fdef3aa39d9bd23 to your computer and use it in GitHub Desktop.
Ember.js Ticks

Design decisions made in ember.js which I do not understand:

Templates

{{variable}}

vs.

{{view 'thing' variable}}

vs.

{{textarea valueBinding='variable'}}  # why quotes here ??

Rending a template

  • route ties it to a url
  • render is the same ??? but doesn't tie it to a url
  • _partial vs. component/thing # why the underscore? why component/ ?

sending data into a Component is done by making up variables

it should be a standard interface

  • a 'data' object or similar
  • like python's explicit 'self'

properties

Why would I need to do:

Controller = blabla{
    variable: 5,
    computedThing: function() {
        return this.get('variable') * 2; # why this
        return variable * 2;             # instead of this
    }.property('variable')               # when it's being recalculated dynamically anyway ?
}

Maybe that would be coupling 'when this should run' and 'use updated values' ?

Views

What are views even for? Can they have 'actions' lists? Do properties pass through them too?

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