Assuming we are within the scope of a specific component, controller, or route that looks like something like this:
App.ThingController/Component/Route = Ember.Controller/Component/Route.extend({
myString: "string value",
myFunc: function(){
// do something and return value or object
},
saveFunc: function(value){
// save value somewhere
},
});
What is the difference between the following syntaxes:
var someValue = this.myString;
var someValue = this.get('myString');
var someResult = this.myFunc();
var someResult = this.send('myFunc');
var anotherValue = "foo";
this.saveFunc(anotherValue);
this.send('saveFunc', anotherValue);
this.set('myString', anotherValue);
In other words, specifically what do I lose by not using the getters and setters or the send method? What specifically is gained by using them?
Are there any important cases where I absolutely must use the send or a setter/getter syntax? Perhaps some observer/binding behavior?