Thoughts on the use of `link` nodes (Asking you)

Quick question - I don't know if there is an easy answer to this, so I'm asking.

Way back when there were no such things as the link-in and link-out nodes.
(I'll ignore the call for now)

So there were a lot of wires joining code together.

Nowadays when I make code I try (yeah - it's in the name) to make things modular.

  • Things are done in that block of code and the result is passed on.

The link node/s allowed all the backward running wires to be hidden and made for a cleaner looking flow.

So I have my blocks of code (aka routines) sitting there in their little bunch/group in/on the screen.

The output is then going to the next block of code.

Normally this would be done with the default wire connecting the two parts.

But I'm wondering if it is ..... nicer (?) to use the link nodes.
That way you have clear demarcation between the blocks.

Yes, you can group the blocks of code. I do that sometimes too.

But I'd prefer to stick to one thing at a time.
This is about using the link node rather than just using the default wire to connect blocks of code.

Thoughts?
For/Against?

There is no right or wrong, some people like a mess, others like it clean. I suspect that over time with expercience, one starts to optimize/compact flows.

I have a single flow that is taking many steps and it's all connected via link nodes just to make it a bit more compact within the group/layout. I wish there was a collapsible group though (with its own variables).

example monstrosity:

The link call nodes are used a lot within my flows, they are invaluable for reusables.

2 Likes

Thanks.

I wasn't wanting to say there is/was a RIGHT and WRONG way.

I'm seeing things and am wondering how others structure their flows.

I use link nodes a lot, nothing like the monstrosity that bakman2 has done above. :slight_smile: If I have a flow that does one job, it will have wires throughout.

Where I use them the most is for timers as I posted here previously, and common linking outputs - alerting, flow logging.

Oh, also make sure you name your link node pairs/partners, it helps with debugging. I also change the icons to match too.

1 Like

Ok.

I have a little rule for the use of them myself.

If local (on the same tab) leave them shrunk.
And YES names are good.

If they go between tabs, expand them to their full size.

This is ONE of the many flows I have one one RasPi

Interestingly opposite to you I leave the wires connected for local inject nodes and debug nodes.

Though in saying that you can see a lot of inject nodes on the right side of that picture.

I do appreciate what you said though. I do see uses for how you do what you do.

So if you look at that picture, most of the blocks are not DIRECTLY connected to others.
I use the link nodes to do that.

I think I like this because if I move one of the blocks the connecting (invisible) wires aren't seen and it makes for a clearer look of things.

:person_shrugging:

I don't have nearly such large flows as that.
Instead I put any self-contained processes on a separate editor tab and use link calls to connect to it.
Examples include database insert/select, email or SMS notifications etc.
No doubt other people prefer subflows for such tasks.

I also put the nodes which perform a defined function into a group together.
I try to line up nodes vertically and horizontally.
Within the group I use junctions to prevent wires crossing and passing beneath nodes.
Connections from one group to another mostly use link calls.

Like this it's easier for me to identify the flow and nodes to update when I need to modify a program.

Here's an example

Flows with widely spaced nodes, curvy wires and a lot of link nodes give me a headache:
image

3 Likes

You've lost me there.

What is the difference between junction and link nodes?

I sort of agree with your second picture, but shall accept that when designing something my flows look like that sometimes. :wink:

Interestingly I am turning to the thinking that within a group (block) I won't use link nodes.
The only link nodes are the main input or output of that group.

Your screenshots are how I work too. The second one would only be used to determine how to get something to work and lay it out correctly.

image

This is one example of how I use the link nodes.
This group is just to display a nice interface on the dashboard for controlling one of my wireless speakers.

Top input is from my music flow that formats a msg object.
Bottom input is for enable/disable of the controls when performing long actions (skip album/artist)
Output is for change in volume, track or play/pause control.

I format it this way, so that I just need to copy/paste the entire group for a new speaker and change a couple of things. Very modular.

2 Likes

I need to go that extra distance to change the icon of the link node.

I guess I have that extra bit of effort to apply.

But a good idea.
Though I'm not sure the in/outputs are that definable.

junction:

image

Ah, thanks. Yeah. Silly me.

this is one of my earlier flow, still working perfectly, so did not bother to disturb. although, if i want to try do some modification, i get lost.

after getting more tips and experience from the forum, this is what my newer flow looks like, grouping them and connecting with link nodes, does appear better.

image

Strange, I can't see the second picture.

Oops, that

I can't see the second picture

was for @smanjunath211

I see all 3 pictures in the reply, but if I click on any of them I am only offered 2 to see in a larger scale.

strange, I cant click it too.