DEV Community

NodeServerless
NodeServerless

Posted on

2

Notion.so 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 Notion.so. The person behind Notion.so 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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more