Live data from Hacker News

Isomorphic JavaScript: The Future of Web Apps

nerds.airbnb.com

81–90 of 123 posts

Re: Isomorphic JavaScript: The Future of Web Apps

#81

You keep using that word. I do not think it means what you think it means. Using precisely defined mathematical words in contexts where they only make sense vaguely to a layperson ruins their original usage. Make up a new word. Repurpose a shitty English word. But leave our damn maths words alone. Old man quarterto shakes his fist at you! Get off my smooth, compact lawn!

(author here) Good point. TBH, I have no idea what "isomorphic" means in the mathematical sense. I was inspired to use "isomorphic" from a 2011 article by Nodejitsu [1]. It seemed like a fine way to describe this approach. I would gladly use a better would if I were to find one. [1] http://blog.nodejitsu.com/scaling-isomorphic-javascript-code

What about simply DRY? isn't that what you're aiming for - having code sharable between client and server such that you don't have two pieces of code that do the same thing in two different places?

Re: Isomorphic JavaScript: The Future of Web Apps

#82
post #78

Earlier quoted context omitted.

(author here) Good point. TBH, I have no idea what "isomorphic" means in the mathematical sense. I was inspired to use "isomorphic" from a 2011 article by Nodejitsu [1]. It seemed like a fine way to describe this approach. I would gladly use a better would if I were to find one. [1] http://blog.nodejitsu.com/scaling-isomorphic-javascript-code

I like relocatable JavaScript .

It's the first time that I hear about it, and I do not dislike relocatable at all

Re: Isomorphic JavaScript: The Future of Web Apps

#83

You keep using that word. I do not think it means what you think it means. Using precisely defined mathematical words in contexts where they only make sense vaguely to a layperson ruins their original usage. Make up a new word. Repurpose a shitty English word. But leave our damn maths words alone. Old man quarterto shakes his fist at you! Get off my smooth, compact lawn!

I agree. Even if not precisely defined, isomorphic usually refers to things that are (possibly) different, but "look the same" under a particular lens (for example, a set of operations).

OTOH, this is talking about the same thing running in two different contexts. More appropriate terms might be uniform, homogeneous, ...

Re: Isomorphic JavaScript: The Future of Web Apps

#84

You keep using that word. I do not think it means what you think it means. Using precisely defined mathematical words in contexts where they only make sense vaguely to a layperson ruins their original usage. Make up a new word. Repurpose a shitty English word. But leave our damn maths words alone. Old man quarterto shakes his fist at you! Get off my smooth, compact lawn!

I can't disagree more. From thefreedictionary.com: (Mathematics) A one-to-one correspondence between the elements of two sets such that the result of an operation on elements of one set corresponds to the result of the analogous operation on their images in the other set. This seems exactly like what the author is describing. Colloquial English does not have an objective standard -- it is a constantly evolving langua…

But notice that the isomorphism is the correspondence itself. When you read "isomorphic JavaScript," you would be right to ask "isomorphic to what?" What is JavaScript in correspondence to?

If there is an isomorphism here, it is between the separate runtimes (client and server), and not the language.

Re: Isomorphic JavaScript: The Future of Web Apps

#85

Earlier quoted context omitted.

You could use something like Phantom JS. To iterate a point in the article, a number of client-heavy sites built on Angular and Ember have been rendering their content on the server-side to be presented to crawlers like the Googlebot for SEO purposes.

I understand node.js with V8 and also Phantom JS but how does a client browser view the DOM rendered on the server is what I'm asking. I'm guessing it gets rendered and serialized to JSON for transport, but I could be over-thinking it. Server side rendering is the same as it ever was, just with new tools.

>I understand node.js with V8 and also Phantom JS but how does a client browser view the DOM rendered on the server is what I'm asking.

It's returned in the request as HTML if the USER_AGENT matches Googlebot just like it would in a normally non-SPA web app.

Re: Isomorphic JavaScript: The Future of Web Apps

#86

You keep using that word. I do not think it means what you think it means. Using precisely defined mathematical words in contexts where they only make sense vaguely to a layperson ruins their original usage. Make up a new word. Repurpose a shitty English word. But leave our damn maths words alone. Old man quarterto shakes his fist at you! Get off my smooth, compact lawn!

Actually isomorphism only means, similar form. And it makes sense in the context - as in server and client code have similar form.

The fact that it's used in math is incidental. It's used in biology and chemistry as well. It does leave space for ambiguity because of closeness of math and computer science, but overall it's correct usage.

Re: Isomorphic JavaScript: The Future of Web Apps

#87
post #19

Earlier quoted context omitted.

Whoa old man quarterto, who said the word ever belonged to math people in the first place? I could argue that math people have a bad habit of squeezing English words into strange contexts that corrupt the original meaning. Take "manifold" for instance, or "curl", or even something as harmless as "mode". They all meant perfectly fine things until the math people claimed them as their own. According to M-W "isomorphic"…

He has a point. The system they are describing in the article isn't even isomorphic. If it WAS, it wouldn't depend on node. To clarify, if it was a true example of isomorphism it wouldn't be contingent on a single runtime environment or language. A better example of isomorphism in computing would be two modules of code that perform the same function and have the same abstract interface but that are written in DIFFERE…

Iso morphism means - equal form.

According to http://en.wiktionary.org/wiki/isomorphism

one meaning is similar form. As in - server and client code have similar form.

Re: Isomorphic JavaScript: The Future of Web Apps

#89
post #58

Earlier quoted context omitted.

Correct. If you're already writing a bunch of JavaScript for the client-side, then just think about this approach as migrating some of that client, UI logic to the server.

but who writes clientside logic before serverside logic ?

Front-end developers.

Frankly, Node is a way for front-end developers to write server-side code without having to learn too much new stuff.

Re: Isomorphic JavaScript: The Future of Web Apps

#90
I've started developing some simple apps with Wt (http://www.webtoolkit.eu) and it's really cool. It lets you develop web apps in a widget oriented way, and completly abstract the client/server communication.

It's not javascript on the server but that's fine. I actually used the Jwt (java version) with Jruby and Groovy, which is translated from their C++ codebase.

Post reply on HN