Hacker News new | past | comments | ask | show | jobs | submit login

Redux is a major improvement over Flux libraries because it removes a lot of boilerplate while not removing functionality (in fact, enabling more features). In Flux libraries, it's common for an entity to take inputs and simply produce outputs. That's not the use case for a class. It's the use case for a function, and that's why Redux removes boilerplate.

However, I think it's time we stop calling everything Flux. Just because an architecture is unidirectional doesn't mean it's Flux. Facebook described it clearly as an architecture structured with: Dispatcher, Stores, Actions, Action Creators, and Components (sometimes even with the distinction of View and Controller View). Redux is Flux-inspired, but has significant differences. Maybe we should call it just Flux-inspired architecture. The distinction is important because there are other unidirectional data flow architectures such as in Elm (https://github.com/evancz/elm-architecture-tutorial) and Cycle.js (http://cycle.js.org). We might be creating confusion when mentioning "Flux" and meaning different things.




I think you are right. It's time we give a proper name to these unidirectional data flow architectures and fly away from the Flux naming.


Once terminology gets momentum it's hard to change it, it's usually not totally semantically meaningful (socket?!), but it's nice to have a convention. I think isomorphic JS is a ridiculous term, but at least there's a word for it.

I've been using capitalization to denote the difference, just like Agile vs agile: Facebook's Flux or an implementation of the Flux architecture, versus a flux architecture.


Why is the term isomorphic so 'ridiculous'?

I've read Michael Jackson's article and I didn't interpret it as saying that people using the term isomorphic are outright wrong. Some people are making this assertion and that is what I am trying to refute here.

I disagree with Michael's statement that two things that are the same cannot be isomorphic. The very definition he cites does not exclude the possibly of those things being the same!

   "Corresponding or in similar form or relations"
(Even in mathematics the identity function is an isomorphism, it follows from its definition. However, we are not trying to prove a mathematical property here.)

But even then the assertion that the server and client side are exactly identical is not correct. Typically such code bases will have slightly different entry points for server and client. Additionally, React 0.14 beta is now splitting the DOM and String renders.

For some 'Universal' is attractive, because they want to use Javascript everywhere. I get that. If you like that, please go ahead and call it 'Universal'.

However, what matters equally is having an abstraction which allows pure functions to declaratively describe the form of components based on immutable data, no matter what the computational model of the target. It is arguably the abstraction that is the isomorphism and code that uses it could be called isomorphic. That could be stretching the term as per the above definition, but that doesn't mean that people who use it are wrong.

I think React provides the necessary abstraction. I have total respect for what the React core team and the community have achieved. I understand that Michael Jackson and Ryan Florence are motivated by wanting to get more people using React. This is a very good thing.

However, other people may be more interested in promoting the ideas behind React rather than React or Javascript specifically. It is these people I am trying to defend.


The term "isomorphic JavaScript" also sounds strange to my ears. I think it’s because in traditional use (in mathematics, linguistics, biology, etc.) you don't say "X is isomorphic", you say that "X and Y are isomorphic".

Grammatically, it’s kind of like the word "similar". I would feel silly saying "JavaScript is a similar language", and I feel equally silly saying "JavaScript is an isomorphic language". Similar/isomorphic to what?


"Server-side JS rendering" and "universal" (also known as the old "write once, run everywhere"). No other term needed, as far as I can see.


By the way, with regard to isomorphic JS: https://medium.com/@mjackson/universal-javascript-4761051b7a...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: