Where to do business logic on DS.Model instances?


#1

Hi there,

I need to do some heavy business logic to my DS.Model instances. Where is the right place to do so? I don’t want to pollute my model with Ember.computed() with long parameter lists…

Regards, Martin


#2

there are many way to do that, maybe put it on services. Or as you mentions, put it on model, this approach is no problem, because ember js app is just an web app, its business logic is intimately tied to the delivery platform, the web


#3

You could also break up your computed properties into smaller computed properties so that a single CP doesn’t have so many params. I typically put more complicated business logic on services.