These are chat archives for jdubray/sam

20th
Feb 2016
Gunar Gessner
@gunar
Feb 20 2016 15:21
@jdubray I've now read you explain nap() the 4th time. You're just tireless! Kudos :D
Jean-Jacques Dubray
@jdubray
Feb 20 2016 18:28
:-)
Jean-Jacques Dubray
@jdubray
Feb 20 2016 18:48
Developers and Architects tend to ignore state (as in SAM state) because they are used to build monolithic architectures where the server-side code always acts as a safety net for whatever the client is trying do, this is a recipe for disaster when building composite applications where the APIs’ state machines cannot easily be aligned with the solution’s state machine, since they are built by different teams or even third parties.
That's why "State" need to surface in the Front-End Architecture, otherwise we'll be heading for a big big mess.
React and Redux make it even more complex to reason about about State because they have tied the Model and the View at the hip (when the model mutate by one property the View renders). Who in their right mind would think that this is a sensitive thing to do? As I mentioned, I found React incredibly innovative, it certainly lead me to SAM, but React is nearly 100% flawed architecturally.
Jean-Jacques Dubray
@jdubray
Feb 20 2016 18:53
So you have no choice than to start spreading the model and state across components which is pure heresy, or you start coupling the actions with the model mutation, such that you can get to point where you mutate the model 100%. Again, think of, architecturally, how flawed that can be?
It is even fair to start asking the question if Facebook will not fall at some point under the weight of such a flawed architecture?
Jean-Jacques Dubray
@jdubray
Feb 20 2016 21:35

Sorry but that code made me laugh

controller: angular.noop, // or function () {} whatever
  controllerAs: '$ctrl',
  template: [
    '<div>',
      '<p>Name: {{$ctrl.name}}</p>',
      '<p>Age: {{$ctrl.age}}</p>',
    '</div>'
  ].join('')

really? {{$ctrl.name}}