dwyl / time-mvp-node

The most basic version of our Time App possible to start *using* it internally!
https://time-mvp.herokuapp.com
GNU General Public License v2.0
13 stars 2 forks source link

Apply Elm Architecture to tidy up Client.js Code a bit? #33

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

while I am deliberately not using any frameworks/libraries in client.js to make it as approachable (beginner-friendly) as possible I think the structure/organisation of the code could benefit tremendously from the Elm Architecture so it's clear what each piece of the code does and the "flow" of data through the app.

For reference, the client.js at the time I am opening this issue looks like this: https://github.com/nelsonic/time-mvp/blob/994ccf496a3a602fc9e30d0f51690c2792d1b911/lib/client.js It works but is rapidly approaching "spaghetti". (and not the tasty kind!)

nelsonic commented 7 years ago

image https://xkcd.com/844/

nelsonic commented 7 years ago

See: https://github.com/dwyl/learn-elm-architecture-in-javascript