Ractive aims to bring Web programming to the masses

The Ractive JavaScript library is designed to simplify the process of creating dynamic Web pages

Ractive.js comes with a set of tutorials aimed to get JavaScript novices who to use the library

Ractive.js comes with a set of tutorials aimed to get JavaScript novices who to use the library

The developers of a JavaScript library for building interactive user interfaces are hoping their work will make Web programming more accessible for part-time programmers.

The library, Ractive.js, provides a set of capabilities typically found in complex Web application frameworks, which require a fair amount of expertise to manage, said Rich Harris, one of the creators of Ractive and a digital journalist at the British newspaper The Guardian.

Harris, who presented the technology at the Association for Computing Machinery's Applicative conference in New York, demonstrated the capabilities of Ractive and discussed the current state of tools for building Web sites, which he described as too abstract and complex for non-programmers wanting to create their own sites.

"Web development has gotten too complicated," Harris said. "We should all want a world in which everyone can participate in the Web as a creator, not just publish text and images on someone else's platform, but be able to create rich, interactive Web experiences."

The original promise of the World Wide Web was that anyone could set up a Web site, using basic HTML, he said. While HTML still provides a basic foundation for posting text and images, advanced programmatic capabilities have not been not been made as readily accessible to the novice, Harris said.

While Ractive aims to lower the entry barrier to Web programming, it may still be beyond the reach of non-programmers. However, it could be intuitive for someone with a bit of experience with basic HTML and JavaScript.

Using Ractive, the programmer can tap into a wide range of functionality that would otherwise be too laborious to code by hand. Web pages can be automatically updated with data that is personalized to the user, or even supplied by the user. Ractive also allows the user to insert business logic into the Web page, for example to hide or show part of a Web page depending on the user's preference.

In many cases, Web sites with such functionality use frameworks such as Ruby on Rails or Django for Python, which are built on a Model View Controller (MVC) architecture. MVC stresses a "separation of concerns" whereby the user presentation of Web site is managed separately from the data and the logic.

While MVC can help manage large sprawling Web operations, the resulting code base can be difficult to fully comprehend, even for experienced programmers, Harris said. MVC codebases also gets brittle over time, meaning that they could break easily if changes are made, he noted.

Other JavaScript libraries, such as jQuery or Angular.js, also provide ways to work with user data on Web sites, though using them can lead to unstructured code that is difficult to manage. In jQuery's case, this is often called "spaghetti code."

Funded in part by the Bill and Melinda Gates Foundation, Ractive was developed so that it could be used by programming novices.

The library does not require external dependencies, or other programs that must be in place before the program can be used. The Ractive site has a set of tutorials, with code that can be easily copied and reused. Extra work was taken to craft error messages so they make sense, and link to further documentation online.

Ractive has already found a place in some large-scale Web sites. The Yellow Pages, the National Football League and the French Finance firm AXA have used the library for various tasks. It also is used for most of the Guardian's own interactive graphics.

In technical terms, Ractive provides the ability for the programmer to create a set of templates that can be dynamically populated with data or logic. It acts as a virtual DOM (Document Object Model), or an intermediary to the browser's own DOM, which the browser uses to parse HTML.

Ractive is not the only template-based JavaScript library using this approach. Meteor.js and the latest update to Handlebars.js use approaches similar to Ractive. "To me, that means it is an idea that makes sense," Harris said.

Joab Jackson covers enterprise software and general technology breaking news for The IDG News Service. Follow Joab on Twitter at @Joab_Jackson. Joab's e-mail address is Joab_Jackson@idg.com

Join the Good Gear Guide newsletter!

Error: Please check your email address.

Tags Development toolsapplication developmentThe GuardianWeb services developmentBill and Melinda Gates Foundationsoftware

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Joab Jackson

IDG News Service
Show Comments

Cool Tech

Crucial Ballistix Elite 32GB Kit (4 x 8GB) DDR4-3000 UDIMM

Learn more >

Gadgets & Things

Lexar® Professional 1000x microSDHC™/microSDXC™ UHS-II cards

Learn more >

Family Friendly

Lexar® JumpDrive® S57 USB 3.0 flash drive 

Learn more >

Stocking Stuffer

Plox Star Wars Death Star Levitating Bluetooth Speaker

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest News Articles

Resources

GGG Evaluation Team

Kathy Cassidy

STYLISTIC Q702

First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni

STYLISTIC Q572

For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Steph Mundell

LIFEBOOK UH574

The Fujitsu LifeBook UH574 allowed for great mobility without being obnoxiously heavy or clunky. Its twelve hours of battery life did not disappoint.

Andrew Mitsi

STYLISTIC Q702

The screen was particularly good. It is bright and visible from most angles, however heat is an issue, particularly around the Windows button on the front, and on the back where the battery housing is located.

Simon Harriott

STYLISTIC Q702

My first impression after unboxing the Q702 is that it is a nice looking unit. Styling is somewhat minimalist but very effective. The tablet part, once detached, has a nice weight, and no buttons or switches are located in awkward or intrusive positions.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?