39 comments

[ 0.28 ms ] story [ 85.8 ms ] thread
Anyone with experience with either/both Morearty.js and Omniscient.js care to explain the differences between the two?

From what I could gather with a quick look, they seem almost identical in terms of features and scope.

https://github.com/moreartyjs/moreartyjs

https://github.com/omniscientjs/omniscient

With Omniscient there is a syntactic sugar on top of React class factories, which encourages to think of components as pure and smaller/more focused functions. This tries to lead more to simpler and composable components.
This is a really nice overview of the status quo.

It's also great to see a statement on JS lib proliferation which lays out a concise, balanced and pragmatic argument.

Nice. I've used ractive for nearly two years now. It's backed by the Guardian and you can learn it by reading this comment:

    var binding = new Ractive{
      el: '.where-to-put-it', 
      data: {some: data}, 
      template: '<p>Put {{ some }} thing here</p>'
    }
Bang, two way binding, virtual DOM, and ridiculously fast when using the same benchmarks that ember and react use to test their performance.
It's pretty nice, but you don't get two-way binding for free and it's not really baked in. In your example you'd have to use an input or content-editable element and then call ractive.observe and write your own code for binding user-input to your model data.

Compare to something like Knockout.js where you don't write any special code to get the two-way binding (other than creating each data field as an 'observable' field.)

Much like Javascript's "==" operator gives you type conversion for "free", it's not clear to me that getting two-way binding for "free" is a good thing. One-way binding is significantly easier to reason about.
Most of the time, data binding IS one-way when using Knockout.

Input field? That's one-way from display => a variable in your viewmodel.

P tag? That's one-way from variable in viewmodel => display.

But when do you really need two-way data binding? Form validation and formatting. Man, this stuff is hard even with two-way data binding. You have to be able to accept, parse, format, and validate all in the same element. It's very helpful to be able to use knockout for a task like this.

In my example, I'd just add

<input value={{ some }}>

That's all.

PS. if it's not clear, that's a response to:

> In your example you'd have to use an input or content-editable element and then call ractive.observe and write your own code for binding user-input to your model data.

Using an input element is enough. Try it.

Thanks for the correction.

I thought about moving to a system that uses React or something like it and I looked at a bunch of them, but I'm sticking with Knockout for now because it lets me keep my markup in the HTML document where I personally think it belongs.

I'll probably end up moving to Aurelia (or something like it) because it's so pluggable and you can use it with React or not. There are so many choices right now, it's hard to decide!! Sticking with whatever I pick is also sometimes difficult, but I've been using Knockout for about a year now.

Where is MeteorJS ? or to be more specific MeteorJS Tracker Lib ?
I'd be curious as well. No idea how it compares to the others.
My thoughts exactly!
I think articles discuses reactivity and Virtual DOM based implementations. Didn't blaze move away from virtual-dom diffing?
Nice comparison. Didn't anybody think of implementing a react-like framework in CoffeeScript? There is a coffee-react library tool, but I feel like the ideas of react implemented natively for CoffeeScript would be a match made in heaven...
Apparently Zorium is what you're looking for
Thanks, interesting. At a first glance, compared to react, this isn't self-contained as it requires (or simply suggests?) RxJS, but I'll give it a deeper look as soon as I can.
If you don't insist on JSX, which you don't need, then just use react itself directly in coffeescript, and you won't be able to tell the difference without looking really close. The "canonical" description of this is at [0], but that page is kind of "old". I haven't found value in wrapping everything in parentheses like he recommends. Also that code is using renderComponent() which nowadays should be replaced by some combination of createClass(), createFactory(), and render().

[0] http://blog.vjeux.com/2013/javascript/react-coffeescript.htm...

Elm [1] is also worth looking into. I've been using it of late and having fun with it, despite some quirks. It's quite performant in practice too. Though I haven't done comparisons myself, Elm benchmarks claim it to be the fastest only next to Mercury [2].

[1] http://elm-lang.org [2] http://elm-lang.org/blog/Blazing-Fast-Html.elm

Can it be used for big web-apps?
Depending, JSBlock is another one.
JSBlock? Do you have a link?
Not sure yet. I'm exploring. It is a compile-to-js language and not just a framework though. So far, the static typing has been addictive. The time travel debugger is also intriguing. So far, I don't see any particular reason to not use it for big apps ... except maybe the compiled size, which you can expect to be minimum 100k compressed as a thumb rule.
Yes, from looking into it, it seems to be a very good language.

But last time I tried to get into it, the tutorials were all outdated and even the simple hello world didn't work without extensive searching.

Also there doesn't seem to be any examples of how to structure a big app.

Is ReactJS (the virtual DOM) considered a 'reactive framework' but 'reactive programming' something else entirely? https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
I have no idea what "reactive framework" might mean, but by most definitions of "reactive" that I know... React actually isn't even close. It's not "not reactive", just tangential entirely.
The link you referred is about Functional Reactive Programming. Reactive programming by itself is more of a pattern than paradigm. I would call React a reactive framework. How reactive a framework/library is varies from framework to framework. Every framework has its own flavour of Reactivity. Mostly it's some kind of implementation of Observer pattern.

Two famous Reactive approaches are FRP and Meteor's reactive computations.

I'd go with Facebook and the consequent support, testing and community over a framework that does it's own thing. Performance is simply not a concern for most applications (i.e. React itself is more than good enough) and having learned React to a good standard, I'm super excited about building something in React Native.
React seems like a game loop with some functions built in to update your state.
Newbie here. In your opinion React delivers the promise to get out all the business logic of the UI?
React actually doesn't address that concern. With that being said, React is often used with Flux, which does seek to separate business logic from presentation logic.
RiotJS also looks very compelling
>Essentially any event where the user would expect feedback means you need write the conditional structure in the output. So if the user types a character in an input box then you need to write the value of the input box to be the characters the user has typed so far

Anyone able to provide a quick description of what this means?