simprokmachine 1.0.1
simprokmachine: ^1.0.1 copied to clipboard
A framework for automation of inter-class communication in a declarative style.
simprokmachine #
Introduction #
Every application consists of the classes that refer to the other classes, which refer to the other classes etc. It is a tree of classes where each one knows about its children and doesn't know about its parent.
In general, classes communicate with each other by calling methods and properties of their children to pass data "down" or by triggering a callback passing data back to the parent.
Moreover, we have many patterns to make this communication easier such as delegate, facade, observable, command, etc. And we haven't even started discussing how to pass data from logic layer to the UI.
Problem #
Every time the communication must be organized it is up to us to decide which pattern to use, and how to handle it. This requires attention and can easily result in unexpected bugs.
Solution #
simprokmachine is a framework that automates the communication between the application's components called "machines".
Example #
Check out this sample with a small counter app for a better understanding of the framework's main functions as well as wiki for API reference.
Killer-features #
- Declarative way of describing your application's behavior.
- Automated concurrency management saves from race conditions, deadlocks, and headache.
- Flexible. Every existing component can become a machine.
- Modular. Every machine can be described once and reused easily.
- Cross-platform. Native Android and Native iOS supported.
Installation #
Add the line into pubspec.yaml:
dependencies:
simprokmachine: ^1.0.1
Now in your Dart code, you can use:
import 'package:simprokmachine/simprokmachine.dart';
What to check next #
Check out these tools to see an existing library of useful machines and the architectural approach we suggest using.