5 ms·
My background is in pure mathematics, where an isomorphism is a structure preserving map between two objects. The description “an isomorphic...JavaScript functi
by smohare 8y ago
My background is in pure mathematics, where an isomorphism is a structure preserving map between two objects. The description “an isomorphic...JavaScript function” does not make grammatical sense to me, unless the implication is that this function is isomorphic to some standard clone/copy method somehow, or that it is an automorphism on some set of JavaScript objects.
Is the word being used in some other sense?
- spion 8y agoYes, in the silly sense that the code can run in both nodejs and a browser. The unfortunate article that coined it: https://blog.nodejitsu.com/scaling-isomorphic-javascript-code/ https://blog.nodejitsu.com/scaling-isomorphic-javascript-cod...
- throwawaymath 8y agoI'm not generally a fan of litigating language choices since, well, all words are made up after all. It's easy to be accused of pedantry if you're going to complain about someone misusing mathematical terminology in an orthogonal context (see what I did there?). It's hard to build a compelling soapbox on, "Well actually, that terminology isn't correct..." That being said, I'm a little baffled after reading that article. I suppose the thinking was that the client and server are isomorphic to each other if they're running the same code. As someone who also has a mathematical background I don't think it's very elegant...but it's obviously caught on and it's creative, so I can dig it.
- jacobolus 8y ago“isomorph” is just Greek for “same form”. I don’t think mathematics should get a monopoly on this one. Though it can probably keep “isomorphism” to itself, since “morphism” is as far as I know a made up math term.
- deleted 8y ago[deleted]
- jfet97 8y agoYes, an isomorphic js program is a program that can run both in browsers and nodejs. I know that is not mathematically correct, but lot of devs use this word and understand its meaning.
- ricardobeat 8y agoThat's a misuse of the term though. Calling these 'universal' javascript would be more correct, and it doesn't even have to be mentioned since it's been standard for a while that any library not dealing with browser APIs can run in node. The term 'isomorphic' refers to the output, as in being able to render the same UI / application on the server and on the client.
- erikpukinskis 8y agoIn JavaScript we've dealt with a lot of APIs that are different on the client and server. If you want to make an HTTP request from Node or the browser it's a totally different API. So in this case isomorphic means the API has the "same shape" on the client and the server, even though the implementation might be different.
- ricardobeat 8y agoI still think it is misused, was also my first time seeing it used this way (I’ve been working with node since the start in 2009).
- erikpukinskis 8y agoYou probably just missed it/ignored it. It’s a very common usage, going back to the era when a Meteor starter. Meteor being noteworthy because everything on their platform is isomorphic. It’d be easy to be active and not come across it though. Most of the JavaScript world maintains a clear client/server separation. In my experience most production apps can’t share code between client and server. It’s either written and packaged for one or the other.