Live data from Hacker News

Isomorphic JavaScript: The Future of Web Apps

nerds.airbnb.com

121–123 of 123 posts

Re: Isomorphic JavaScript: The Future of Web Apps

#121
post #79

Conspicuously absent from the author's article was Angular. What is it about Angular that doesn't lend itself to this dual purpose frontend and backend infrastructure?

Lots of potential hidden state as well as the need to support the entire DOM API server-side. For example, directives may add hidden state to the DOM and assume full availability of DOM API (even jQuery). The server will have to support all that Also, you'll have to re-do the entire rendering on the client, then swap the server-generated DOM with the client-generated DOM. Its probably possible - but is it worth the e…

I did it. Not really super hard. https://github.com/ithkuil/angular-on-server/wiki/Running-An.... But http://prerender.io is a lot easier and works for everything.

Re: Isomorphic JavaScript: The Future of Web Apps

#123

Earlier quoted context omitted.

In my scenario an alternative (Rhino or PhantomJs) engine would generate a page once and then push that rendered page to the server. No real load would be sent to it. Single code path for all template rendering. Zero cross implementation bugs and the client still gets a fully reified page on first load. Shit idea, lil harsh.

Shit idea is a little harsh for sure, but the problem is when your page relies on dynamic data and you can't prerender it. It's just too expensive to boot up a DOM on the server.

Why would you pre-render if your data is not changing continually? Don't you just have static content then?
Post reply on HN