code4590701280100532389orig

SamsaraJS: Famo.us fork juices mobile Web UIs

The former chief architect of the Famo.us JavaScript library has moved on to developing his own JavaScript UI project for the mobile Web, called SamsaraJS.

Described on GitHub as a "functional reactive library for animating layout," SamsaraJS is the brainchild of David Valdman, who left Famo.us -- now known as Famous -- in August 2014. The library, which recently released version 0.2.0, grew out of his work there.

"SamsaraJS gives Web developers a tool to create native-like app experiences," Valdman said in an email. The library was created to solve performance issues on the mobile Web.

SamsaraJS provides a language for positioning, orienting, and sizing DOM elements and animating these properties. Everything from the user input to the rendering pipeline is a stream, so building a user interface becomes the art of composing streams, according to Samsara's GitHub explanation.

Valdman said Web developers are held back primarily by two factors: performance on mobile, and expressiveness. "By expressiveness, I mean a way to think about interactivity in user interfaces that isn't watered down. With CSS3 we could finally have animation," he said. "But coordinating the animation of dozens of items, tying that to user gestures, incorporating physics and 3D space, that's well out of the reach of CSS3." SamsaraJS is trying to make this simple without compromising on performance, he said.

Asked how SamsaraJS compares with other JavaScript technologies including Famous, React, or Angular, Valdman said it was focused on one element: layout. "That means x, y, z positions; heights and widths; opacity. These are the kinds of things that change at 60fps when animation and responsive design are involved. These are also the greatest barriers to performance. Other MVC frameworks are concerned with content, and mostly leave layout to the developer."

Since content does not change at 60fps, these frameworks focus on very different problems: data-binding, routing, and so on, said Valdman. "SamsaraJS is meant to be used with one of these frameworks, where it controls the layout and the framework populates it with content. This harkens back to the original separation of concerns of the Web."

IDG Insider

PREVIOUS ARTICLE

« China vs. the machine (learning)

NEXT ARTICLE

UN panel backs WikiLeaks' Julian Assange, but he may not go free »
author_image
IDG News Service

The IDG News Service is the world's leading daily source of global IT news, commentary and editorial resources. The News Service distributes content to IDG's more than 300 IT publications in more than 60 countries.

  • Mail

Recommended for You

Future-proofing the Middle East

Keri Allan looks at the latest trends and technologies

FinancialForce profits from PSA investment

Martin Veitch's inside track on today’s tech trends

Amazon Cloud looms over China: Bezos enters Alibaba home ground

Lewis Page gets down to business across global tech

Poll

Do you think your smartphone is making you a workaholic?