I'm implementing service with SAM. I have chosen pure ECMA Script 2015 implementation to get better understanding of how SAM works.
I need to make several REST queries and download all necessary data. But I have dependencies between data objects, and can fetch next object after all it dependencies were accepted by model. But here is a problem.
To my mind, fetching data from RESTful service, preprocessing it to make a proposal to model is the action-side job. But if I have resolved more than one dependency, in action side fetching and proposal will be made more times. So I should control which requests were made, and which were not. But this is model's job.
I understand why, and agree that CRUD operations should be in the model, but it makes me confused how implement it with model if in this situation next fetching of data should be computed by next-action predicate, which is part of state.