These are chat archives for jdubray/sam
I have seen in your example of blog an object called
data, where all server data responses are stored.
In my vision, model is a full-functional object which stores all data and also can validate and manage it. Everything else is job of controllers. Sorry, it's MVC.
But here data is an external object. In your example it's pure. But also it can be functional, and some part of the model, such as validation can be moved to external data object. It's kind of local database management system.
Is it true vision of your example, or SAM generally?
@viktor-yakubiv as I said earlier, SAM answers three fundamental questions have have been overlooked:
if you are not interested in these questions, then SAM is not for you. SAM comes from the semantics of TLA+. Someone can tell me that I was wrong in interpreting TLA+ and we can discuss what it the best way to align with TLA+, but I didn't create SAM waking up one morning and said why don't we try that? SAM has nothing to do with Functional Programming, Object Oriented Programming, Reactive Programming, SAM Is not a language, it is a pattern to help you factor your code.
The model in SAM does indeed behaves like a database because it centralizes all mutations.