Coder Social home page Coder Social logo

flux-comparison's Introduction

Flux Comparison by Example

Similar app implemented with different Flux solutions including Facebook's, Yahoo's and others.

Usage

Clone this repo and run npm install inside it.

Before checking any of the included solutions you will need to:

  1. Go to solution folder (e.g. cd facebook-flux, cd redux, etc.)
  2. Run npm install to install dependencies of a specific app
  3. Run npm start to build js resources with Browserify
  4. Open index.html in the browser

Demo

Select several products from Flux Online Shop and add them to cart. Open browser console and click Checkout button, you'll see payload with products that you just "bought".

http://labs.voronianski.dev/flux-comparison

You may find few notes about all implementations on my blog.

Discussion on HackerNews - https://news.ycombinator.com/item?id=8989495.

Examples

The list of Flux related implementations used in this demo.

Ready

Next

You're welcome to create issues with suggestions or even make your own pull-requests (but before please take a look on contributing guidelines).

Resources

Libraries

Articles

Non React.js examples

The flux demo app was also implemented by enthusiasts without React.js but with another view layer:

Contributing

See CONTRIBUTING.md.


MIT Licensed

flux-comparison's People

Contributors

acdlite avatar arqex avatar azu avatar devinivy avatar gaearon avatar goatslacker avatar ifandelse avatar jhollingworth avatar jordangarcia avatar kenwheeler avatar mingliangfeng avatar mridgway avatar petermoresi avatar redonkulus avatar reggi avatar royalicing avatar rwillrich avatar sunspots avatar txchen avatar voronianski avatar ycdesu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flux-comparison's Issues

Suggestion: a series of Youtube videos walking new users through the code

I think this would make a very nice addition to the code itself. For new users it might be a bit difficult to understand exactly what is responsible for which part of the process and how data moves through the application. One way to illuminate this is by recording the screen and walking through the code, explaining things as you go along. It would take a bit of time to do, though—but I figured I'd make the suggestion anyway, in case you're interested in a challenge.

mkdir build

Please create the build directory with npm start or modify the doc to add a mkdir build step or it fails with

leszek@leszek-desktop:~/flux/flux-comparison/facebook-flux$ npm start
> @ start /home/leszek/flux/flux-comparison/facebook-flux
> ../node_modules/watchify/bin/cmd.js . -o build/bundle.js -v -d


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: ENOENT, open 'build/.bundle.js'

npm ERR! @ start: `../node_modules/watchify/bin/cmd.js . -o build/bundle.js -v -d`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the @ start script.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ../node_modules/watchify/bin/cmd.js . -o build/bundle.js -v -d
npm ERR! You can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.16.0-29-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /home/leszek/flux/flux-comparison/facebook-flux
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/leszek/flux/flux-comparison/facebook-flux/npm-debug.log
npm ERR! not ok code 0

Fluxxor not mentioned

Hi, I went through all the examples and the blog post, however, I've seen nobody mentioned Fluxxor. Just asking if there was a specific reason for it or it was simply overlooked/forgotten.

Suggestion: Meteor.js

This talk shows how it's a lot easier to get started with Meteor.js and React, vs. picking a Flux implementation. One key moment is at 5:48.

Breaks on watchify

Hi!

All of the demos fails for me at npm start.

npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v4.2.1
npm ERR! npm v3.3.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ start: ../node_modules/.bin/watchify . -o build/bundle.js -v -d
npm ERR! spawn ENOENT

Any ideas?

Ripple Example

Would be nice have a comparison example for Ripple too, can send a PR if you want.

Ripple is an extension to the Flux paradigm (closer to the new Relay in scope):

Ripple vs Flux

Ripple shares key architectural concepts with Flux, such as the single dispatcher, data-flow programming (unidirectional), and views updating when the associated data changes, etc. However, Ripple is an extension to the Flux paradigm, in that the dispatcher will not update only the data/views on the current page, but on all other clients too. Ripple introduces much less proprietary concepts (everything is a resource) and the API aims to embrace standards rather than invent new ones.

https://github.com/pemrouz/ripple

See also the React quick example to get started: https://github.com/pemrouz/ripple-examples

How to lint the code?

The contributing guide suggests using ESLint, and there's a .eslintrc in the project root, but eslint is not in devDependencies. After adding it there and running it, I got (literally) over 9000 violations:

screen shot 2015-09-29 at 20 43 20

Should we remove the section on using ESLint from Contributing, as well as .eslintrc? It seems to do more harm than good at this point. :-)

Suggestion: Show error handling

To make the examples complete and more realistic, I think error handling should be demonstrated. I'm struggling to come up with a good pattern for error handling myself.

comparison overview table

Before looking at the details and implementation exampled I'd be interested in a general overview of the compared libraries. Just some basic strengths and weaknesses to get a general idea which one suits most for my situation. Some metrics like code complexity, size, popularity etc. would be nice too.
What do you think?

sh: browserify: command not found

When running npm run build in any of the flux implementation folders. The npm scripts field does not seem to add modules in the root folder's node_modules to it's path. I'm getting around this now by installing stuff globally, but that's ugly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.