emberjs/data — Issue #47: alternative way of defining attributes
Author: BlueHotDog
Created: 2012-01-17 20:08:27+00:00
State: open

since there might be many attributes for a given model, i think it would be a good idea to remove as much boilerplate code when creating an attribute,

how about the following interface:
```

App.Person = DS.Model.extend({
attributes: [
{'firstName': 'string'}
,{'lastName': 'string'}
,{'fullName': function() { return this.get('firstName') + ' ' + this.get('lastName')}.property('firstName', 'lastName')}
]
});
```

i think this will also allow for a cool syntext in coffeescript something like this:

App.Person extends DS.Model
attributes:
firstName: 'string'
lastName: 'string'
fullName: (-> return "#{@get('firstName')} #{@get('lastName')}").property('firstName','lastName')