Total Pageviews

Adobe and CMU researchers unveil a brilliant new JavaScript library: ConstraintJS

Adobe and CMU researchers unveil a brilliant new JavaScript library: ConstraintJS

Above: Carnegie Mellons Stephen Oney.

Image Credit: Stephen Oney

Adobe’s vaunted research group and the crew from Carnegie Mellon University’s Human-Computer Interaction Institute have been busy.

After working closely in the garage together (as it were), the two teams have emerged and announced the creation of ConstraintJS, a new open-source JavaScript library that, according to CMU, makes it easier to create interactive Web applications.

The hugely successful JavaScript language launched 20 years ago. It’s main function is for controlling Web browsers, making changes in displayed documents, and sending messages.

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.

"JavaScript drives the modern Web,” CMU professor Brad A. Myers, who worked on the project, said in a canned statement. “Still, making interactive apps easier to program is a longstanding and fundamental problem. It's difficult to create interactive Web pages, because Web programming normally requires learning at least three languages: HTML, JavaScript and CSS."

CMU Ph.D. student Stephan Oney, 28, was one of the team leaders on the development. He said some of the technical difficulties writing in JavaScript libraries are now easier. He said some JavaScript libraries provide reusable widgets, but those might not always dovetail with the specific demands of those writing code.

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.

“I can’t say this is going to change the world, but its actually a good starting point for other projects,” Oney told VentureBeat. “It’s pretty effective. It makes user interfaces easier to create and provides an interactive editor for people who don’t know JavaScript that well.

You can scope out ConstraintJS here and follow Oney and his work here.


Use a free or cheap marketing automation system? Tell us what's great about it (and not so great), and we'll share survey data from everyone else with you.


Whether it's a smartphone or tablet app, a game, a video, a digital magazine, a website, or an online experience, chances are that it was touched by Adobe technology. Our tools and services enable our customers to create groundbreaking... read more »

Pioneering Solutions for the World Carnegie Mellon University is a global research university with more than 11,000 students, 86,500 alumni, and 4,000 faculty and staff. Recognized for its world-class arts and technology programs, col... read more »