Hacker News new | ask | show | jobs
by nailer 3975 days ago
ractive. It's the best kept secret in web development.

Want a live binding, 2 way, super performant virtual DOM, that feels less like a framework and more like something that came with JavaScript?

    var binding = new Ractive({
      el: '.some-class',
      template: '<p>Hi there {{ name }}</p> <input value="{{name}}"/>',
      data: { name: 'Alex' }
    })
It's created and maintained by The Guardian interactive team.

http://www.ractivejs.org/

## Time needed for Learning the Framework (in Hours)

The basics take 30 seconds because almost everyone is familiar with handlebars/mustache templates, but 4 hours total.

Eg, ractive has promises for when stuff changes, and you'll have to decide how to load templates (eg, ES6 template strings, or browserify fs). Once you've done that there's not a lot to learn, which is great.

## Overall Development Speed (0-3 Points, greater better)

Development speed: 3. It's insanely fast to work with because it's simple.

## Maintainability of the Code (0-3 Points, greater better)

Maintainability: 3. it's small, so super readable.

## Why did you choose that Framework?

All of the above, plus the support side. It's been around for two years and everyone I know who's used it loves it.

6 comments

"best kept secret in web development" – agreed, Ractive has the lowest hype:quality ratio of any library I've used. It makes React look over-engineered and slow (and React is one of the best).
I was in love with Ractive at one point. But I have come to appreciate JSX over mustache after working on some non-trivial projects at work. Being able to do whatever can do in JS has saved me from googling for template helpers.

The one thing I do miss from Ractive is event-bubbling.

Other than that React has some other fringe benefits: ecosystem: React Native, React Router etc clojurescript: Reagent, Om etc

Agreed. I very much appreciate tools that do one thing well, and Ractive falls exactly in that category.

DeloreanJS [1] complements it well for Flux-y architectures.

[1] - http://deloreanjs.com/

This is my go too library for all new projects now. Big or small because its that easy to work with and makes web development that much easier.
I also use ractive for everything i can. Everytime i have to work with something else i want to shoot myself in the head after some time.
Also using ractive here. Very happy with it.