These are chat archives for jdubray/sam

Jul 2017
Rob Siera
Jul 01 2017 11:58
How viable is it to migrate an existing MVC project to SAM pattern? Any comments on that?
Jean-Jacques Dubray
Jul 01 2017 13:00
Is it an SPA or does it do server side rendering?
Jean-Jacques Dubray
Jul 01 2017 13:06
@robsiera If it is an SPA you can start by taking control of a single div. If it's a server side architecture the problem could be the session because you need to rehydrate the entire model. It's not hard I published an example using AWS lambda and dynamoDB. SAM is just a way to structure your event handlers, nothing less, nothing more.
It's very easy to migrate DOM manipulations to functional HTML (V = f(M))
If you use JQuery, SAM works well with JQuery as well (Date pickers, DataTables, C3/D3...)
Jean-Jacques Dubray
Jul 01 2017 13:51
Functional programming in Javascript is an antipattern
(And Clojure is actually easier)
Jean-Jacques Dubray
Jul 01 2017 15:13
"Immutable transformations in Javascript are more difficult than they need to be. I feel like the language is fighting me every step of the way. "
I think you are fighting the language not the other way around. Embrace Mutability!
Jean-Jacques Dubray
Jul 01 2017 15:57
"Our architecture is React/Redux/Ramda in TypeScript; we ripped ImmutableJS out shortly after starting down the path of using it. Like you, we found the overhead of its function space cognitively unbearable, and like other responses, we found that its touted performance gains really didn’t apply even in our size app; we needed to deal with mutability where we had large data because it was constantly changing, while ImmutableJS just was not feasible."
Zach Dahl
Jul 01 2017 16:37
I like clojurescript. I don't like immutablejs but think fp in js is the bees knees
Jean-Jacques Dubray
Jul 01 2017 17:03
Aren't all these programming models the sign that something is fundamentally broken underneath? Programming shouldn't be an art?
I like this picture in the article:
Perfect depiction of pretty much every programming model I faced since I started coding
Marcus Feitoza
Jul 01 2017 17:47
@jdubray Could you init them samples repository in sam-pattern org?
Jean-Jacques Dubray
Jul 01 2017 17:51
yes, it's on my list, I'll try to get it done over the next few hours