The Power of Resource-Oriented Programming in Flow/Cadence: A Deep Dive

Michael Bogan
6 min readNov 13, 2023

Flow is a permissionless layer-1 blockchain built to support the high-scale use cases of games, virtual worlds, and the digital assets that power them. The blockchain was created by the team behind CryptoKitties, Dapper Labs, and NBA Top Shot.

One of the best features of Flow is that it supports the paradigm of resource-oriented programming. Resource-oriented programming is a new way of managing memory where resources are held “in-situ” by the resource owner instead of in a separate ledger. This is very relevant for managing scarce and unreplicable digital resources on the blockchain.

In this article, I’ll do a deep dive into resource-oriented programming — and allow you to better manage your resources in your Flow smart contracts.

Source

What is resource-oriented programming?

In resource-oriented programming, objects are labeled as “resources”. Resources are a collection of variables and functions that only have exactly one copy at a time. Resources provide better composability than EVM and WASM.

When something is called a resource, there are very specific rules for interacting with it. The three rules that apply to resources in resource-oriented programming are as follows:

--

--

Michael Bogan
Michael Bogan

Written by Michael Bogan

25 years of startups, products, and software architecture. Currently run DevSpotlight — tech content for tech companies. michael@devspotlight.com.

No responses yet