TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An introduction to NoFlo and flow-based programming

47 pointsby robhawkesover 10 years ago

10 comments

SomeCallMeTimover 10 years ago
I think the <i>types</i> of problems each programmer tends to confront make up a large part of the disconnect between the ones who &quot;drink the koolaid&quot; of a programming paradigm or process and the people who are unimpressed.<p>I typically do games. Games are useful to think, in part, in OOP terms; there is very little &quot;data flow&quot; and (typically) there are a lot of objects that need to interact in asynchronous ways. There are specific parts that could be reduced to flow based programming (FBP), but it seems like the wrong paradigm for writing an <i>entire</i> game, as an example close to me. I could imagine FBP certain AI logic state machines being useful, for instance.<p>But other areas of development have flow-style tools and that&#x27;s clearly the <i>right</i> way to write code. Signal processing is an obvious example: When you want to send an audio signal through a reverb, split it to two different types of processors and re-merge it later with a fader tied to an external control, laying those components out with boxes is 1000x better than trying to write code in text to do the same thing.<p>So I think articles like this are useful to introduce everyone to various other paradigms, in case they might be applicable to a problem that you&#x27;re working on. But it&#x27;s never a &quot;silver bullet&quot; simply because each tool works best in certain problem domains. A friend tried to convince me that I should drink the functional programming koolaid, for instance, but on drilling deeper I found that he had never worked on a game, and didn&#x27;t really grok what <i>kinds</i> of code you would normally end up putting in a game.<p>What I&#x27;d <i>love</i> to see is an article that compared a lot of different processes and paradigms and talked about <i>where</i> each is most useful. Especially if that article surprised me. :)<p>Problem is that most people are familiar with their own areas and toolsets; we&#x27;d probably need a team of people from different specialties to collaborate on it. Maybe a wiki where people could add in their experiences trying each approach or tool on their own problem domains? Then when someone <i>does</i> use functional programming to write a game, they could talk about the pros and cons and the kind of game they wrote. And <i>that</i> would be useful data.
评论 #8993537 未加载
评论 #8993477 未加载
aikahover 10 years ago
&quot;Flow&quot; programming is great for non programmers.I used it to develop VST plugins on pc and when I was working in video editing(compositing).<p>However,I wouldn&#x27;t use that to develop web apps.It&#x27;s often quicker to actually write the code,since app development is rarely just about piping stuff.
评论 #8993601 未加载
valarauca1over 10 years ago
One of the main issues with Flow-Based Programming is often while it optimizes generally in the opposite direction of Functional-Programming (Currying vs. Topological Sorting I.E.: Execute when needed vs. Execute as soon as possible) is that you tend to lose control of your software.<p>While I&#x27;m not suggesting a purely imperative approach, to a certain degree gains can be had in an imperative context over either Functional&#x2F;Flow Programming via in depth knowledge of OS&#x2F;Hardware processes and are generally NOT developer fast&#x2F;friendly.<p>From a personal stand point Flow-Based Programming is amazing for concurrency since it lets you see where you can use threads&#x2F;processes. As which sections of code are less <i>attached</i> to the rest.
评论 #8993478 未加载
zeLaurover 10 years ago
I have to admit, haven&#x27;t read all comments... but:<p>FBP, is nothing new ... In the enterprise world ( the world that I`m working in ) it is used quite frequently, and there are some products that live of this for example ( windows workflow foundation, workflowgen ) for the c# world.<p>FBP is a way of doing things, let&#x27;s say it is a pattern, like MVC ( less than more, but bare with me ) they each serve a specific task. To be a tad more clear, let&#x27;s say that MVC is more of a generic on size fits all approach while the FBP is more of a custom tailored way of doing things for (highly) specific things. So, MVC would be great for a wiki and FBP would be great for the whole wiki item management from treating the adding, verifing, drafts, plublish etc etc. ( I`m sure there are a lot of better examples out there ...)<p>The benefit of NoFlo is that they actually made something that is usually regarded as &quot;enterprise-ish crap&quot; and made it appealing. And again they did a great job with the visual editor, but from my own experience with visual flow design ... sooner that later you will be back to the code ( we you need to stray a bit from the Happy Path ).<p>Also, I think that frameworks like NoFlow are a very good step for Node in general showing that a lot more interesting things could be done apart for the tasteless and colorless REST apis.
jdmichalover 10 years ago
Things like this are great for data-processing pipelines with an enumerated set of common operations, most of which input and output the same data type. For instance, any data that can be redefined as a matrix, since a lot of matrix operations result in another matrix (or a vector, which is just a restricted matrix).<p>However, I can&#x27;t help but feel that applying it any more generally is a hammer-&gt;nail issue. Or, at least, completely invalidates the idea of &quot;massively reusable components&quot;. To make components more reusable, they have to make fewer assumptions about their input. To make fewer assumptions, they will typically need to do less. The reductio ad absurdum argument is that you end up with a bunch of components that each correspond to what would have been a line of code in a text editor, and all you&#x27;ve gained is a pretty picture.
falcolasover 10 years ago
One other thing I&#x27;d like to bring up - Go is a surprisingly strong tool for building flow based programs. It does have a few weaknesses, though, such as the lack of a graphical front end, but this isn&#x27;t a requirement to write a flow based program.<p>The other (more significant) weakness is that you will have to either deal with interface{} casting quite a bit, or write type specific versions of the basic utilities.<p>On the plus side, you get virtually free concurrency and nearly purpose-built communication channels!
评论 #8994641 未加载
otakucodeover 10 years ago
Visual programming has interested me for a long time because it is amazing how many times it has been tried and the result been unusable.<p>If I had the time and resources, I&#x27;d very much like to try developing a visual programming system that uses a user interface change that I think would greatly change things. Basically, using the middle mouse wheel to zoom in&#x2F;out. If you&#x27;ve played the Supreme Commander game series, you will have the best idea of what I mean. As it is, you end up with absolutely everything trying to be jammed in to one gigantic flat space. That&#x27;s terrible. Better would be zooming in on a &#x27;box&#x27; (function, data structure, etc) and having its guts become the new &#x27;context&#x27; you&#x27;re working in. So far as I have been able to find, this has never been attempted.
评论 #8994487 未加载
评论 #8996093 未加载
评论 #8993491 未加载
评论 #8994371 未加载
评论 #8993857 未加载
评论 #8995509 未加载
dharma1over 10 years ago
Thanks for the write up, has inspired me to give NoFlo a go. Reminds me of Reaktor (an app used to design audio DSP effects&#x2F;instruments)<p>Will be checking your blog for a more hands on series.
评论 #8995877 未加载
zobzuover 10 years ago
one advantage of this is that you can sandbox much smaller pieces of code.
评论 #8993459 未加载
评论 #8993436 未加载
jamesfisherover 10 years ago
How is flow-based programming different to FRP?
评论 #8993916 未加载