4 ms·
When Javascript projects write "Isomorphic", what do they mean? It certainly isn't isomorphic in the usual sense in Math of a bijection between structures (cat
by jlouis 8y ago
When Javascript projects write "Isomorphic", what do they mean?
It certainly isn't isomorphic in the usual sense in Math of a bijection between structures (categories), because even if it were it is a special case of some kind.
- l_t 8y agoIsomorphic in this context means the library supports running in Node.js as well as in the browser. (This is mentioned further down in the README).
- uryga 8y agoI wondered about it too! From what I read, the term seems to be controversial in the webdev community: > "From the beginning there were people opposing the term, suggesting alternatives such as monomorphic or polymorphic" [1] As I understand it, when an SPA is "isomorphic", it means it can be statically pre-rendered to some degree. This property is then used as follows: - you pre-render some html of your app server-side - when a client requests a page, send the pre-rendered html first - then, send over all your JS (React or whatever), which will take over the rendering when it's ready. [2] So "isomorphic" refers to some sort of behavioral equivalence, i.e. "you can run it server-side and you'll get the same output". Painting with broad strokes, I guess you could interpret "this app is isomorphic" as shorthand for "this app can be pre-rendered into a static form that's isomorphic to its usual dynamic form" (in roughly the same way a pure function is isomorphic to a lookup table). In reality that property would probably be too strong for most cases, but I guess it's "morally correct". --- [1] https://medium.com/@ghengeveld/isomorphism-vs-universal-javascript-4b47fb481beb https://medium.com/@ghengeveld/isomorphism-vs-universal-java... [2] https://en.m.wikipedia.org/wiki/Isomorphic_JavaScript#Mechanism https://en.m.wikipedia.org/wiki/Isomorphic_JavaScript#Mechan...
- fka 8y agoSimply, you can use "isomorphic" libraries both in browsers and Node.js.