Isomorphic not Universal
I’m going to detail why some very well intentioned people are completely wrong about something on the internet.
I know, I know…
This stems from a very simple misunderstanding of what Isomorphic means and moreover that there is only one definition. The mathematical one:
In mathematics, an isomorphism is a homomorphism or morphism (i.e. a mathematical mapping) that admits an inverse. Two mathematical objects are isomorphic if an isomorphism exists between them.
This definition isn’t wrong, it’s totally correct, and — again because we programmers like to think of Mathematics as a pure sacred thing — this has put people on edge. You get silly comments like this:
If there exists an isomorphism between the code on the client and the code on the server, then someone should be able to write a proof. Otherwise, using the same language on the client and the server does not constitute an isomorphism.
But there are a lot of other definitions of Isomorphism. Here’s a few:
- Sociology: a similarity in the processes or structure.
- Crystallography: two structures closely similar in shape, formulation, and structure.
- Biology: a similarity of form or structure between organisms.
These sound a lot like the relationship between two applications that run on the client and on the server that share a lot of the same code and structure… don’t they?
Make no mistake — these are two different applications.
The server has to worry about actually serving the client code, as well as setting up any data models, static assets, injecting data, etc. The client code will share a lot of this but then has to worry about DOM manipulation, browser events, CSS and timing issues, etc. You will have different code running on each platform for this (even if it is commonly located in the same files).
These are two applications closely similar in shape, formulation, and structure. They are isomorphic to each other.
You know what those two applications are not? Universal.