You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find I learn better by understanding the logic behind certain decisions. I really want to work from your example but I need a bit more context about certain things. I thought I would see if you might be willing to humour me :P
@howardroark hi there, sorry for the long wait, I was away on holidays.
I find naming events real hard, so I try to stick to a specific format, roughly being sender:action:state or sender:subject:state. Since that's what events basically are: state change signals. The instances where I use requested is when an objects state depends on (an) external action(s)/data, i.e. it needs something which is inherent to the object, yet is provided by an agent.
To me domain are the models, collections and services necessary to perform domain logic, i.e. regardless of how that data is stored. I'm not too strict about it though, since with Backbone models have easy localstorage and REST API communication baked in.
No, not necessarily. One of the things with events that goes wrong really quickly is that you easily start creating implicit dependencies. For instance: a model which sends out a "loadOtherModel" event instead of a "thisModelDataReady", i.e. implicitly you write down the load order inside unrelated models (just an example obviously) So, to come back to your question, a model:data:requested chain can be finalized by a command responding to a specificService:load:completed. If there are any other actors that need to know when the model's data is ready, then it will dispatch a model:data:completed, otherwise not.
Thanks for the great explanation! So if the views depended on multiple models and remote data sources in order to render correctly would you fetch them within BootstrapDomain?
Hey @creynders !
I find I learn better by understanding the logic behind certain decisions. I really want to work from your example but I need a bit more context about certain things. I thought I would see if you might be willing to humour me :P
app:bootstrap:requested
... therequested
part maybe more-so.BootstrapDomain
controller and what isDomain
to you?completed
command that is triggered byrequested
?Thanks!!!
The text was updated successfully, but these errors were encountered: