ReArch

Banner

ReArch = re-imagined approach to application design and architecture

We must state definitions and provide for priorities and descriptions of data. We must state relationships, not procedures.

-- Grace Murray Hopper, Management and the Computer of the Future (1962)

Features

Specifically, ReArch is a novel solution to:

  • ️ State Management
  • Incremental Computation
  • Component-Based Software Engineering

And with those, come:

In a Nutshell

Define your "capsules" (en-capsulated pieces of state) at the top level:

Defining capsules
// Capsules are simply functions that consume a CapsuleHandle.
// The CapsuleHandle lets you get the data of other capsules,
// in addition to using a large variety of side effects.

// This particular capsule manages a count from a classic example counter app,
// using the state side effect.
(int, void Function()) countManager(CapsuleHandle use) {
  final (count, setCount) = use.state(0);
  return (count, () => setCount(count + 1));
}

// This capsule provides the current count, plus one.
int countPlusOneCapsule(CapsuleHandle use) => use(countManager).$1 + 1;