Hacker News new | ask | show | jobs
by abritinthebay 3665 days ago
It really didn't. Universal is flat out wrong unless you're using the exact same code on both server and client.

Isomorphic is 100% correct if you use the definition from biology, crystallography, sociology... etc etc. It's more technical of a term in one single field. In every other way it's a perfect description.

* 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

All of these more closely describe a JavaScript application that lives on the client and server - because while they will be similar the likelihood of them having the complete same code (and therefore being universal is minimal.

1 comments

Aside from being a set of instructions to complete some computational task, server-side code has very little similarity of process or structure to client-side code. "Isomorphic" is a bad description no matter what intellectual discipline you pull the word "isomorphic" from.

Taken from crystallography, the JavaScript here is like the oxygen in silicon dioxide and in water. Same material, same physical properties, completely different structure and function depending on where it is.

Clearly you've never written an isomorphic app because your first paragraph is just outright wrong.
Form validation and DOM rendering are the only things that could look the same; literally everything else (data access, concurrency, remote requests, security, caching) will be different because the runtimes and the system architecture contexts are entirely different.

Clearly you have yet to work on something that isn't just form validation and DOM rendering.

Caching can easily be shared, @rill/loader works perfectly for my needs. For everything else you are more or less correct. However like i've mentioned Rill works perfectly fine as a standalone server side framework or a standalone browser framework.

Everything you mentioned is achievable with Rill. I have found two simple ways to Isolate server only code in Rill.

1) Have two Rill servers, one with shared code and one without. Where the shared code server interacts with the isolated secure api from the other server.

2) Have one server that calls itself through http(s) requests where the api bits of the server and everything else you mention is hidden behind a "if (!process.browser)" statement. With browserify and other build tools you can have it automatically parse out any server side code. This is my preferred approach because I get to bundle all of the important parts of my app together while still having granular control over where things run.

If there's "server only" code, then "isomorphic" is a terminologically incorrect characterization of the architectural style. The code on the server and the code on the client have different structures.

That's all I'm trying to say here.

And you'd still be wrong because isomorphism only implies similar structures and forms/practices.