learn-elm icon indicating copy to clipboard operation
learn-elm copied to clipboard

What is Unidirectional Data Flow?

Open YvesMuyaBenda opened this issue 6 years ago • 0 comments

From my point of view, the Elm Architecture can be approached from two concepts, in addition to a lot of simple examples to illustrate the architecture:

  1. This is Just a State Machine and Maintaining State in Elm
  2. Creating reactive software systems, by message-passing (passing of data) between software components (dataflow); i.e Elements of Dataflow and Reactive Software Systems

There are good good resources such as Thinking Computationally with Elm that give you all the basic information about state machines you need to know in respect to the Elm Architecture, but not many resources that talk about message-passing (I assume that not everyone is interested to go and read Dataflow and Reactive Programming Systems. What can I say? I just enjoy rabbit holes!)

However, there is Elm Web Development by Ajdin Imsirovic , which is not only a book for those new to Elm, but those new to web development in general, making it the only Elm book written for absolute beginners.

More importantly, the book bases its explanation on the concepts of message-passing, which to me is the only foundation which allows coherent definitions, and explanations of the concepts. To see what I mean, go check out Building Your First Elm App, where, in an excerpt from chapter 2 of the book, he discusses the components of the Elm Architecture, model, view, message, and update, all the way to a succinct description of the concept of "unidirectional data flow".

More of the book can be checked out here

Message passing is the way!

YvesMuyaBenda avatar May 22 '18 16:05 YvesMuyaBenda