DEV Community


Posted on data sharing with transclusion

Developers without much of a background in Functional Programming or Category Theory may struggle when first confronted with the idea of a "topology" or "working surface" when doing programming.

Usually that sort of creature shows up when trying to debug a program or perform introspection through code and data.

The idea of treating the programming medium itself as some sort of walkable "surface" is more common in operating systems (think filesystems) or databases (think spreadsheets or graphs etc.) but this is also how web documents such as XML and HTML etc. operate.

In fact, the main reason why we use interim documents like XML and HTML is exactly to allow us to move between programming and topology (actually algebraic geometry).

Transclusion is the idea of having the same data show up in multiple places, most famously being The person behind is Ted Nelson. It is essentially a way to perform data normalization.

Below, we use the NodeServerless REPL to demonstrate some of this 'transclusion' by having the variable "here" also projected to a variable "there". We did this by using the "ln" or "link" command similar to what is found in Linux. Note that in practice, both variables would probably pull from a common location.

The linking mechanics are fairly straightforward using JS proxies (as indicated with the pink arrows).

I hope this helps explain such a powerful concept without getting into heavy math. Transclusion is key to how spreadsheets work and the functional dependency calculations behind them (which gets more into category theory).

NodeServerless is now part of CodeCraft.AI

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git