These are chat archives for jdubray/sam

24th
Nov 2017
Jean-Jacques Dubray
@jdubray
Nov 24 2017 02:19
Jean-Jacques Dubray
@jdubray
Nov 24 2017 12:04
You can see in that presentation how "frameworks" get built. Someone picks up a perfectly good conceptual foundation (Enterprise Integration Patterns) but totally irrelevant to the problem at hand (state Management). Integration patterns are communication patterns focusing on state "alignment" between two or more systems, while state management is focus on mutation, and then you cram as much of the conceptual foundation into the new shiny framework. I forgot, make sure you call it right away "best practices" even if it's not battle tested.
Nick Maravich
@nick_maravich_twitter
Nov 24 2017 13:17
Hi All - I'm a self-taught programmer and I am not very great at it... :) I program only to "hang" in technical conversations without getting completely left out of conversations. I also enjoy getting something to work which I find fascinating. To a non-programmer - MVC does not really make much sense to me - but I always chalked that up to my lack of knowledge. I did everything the wrong way when I first learned how to code - I started programming in VBA and then jumped right into Rails - to be fair - I am not bad at VBA but I completely stink at Rails! I really don't get it - nothing about it is intuitive to me - again this is on me. However, after a while I found the courage to question MVC which lead to my discovery of SAM. My question is this: Can someone direct me to some SAM/Ruby examples? I'm looking for examples that have DBs in the illustration. I have a hello world app in rails built where a user uploads a file via a Rails Gem called CarrierWave. The objective of the app was to process dynamic columns from a CSV or Excel file and then display the contents to the user. I did this all wrong ... I broke all the MVC rules ... I processed a lot of the data in the View via ERB and HTML. Now, I would like to "save" the view to a Model. Common counsel would tell me to process the file and save to the DB right away - but I wanted to give that choice to the user - maybe they don't want to keep the data - maybe they just want to inspect it first and then decide later if they want to save it? That was my thought process... :) here is the app https://wheregamersgame.herokuapp.com/ Looking forward to learning something based upon feedback from the group via a SAM viewpoint.
Jean-Jacques Dubray
@jdubray
Nov 24 2017 14:43
@nick_maravich_twitter welcome many of us are self-taught, I wrote my first line of code 37 years ago, still happy to write more. I don't remember seeing a ruby sample, but I'd be happy to provide feedback if you want to share the code. I am not sure SAM would work well with Rails specifically since it is a framework, SAM is also designed to sit between the front-end and the system of record, it does not have any direct relationship to the database.
From an application architecture perspective I see us using more and more client-side persistence technologies to address the UX that you are talking about. Yes, it's way too complex to manage that transient, not-yet-transactional, state all the way down to the system of record. Have you looked at PouchDB/CouchDB?
I am building a PouchDB sample (PWA) this week-end actually.