These are chat archives for jdubray/sam

7th
Aug 2016
Jean-Jacques Dubray
@jdubray
Aug 07 2016 00:15
Just wanted to comment on this article: "5 useful tips for real-world Redux" in the context of SAM
  1. Use a getters reducer to isolate the state shape
    this is not necessary since only the model and the state function can access the application state. Every element outside of the Model or State function see "props", there is no need for "getting" anything, in a reactive architecture you don't "get" anything, you are passed props you react to...
  2. Use JSON schema to validate the state shape
    I think that's a good one, that SAM should reuse prior to initiating a unit of work
  3. Use middleware to validate state across reducers
    Sure the middleware pattern is a great one
  4. Catch and dispatch exceptions from reducers
    I believe that one shows the clear difference between SAM and Redux. In SAM exceptions can occur both in Actions and Model. The Action exceptions are very easy to reason about (validation, enrichment exception) and can pass a clear exception to the model which ultimately make it's way to the Model. The Model exceptions are also very easy to reason about, in general you are violating some data integrity rules.
  5. Use stateless reducers for cross-cutting concerns
    That one is more javascript plumbing (which is always awesome) than redux specific, that's probably a great way to plug between actions and the model to achieve some level of reuse when creating common proposals across different actions
Fred Daoud
@foxdonut
Aug 07 2016 08:27
Excellent, @jdubray
Vincent Jo
@chiwoojo
Aug 07 2016 16:59
I just downloaded the SAM angular2 ng-admin and it looks like this:
blob
This message was deleted
am I missing something?
or is it still work in progress?
Jean-Jacques Dubray
@jdubray
Aug 07 2016 20:59
it shouldn't let me check the latest commit.
Jean-Jacques Dubray
@jdubray
Aug 07 2016 21:05
@chiwoojo it should look like this
Based on my latest commits, you should have the same results.
Jean-Jacques Dubray
@jdubray
Aug 07 2016 21:11
blob
Could try to make the screen wider, just to make sure it's not something I have coded wrong? On my side, bootstrap is working fine.
Jean-Jacques Dubray
@jdubray
Aug 07 2016 23:39
I have started working on the end-to-end architecture, SAM2: Services, APIs, Microservices