These are chat archives for jdubray/sam

22nd
Feb 2016
Stardrive Engineering
@HighOnDrive
Feb 22 2016 04:12

Had a look at the new site and noticed a few simple grammar mistakes here and there, I'm sure you would spot these just from a careful read :smile:

SAM certainly presents something close to my own process, so it is appreciated because such a pattern is hardly addressed by existing frameworks, yet it should be at the heart of them all.

I'd say SAM is a delightful confirmation of a pattern I have discovered and already applied to a great extent. In my case the pattern stages my reactive loop, which I am implementing with RethinkDB and RxJS.

Above all apps are about features and these can be defined as control states, the rest is just a process. I have found that frameworks just get in the way of orchestrating the all important reactive flow.

However, once completed I will likely wrap it all up with Cycle.js, which is an especially clean way to produce modern apps in the functional paradigm.

Michael Solovyov
@msolovyov
Feb 22 2016 04:25
I wanted to use JSX without react, I found https://github.com/dekujs/deku
it allows one to write view functions in js such as:
view.ready = function(model) {
    return (
            <div>
                               <p>Counter:{model.counter}</p>
                       <form onSubmit="JavaScript:return actions.start({});">
                       <input type="submit" value="Start"></input>
                </form>
      </div>
        ) ;
}
Jean-Jacques Dubray
@jdubray
Feb 22 2016 07:22
That's a great find, thank you. I don't mind using react as long as it is purely stateless functions (with respect to the model).
I really like being able to implement smart(er) code generators. It's not apparent in the samples that I provided, perhaps except that one, but the value I see using JavaScript over templates (granted JSX is JavaScript not templates) is that I can write things like that:
 if (id.length === 0) { cancelButton = '' ; valAttr = "placeholder"; idElement = "" ; actionLabel = "Add"}
edbienes
@edbienes
Feb 22 2016 13:45
@jdubray I'm new to this but I'd like to apply SAM in google's dartlang projects.
Jean-Jacques Dubray
@jdubray
Feb 22 2016 19:47
I don't see any reason why it would not work with other languages. SAM is only a pattern, it does not require any library or frameworks. Happy to assist if you have any question.