NoFlo - Flow-Based Programming for Node.js


Published on

Published in: Technology

NoFlo - Flow-Based Programming for Node.js

  1. 1. Flow-Based Programming for Node.js
  2. 2. @bergie
  3. 3. Call-Return
  4. 4. Continuation-Passing Style
  5. 5. JavaScript, the Ugly Parts
  6. 6. Promises
  7. 7. Hooks
  8. 8. How to make your code manageable?
  9. 9. Clean separation of concerns
  10. 10. Visualized connections between components
  11. 11. Flow-based programming“Flow-based programming (FBP) is a programmingparadigm that defines applications as networks of blackbox processes, which exchange data across predefinedconnections by message passing, where the connectionsare specified externally to the processes. These blackbox processes can be reconnected endlessly to formdifferent applications without having to be changedinternally. FBP is thus naturally component-oriented.” - Wikipedia
  12. 12. Flow-based programming
  13. 13. “Flow-Based Programming was invented byJohn Paul Morrison [from IBM] in the early1970s, and an early implementation of thistechnology has been in continuous productionuse at a major Canadian bank since that time.” - Wikipedia
  14. 14. Softwarearcheology?
  15. 15. “This is the Unix philosophy: Write programsthat do one thing and do it well. Writeprograms to work together. Write programsto handle text streams, because that is auniversal interface.” - Doug McIlroy
  16. 16. “I thought of objects being like biologicalcells and/or individual computers on anetwork, only able to communicate withmessages (so messaging came at the verybeginning -- it took a while to see how to domessaging in a programming languageefficiently enough to be useful).” - Alan Kay
  17. 17. send options a, u & x to command ps,send option firefox to command grep direct standard output of ps to grep
  18. 18. NoFlo components
  19. 19. Using NoFlo in your Node.js app
  20. 20. Using NoFlo in your Node.js app
  21. 21. DSL for specifying flows
  22. 22. DSL for specifying flowssend string package.json to source port of Read send output of Read to Split (by lines) send output of Split to Count send output of Count to Display
  23. 23. NoFlo shell
  24. 24. NoFlo in integration email External partners CouchDB + CouchApp Project NoFloController External systems
  25. 25. NoFlo in
  26. 26. NoFlo in real world
  27. 27. What happens next?● Web-based drawing ● support● Web-based ● Component loading monitoring & debug from NPM
  28. 28. Flow-Based Programming, the book
  29. 29. Flow-Based Programming for
  30. 30. Screenshot:, couple of weeks ago
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.