The new library specifies relationships “between elements on interactive websites. The constraints, as it were, can perform such tasks as automatically adjusting page elements as users interactive with them, or displaying dynamic data from other sites,” according to a statement.
The ConstraintJS library is a big deal. The research teams said ConstraintJS updates and manages how constraints can cause a component to automatically adjust the status of a web page and helps developers “specify and track the various ways that a page’s status might alter. For instance, how a button might act or change color when pressed.”
Programmers working within ConstraintJS now can write templated code that has a nearly identical syntax and learning curve as HTML, but code with new features that can increase versatility in Web pages.
Rather than “providing prebuilt widgets,” Oney said, the collaborators “re-examined some of the fundamental reasons that programming these widgets is so difficult. We provide a lightweight library that works with other libraries and with many different program structures.”
Adobe and the National Science Foundation helped bankroll the project.
Oney said the teams worked for two years on the library. Now that it has documentation and references, and now that bugs have been crushed, it’s ready for wide release. But work on it will continue.