These are chat archives for jdubray/sam

12th
Feb 2016
Danny Moerkerke
@DannyMoerkerke
Feb 12 2016 08:47
So the point here is to build the view in such a way that there is no need to re-add listeners because the html that triggers an action (say a button) is separate from the html where the result of the action is displayed (e.g. <div id="view">) ?
Jean-Jacques Dubray
@jdubray
Feb 12 2016 09:08
yes, that's how I would do it. SAM is like MVC, it does not mandate a particular implementation. The constraints are only on the semantics.
V = S( vm(M.present(A(data))), nap(M))
where S, vm, A and nap are pure functions
After that you can use for instance pub/sub for implementing the present method, cycle.js looks wonderful too.
Works with HTTP (kind of, like MVC2), WebSocket (better), Polling, ... Meteor would work well
It's really up to you. All I want to emphasize is that the need for frameworks is greatly reduced compared to MVC because of the structure of the pattern.
I may be wrong, but I would expect 80% of the apps would be built without a framework. I really enjoy not having to use any framework. Just JavaScript (or your favorite overlay), this is really fresh. I am certain a lot of people are like me and want to code with minimal constraints.
Jean-Jacques Dubray
@jdubray
Feb 12 2016 09:14
I had a great discussion earlier with @gunar in the sam-examples room about an example he built with Babel. It was very informative, I believe for both of us
Danny Moerkerke
@DannyMoerkerke
Feb 12 2016 10:28
Great, thanx! I believe I have quite a good idea of SAM now and will try to implement an example after the weekend.
Jean-Jacques Dubray
@jdubray
Feb 12 2016 15:45
The article has been translated in Russian