HTML5 ARTICLE

September 08, 2014

New JavaScript Framework Delivers on HTML5 Promise


The rendering of graphics inside Web browsers has become something of a battle between multi-purpose scripting languages and the basic markup language of the Web itself, HTML. Although HTML does a good job of rendering basic frames and producing the layout of pages, it does not always excel at animations or complex graphics. Even the advancements seen in HTML5 do not always stand up to the demands of modern Internet users.

One new company is trying to leverage the power of JavaScript, a scripting language often applied to Web-based applications, to create a consistent, powerful, and graphics-intensive browsing experience for Internet users across all desktop and mobile devices. This company, called Famo.us, describes its product of the same name as a "JavaScript framework that helps you create smooth, complex UIs for any screen." It is free and open source, so anyone can contribute and help make the code even better.

The founder of Famo.us, Steve Newcomb, recently spoke to TMC (News - Alert) about the particulars of this company and the technology it develops. He said that Famo.us delivers on the promise that HTML5 originally made to all connected users—that the Internet would be more interactive and that Web development companies could work with a single codebase and create webpages that acted the same across all devices. He suggests, however, that the promise has not yet been fulfilled.

"[HTML5] held the promise of integrating with all of the existing Web world, with all of the built Web infrastructures that are already in place. But it failed because performance was terrible and animations didn't feel 'native.' Companies like Facebook, LinkedIn, and Twitter (News - Alert) pulled back from their HTML5 efforts, blog posts began claiming the Web is dead, and an entire industry fell to its knees. We searched for the root of the problem and realized it was the reliance on the very poorly performing layout renderer and animation engine resident in the browser," Newcomb said.

"With JavaScript, we realized that we could take matters into our own hands and replace those weak points with a JavaScript 3D renderer and Physics Engine and we could do it without requiring any download, plugin, or installation process [from] the user."

The Famo.us engine, he says, works with HTML5 to create a Web experience that is "simply automatic." Animations and performance feel "native," and there is no gap between what users demand and the performance their browsers can deliver. Moreover, there is no gap between mobile and desktop devices because Famo.us is able to replace a browser's rendering engine with a technique that turns webpage parsing on its head. Instead of forcing the browser to process animations on its own, Famo.us uses JavaScript to compute the layout of an animation (or of most of a website) and allow the browser to deal with basic webpage structure. The Famo.us website describes the basic difference between how source code in an HTML5-based site will look and how an HTML5 + Famo.us site will look.

"If you inspect a website running Famo.us, you'll notice the DOM is very flat: most elements are siblings of one another. Inspect any other website, and you'll see the DOM is highly nested. Famo.us takes a radically different approach to HTML from a conventional website. We keep the structure of HTML in JavaScript, and to us, HTML is more like a list of things to draw to the screen than the source of truth of a website," the site says.

Famo.us claims that it can render Web animations at high-definition video quality—60 frames per second. This was unthinkable only a few years ago, and although HTML5 cannot deliver on that feat on its own, with Famo.us it has the potential to change the entire landscape of how the Internet operates. Companies such as Facebook (News - Alert) can begin to create scrolling timelines that respond more dynamically to user input or to updated user information; game developers can create interactive content that looks and feels real. With HTML5 allowed to do what it does best and Famo.us doing all the lifting regarding heavy-duty graphics implementations, businesses can stop being afraid to innovate graphics-intensive content with the expectation that browsers will leave them wanting. Now, browsers can deliver, and they are just waiting for developers to test them.




Edited by Maurice Nagle





HTML5 RESOURCES

HTML 5 Demos and Examples

HTML 5 experimentation and demos I've hacked together. Click on the browser support icon or the technology tag to filter the demos.... Learn More

HTML5 GAMES

HTML5games.com is the largest and most comprehensive directory of HTML5 games on the internet... Learn More

The HTML5 test

How well does your browser support HTML5?... Learn More

Working Draft (WHATWG)

This is the Editor’s Draft from WHATWG. You can use it online or print the available PDF version... Learn More

HTML5 Flip Book

Free jQuery and HTML5 flip book maker for PDF to online page turning book conversion... Learn More