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…

but seriously, it’s different this time. Honest!

Because there is nothing that programmers like more than bickering about how to name things, there has been a movement over the last year to stop calling JavaScript that runs on the server and client at the same time “Isomorphic” and instead call it “Universal”.

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?

Now yes, obviously we’re not saying that JavaScript applications are actual crystals or biological organisms because that would be silly. Why would someone suggest that? But the if we use a definition similar to any of the above then the term applies rather well.

At it’s core Isomorphic JavaScript describes the relationship between the application that runs on the server and the one it serves to the client to run.

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.

Like what you read? Give Gregory Wild-Smith a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.