New York Tech Journal
Tech news from the Big Apple

#Flux as a #StateSpaceModel of user interactions and #LocalStorage options for #WebBrowsers

Posted on August 11th, 2015


08/11/2015 @Goldman Sachs, 200 West St. NY
Taylor Hakes spoke about Flux and Geraldina Alvarez Garcia spoke about local browser storage.
20150811_194542[1] 20150811_194803[1]

In the first talk, Taylor Hakes gave an introduction to Flux, an approach to organizing web development. Taylor spoke about the problems of purely programming the dom. One is that user interactions can be conceptualized by creating models in the virtual dom,  but the two-way interactions between models and the UI offers little structure and the possibility of a complex web of interactions.  For example, a user input can trigger many outcomes that may be hard to conceptualize or debug.

He then offered a view in which user interactions flow through a single dispatcher that coordinates all action requests, updates a state space, which in turn drives views. User interactions are routed through action requests, which then restart the state space update process coordinated by the dispatcher.

Taylor presented code examples showing that

  1. Actions are now functions
  2. The history of interactions is stored in state variables
  3. Debugging is easier since the state variables can be monitored vs. the user actions
  4. Flux is verbose, but useful when the logic is complex, but the number of states is manageable
  5. React complements Flux

To learn more, Taylor recommended the book: Evaluation of Flux Frameworks – by Dan Abramov


In the second talk, Geraldina Alvarez Garcia @Kickstarter discussed methods for storing data from a web browser on the local computer. The four methods are

  1. Cookies
  2. Local key-value store
  3. Session storage
  4. indexDB

Cookies are the most prevalent form of local storages, but they are limited to 4k of information. Geraldina talked about an application needing more storage and showed a code snippet implementing a key-value store. It can store up to 5MB of data, but cannot transfer the data directly to a server and is a synchronous operation which may interfere with other operations such as real-time interactive video.

posted in:  Html5 NYC, javaScript, NYCHTML5, Programming    / leave comments:   No comments yet