3 ms·
Plug for a somewhat different take on "attribute-driven" development: https://github.com/QuickenLoans/Behaviors.js https://github.com/QuickenLoans/Behaviors.js
by romaniv 9y ago
Plug for a somewhat different take on "attribute-driven" development:
https://github.com/QuickenLoans/Behaviors.js https://github.com/QuickenLoans/Behaviors.js
No centralized framework. Everything is decomposed into "behaviors" that have no direct dependencies. Attributes are used for configuration and storing the running "state" of all libraries. Liberal use of CSS selectors as a kind of query language to remove the need for tree-traversal code.
The interesting thing about this approach is that it enables libraries/behaviors to interact and effectively "compose" at run-time without any direct code dependencies. It has some similarities to the idea of agent-oriented programming, which I think is a powerful idea worth a deeper look.
Of course, this is more of a proof-of-concept than a complete set of libraries needed for a complex website. However, I find this "behavioral" approach very enjoyable to use, because it makes development very immediate and incremental. Add an attribute, observe that it works, add another attribute, observe that it works, etc.
You also get progressive enhancement "by default".