Very interesting, but one thing Re: AngularJS<p>> dependency injection minification headaches<p>Meh, that's hand-wavy at best. The only thing you have to do to pass minification is to include the injected dependencies in an array like so:<p><pre><code> ['$stateProvider', '$urlRouterProvider',
function ($stateProvider, $urlRouterProvider) {
// Stuff
}]
</code></pre>
You get used to it in seconds and then it's not really an issue anymore.
The examples for these kinds of frameworks always show you data binding for scalar values. That's easy. What's the story for more complex updates?
This is fascinating: I've been writing a very (and I mean <i>very</i>) similar library that also uses the concept of a Parallel DOM (dependents, views updating on a 'data' property, nodes named by standard ids, all child nodes with IDs scanned for and bound to a property), I had just decided to create the concept of 'Keypaths' as my events were clashing on ids.<p>The thing I have that I can't see here is a selecting/switching node: essentially a page or a tab that holds multiple states but only presents one at a time.<p>Thus makes me very happy and very sad: happy as I don't have to write all things things now; sad becasue I don't get to write all these things now.
Hi Rich,<p>This looks promising. Can you comment on similarities/differences between Ractive and facebook's React.js in terms of style and performance?<p>Also, looks like the github minified version is 72k, is that correct?
Its naming is a bit conflicting to component/reactive. The name "reactive" is so presumable that other people will choose in the future.
<a href="https://github.com/component/reactive" rel="nofollow">https://github.com/component/reactive</a><p>I haven't looked into Rivet.js, component/reactive or other equivalent library. I'm just planning to research which library is the best fit for me. I don't really like full-stack framework like Angular. It was nice to know yet another candidate.<p>Does anyone know any other reactive template engine?
Nice - looks very simple and lightweight! I especially like the effort put into the interactive tutorial documentation that these frameworks have. Angular and knockout both had stand out docs too!<p>Is there a particular niche for this framework would you say e.g. small, fast to market apps like news stories - or is is suitable for larger projects where you might normally reach for more of a "framework"?
Can someone comment on where to find performance information on this framework? AngularJS has some very smart ideas that allow it to be magical and performant. This looks very cool, and I would like to make sure it is not just polling for changes. I'm suspicious because there is no $apply required. :)
I have a question, since this has been bugging me with other js MV* frameworks lately... Is the set() method necessary for updating single attribute? All browsers have supported getter/setter APIs (__defineGetter__ and Object.defineProperty), why not take advantage of them? Being able to say this would be cool:<p><pre><code> div.color = 'blue';
</code></pre>
instead of:<p><pre><code> div.set({ color: 'blue' }); or div.set('color', 'blue');
</code></pre>
Or would this cause other problems that I'm not thinking of?<p>Edit: my ruby cap is on a little tight today. Javascript programmers might not expect extra logic to be run just by updating a property. I still think it would be cool though :)
I like a lot of this, but one part I'm not so sure of is that, if I follow the docs, all get/set operations need to be from the root of the model. They take a "keypath" that starts at root, like "obj.get('subObj1.subArray[3].prop')". It seems to me like that would make it difficult to decompose a large application into component pieces. Your components, to do any get/set operations, would need to know their path from root. And what if that path changes, like an array that's modified? Seems like it could become a considerable barrier in mid-to-large applications.
I like it's elegance, but it looks seems similar to using an Ember.js view and Handlebars templates.
<a href="http://j.mp/reactiveinember" rel="nofollow">http://j.mp/reactiveinember</a>
Nice little library. I think i will have a close look and implement it into apiDoc (<a href="http://apidocjs.com" rel="nofollow">http://apidocjs.com</a>) Templates - for now i use crude jQuery events (quick & dirty coded).
With Ractive i think i can make the code cleaner and easier to modify.<p>At the moment i prefer Backbone in my other projects, but it is to "heavy" for a small single page (especially for users that did not know backbone and want to modify the templates).
Cool website and examples!<p>You should probably explain how ractive.js differentiates itself from knockout. It's the direct competitor out there, not angularJS which is doing things very differently.<p>I glanced at the source and (correct me if I'm wrong) it seems array templating is done by simply comparing the length of the current and previous arrays? That's naive and buggy?<p>Good luck
Can anyone comment on using Ractive as a replacement to Backbone.View? I'd think that making Ractive the view layer in a Backbone app would go a long way in augmenting a lot of the things that Backbone refuses to do in views (binding, smart DOM management/manipulation, actual templating support)
I <i>really</i> like this library.. it's been a while I've been looking for something similar. Angular was a bit "too big" for some of my projects, and backbone was just too verbose. Something like this will let me keep the code clean while still not getting involved in a big framework.
@rich_harris:<p>1. Great library, thanks for contributing!<p>2. What was your motivation to add transitions and animations, isn't that a bit out of scope?<p>3. I has no dependencies, why did you choose not to?
So as this is DOM manipulation, it's a competitor to jQuery, right? If so, what are the advantages over jQuery, and would it make jQuery redundant now (for new projects)?
Is there anyway to use any other templating system with Ractive other than the Mustache style syntax? Couldn't use microtemplates / EJS style templating for example?
that is false statement actually<p><i>HTML is an amazing language for creating static documents, but it was never designed for interactive web apps</i>