reactive programming - What's the difference between Knockout.js and Rx.js? -


does know differences between rxjs , knockout? me on surface seem trying solve same problem, build event driven ui. has had experience both, how differ/ how similar? can describe them me choose?

steve (the creator of knockout) explained difference on blog:

i’m familiar rx javascript, having used heavily on big project, , in fact aspects of design of knockout made rx experiences in mind.

the key difference between knockout’s implementation of observer pattern , rx’s knockout automatically infers associations , dependencies between observables regular procedural code without having specify them front though special functional api. wanted knockout use regular procedural/imperative-style code it’s more familiar , approachable developers.

another difference rx optimised composing streams of events without state. @ first enthusiastic , functional purity, after time felt increasingly jumping through awkward hoops , had invent ways simulate state manage ui commands efficiently. that’s why, in knockout, observables can treated stateful - example can read latest value (which cached, way - doesn’t recompute until underlying data changes).

rx goes further knockout advanced ways of composing event streams, whereas knockout goes further rx ui development, letting bind observables html dom elements , templates , manipulate them way want. rx great @ turned out not be how wanted build rich uis - hence design of knockout.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -