Better README text
This commit is contained in:
parent
1f8c3b7a78
commit
921b51e2b3
41
README.md
41
README.md
@ -1,32 +1,31 @@
|
||||
# Reactimal
|
||||
|
||||
Reactimal is a set of primitives that can be used to express your code as a logic graph using reactive
|
||||
programming methods.
|
||||
|
||||
In computer science, we learn that a function is a process with some inputs and an output.
|
||||
Imperative programming languages focus on constructing the operations that convert inputs to output.
|
||||
Since a program is a collection of functions, there is inevitably shared state that the many
|
||||
functions act on. In this situation, one value in the shared state could be updated through any
|
||||
number of functions. The situation that causes this is called "spaghetti code" where code size grows
|
||||
to the point such that it's difficult to understand the code path that each task takes through the
|
||||
code base.
|
||||
|
||||
To avoid this situation, Reactimal maintains links to the whole logic graph so it's easy to see what
|
||||
outputs come from what inputs.
|
||||
Reactimal provides a set of primitives that can be used to express your code as a logic graph using
|
||||
reactive programming methods. Reactive programming inverts the dependency relationship between
|
||||
functions and their parameters. No longer do callers need to know the signature of the functions
|
||||
they call. Instead computed values subscribe to scalar properties or other computed values. The
|
||||
reactive method improves code readability and reduces the tendency toward spaghetti code.
|
||||
|
||||
Reactimal provides the following reactive programming primitives. Each type of primitive is
|
||||
[subscribable](./subscribable.md) and provides a single output value, but differ in how they receive
|
||||
their input. In short:
|
||||
[subscribable](./docs/subscribable.md) and provides a single output value, but differ in how they
|
||||
receive their input.
|
||||
|
||||
- A [property](./docs/property.md) directly receives a single value as an entry point to a logic
|
||||
graph
|
||||
## Input Primitives
|
||||
|
||||
- A [property](./docs/property.md) directly receives a scalar value. It serves as an entry point to
|
||||
a logic graph for scalar values.
|
||||
- A [container](./docs/container.md) wraps javascript container objects and triggers an update when
|
||||
a property changes.
|
||||
- A [computed](./docs/computed.md) only receives values from other subscribables.
|
||||
a property changes or a method is called. (NOTE: Nestable container changes are tracked only one
|
||||
level deep.)
|
||||
|
||||
## Computational Primitives
|
||||
|
||||
- A [computed](./docs/computed.md) only receives values from other subscribables but serves to
|
||||
compute new values. This is the function in the logic graph.
|
||||
- A [stream](./docs/stream.md) is the asynchronous version of a computed.
|
||||
|
||||
Reactimal also includes a few [utilities](./docs/utilities.md) that may be useful when building logic
|
||||
graphs.
|
||||
Reactimal also includes a few [utilities](./docs/utilities.md) that may be useful when building
|
||||
logic graphs.
|
||||
|
||||
## Inspiration
|
||||
|
||||
|
||||
Reference in New Issue
Block a user