NoFlo - Flow-Based Programming for Node.js

7,025 views
6,673 views

Published on

Published in: Technology
0 Comments
8 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,025
On SlideShare
0
From Embeds
0
Number of Embeds
219
Actions
Shares
0
Downloads
72
Comments
0
Likes
8
Embeds 0
No embeds

No notes for slide

NoFlo - Flow-Based Programming for Node.js

  1. 1. Flow-Based Programming for Node.js
  2. 2. http://bergie.iki.fihenri.bergius@iki.fi @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 github.com/iks/proggis
  25. 25. NoFlo in integrationgithub.com/iks/proggis
  26. 26. NoFlo in real world
  27. 27. What happens next?● Web-based drawing ● Hook.io support● Web-based ● Component loading monitoring & debug from NPM
  28. 28. Flow-Based Programming, the book amzn.com/1451542321
  29. 29. Flow-Based Programming for Node.jsgithub.com/bergie/noflo
  30. 30. github.com/bergie/noflo Screenshot: github.com, couple of weeks ago

×