Sounds good, I’ve got a few of these “services” in my app which are currently wired up in initializers and would be great for that to be automagic.
Eg.
-
queue
- injected onto routes to publish background events to be run on the server -
api
- object to interact with our app’s REST API -
store
- using Fireplace, the same deal as Ember Data’s store
Another pattern I’ve been using to extract behaviour from the route is command objects which I talk about here which are kind of like services in that they go between the route and the model, but feel conceptually different in how they are used.