

Flux Comparison by Example - ksmtk
https://github.com/voronianski/flux-comparison

======
d4n3
Anyone tried doing isomorphic (server/client) flux?

Most implementations rely on the flux stores being singletons which can't work
for multiple requests on the server.

The only one that's isomorphic is yahoo's but that one feels terribly verbose.

~~~
pluma
The singletons are only problematic if you need to interact with them
asynchronously. `React.renderToString` is synchronous, so there's no reason
stores _have_ to be async.

Shameless plug: Fynx[0] is mostly synchronous, for example.

[0]: [https://www.npmjs.com/package/fynx](https://www.npmjs.com/package/fynx)

~~~
d4n3
but how would you deal with async data fetches then?

I want to have the same routing and data fetching logic both on the client and
on the server, and for that I would need to have stores that are independent
for different incoming HTTP requests.

~~~
bryanlarsen
I'm not sure how you're supposed to do it, but that hasn't been a problem for
me. I set up two actions: load and init. load starts a request and init sets
the data in the store.

------
namuol
It's great to see more example Flux projects using different implementations,
but what we _really_ need is just one larger and more sophisticated app
example.

I've been adapting a React-based app to the Flux architecture for the last
week or two. I constantly find myself scratching my head, especially regarding
asynchronous operations that need to be reflected in the View.

It would be nice for the mock API in these examples to "simulate" a poor
network connection in order to see how asynchronous error handling is best
handled in each implementation, for instance.

~~~
jfhollingworth
That's why we created [https://github.com/jhollingworth/marty-chat-
example](https://github.com/jhollingworth/marty-chat-example). It's got proper
examples of using HTTP & WebSockets

~~~
namuol
Ha, I actually submitted an issue to this yesterday. It's a good example but
misses some really important (i.e. usually-confusing) stuff: error/failure
handling and rollbacks.

------
Narretz
Is there a formal spec for a "flux application"? Or what's the common
denominator here?

~~~
DougBTX
Closest is probably
[http://facebook.github.io/flux/docs/overview.html](http://facebook.github.io/flux/docs/overview.html)

------
mukmuk
@prottmann alluded to it, but it might be useful to add Marty as well
([http://martyjs.org](http://martyjs.org)) (no affiliation).

It's just behind Reflux on the superficial metrics (stars, contributors, npm
downloads) so is likely to be on most short-lists.

I've had a good experience with Marty so far but remain curious about the
others. Reflux worries me a bit because of its minor divergences from the Flux
design decisions.

~~~
jfhollingworth
I've opened a PR for it but it needs to be merged in
[https://github.com/voronianski/flux-
comparison/pull/5](https://github.com/voronianski/flux-comparison/pull/5)

------
goatslacker
This is pretty cool. There have been a ton of flux frameworks floating around
lately, glad that there's an app that deals with async data to be able to
compare each on their merits.

------
prottmann
Thank you! Yesterday i thought about something similar -> a comparison of
different flux implementations with an example (and not with a todo-app).

I tried some sample apps in the last weeks with reflux, fluxxor and now marty
to see the practical differences.

------
Ronsenshi
Great job! It's nice to be able to compare same application elements written
in different frameworks - very illustrative.

Can't wait for the post with conclusion and thoughts on this.

------
danesparza
I'm surprised to discover how useful I found this -- being able to compare
roughly 'apples to apples' in an app was very helpful. Thank you for your
efforts!

------
hoodoof
Is there a conclusion, comparison or a point? I'm interested in the outcome
but not trawling through the links and stuff.

~~~
ksmtk
there will be summing up article soon, but that's not the main point

~~~
cies
I would also like your know thoughts on how they compare.

------
hleszek
So, which one do you prefer and why ?

------
bhouston
Where do people think up these names: Reflux?
[http://en.wikipedia.org/wiki/Gastroesophageal_reflux_disease](http://en.wikipedia.org/wiki/Gastroesophageal_reflux_disease)

Why don't we have a library called Melanoma or HIV yet? Actually I am sure we
do have libraries with these names somewhere on github.

~~~
jvdp
Well, there's Mono...

~~~
mhd
A language runtime for _Unix_ systems...

