NoFlo - Flow-Based Programming for Node.js
-
Upload
henri-bergius -
Category
Technology
-
view
5.841 -
download
6
Transcript of NoFlo - Flow-Based Programming for Node.js
![Page 1: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/1.jpg)
Flow-Based Programming for Node.js
![Page 3: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/3.jpg)
Call-Return
![Page 4: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/4.jpg)
Continuation-Passing Style
![Page 5: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/5.jpg)
JavaScript, the Ugly Parts
![Page 6: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/6.jpg)
Promises
![Page 7: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/7.jpg)
Hooks
![Page 8: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/8.jpg)
How to make your code manageable?
![Page 9: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/9.jpg)
Clean separation of concerns
![Page 10: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/10.jpg)
Visualized connections between components
![Page 11: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/11.jpg)
Flow-based programming
“Flow-based programming (FBP) is a programming paradigm that defines applications as networks of 'black box' processes, which exchange data across predefined connections by message passing, where the connections are specified externally to the processes. These black box processes can be reconnected endlessly to form different applications without having to be changed internally. FBP is thus naturally component-oriented.”
- Wikipedia
![Page 12: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/12.jpg)
Flow-based programming
![Page 13: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/13.jpg)
“Flow-Based Programming was invented by John Paul Morrison [from IBM] in the early 1970s, and an early implementation of this technology has been in continuous production use at a major Canadian bank since that time.”
- Wikipedia
![Page 14: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/14.jpg)
Software archeology?
![Page 15: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/15.jpg)
“This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.”
- Doug McIlroy
![Page 16: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/16.jpg)
“I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages (so messaging came at the very beginning -- it took a while to see how to do messaging in a programming language efficiently enough to be useful).”
- Alan Kay
![Page 17: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/17.jpg)
![Page 18: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/18.jpg)
send options 'a, u & x' to command 'ps',send option 'firefox' to command 'grep'direct standard output of 'ps' to 'grep'
![Page 19: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/19.jpg)
NoFlo components
![Page 20: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/20.jpg)
Using NoFlo in your Node.js app
![Page 21: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/21.jpg)
Using NoFlo in your Node.js app
![Page 22: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/22.jpg)
DSL for specifying flows
![Page 23: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/23.jpg)
DSL for specifying flows
send string 'package.json' to source port of Readsend output of Read to Split (by lines)
send output of Split to Countsend output of Count to Display
![Page 24: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/24.jpg)
NoFlo shell
![Page 25: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/25.jpg)
NoFlo in integration
CouchDB+
CouchAppProject
Controller
Externalpartners
Externalsystems
NoFlo
github.com/iks/proggis
![Page 26: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/26.jpg)
NoFlo in integration
github.com/iks/proggis
![Page 27: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/27.jpg)
NoFlo in real world
![Page 28: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/28.jpg)
What happens next?
● Web-based drawing ● Web-based
monitoring & debug
● Hook.io support● Component loading
from NPM
![Page 29: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/29.jpg)
Flow-Based Programming, the book
amzn.com/1451542321
![Page 30: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/30.jpg)
Flow-Based Programming for Node.js
github.com/bergie/noflo
![Page 31: NoFlo - Flow-Based Programming for Node.js](https://reader033.fdocuments.in/reader033/viewer/2022060111/55669f3fd8b42acd288b48e1/html5/thumbnails/31.jpg)
github.com/bergie/noflo
Screenshot: github.com, couple of weeks ago