Hacker News new | ask | show | jobs
by empthought 3663 days ago
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.

1 comments

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.
Then your preferred use of "isomorphic" is vacuous. All of programming is "isomorphic" to all other programming. There are a few mathematical proofs regarding that, I believe.

Call it what it really is: monolingual.