Live data from Hacker News

React: Finally, a great server/client web stack

eflorenzano.com

101–110 of 134 posts

Re: React: Finally, a great server/client web stack

#101
post #99

I still don't get it that you would like to write in an inferior language such as js on the server side. Cm'on its broken by design. There are a lot of better alternatives. The only reason to use .js on the serverside is that you don't know better.

To a degree I agree with you but I'm downvoting for the trollish and inflammatory way you phrased your comment.

However - there are lots of reasons to use javascript on the server even if we accept there are superior languages.

Re: React: Finally, a great server/client web stack

#102

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

And when that old shopping cart demands a full page refresh: FOR FUCK SAFE JUST WRITE SOME JAVSCRIPT TO UPDATE THE QUANTITY

Re: React: Finally, a great server/client web stack

#103
post #33

Earlier quoted context omitted.

Most of React's novelty, I think, comes from the Virtual DOM. Your view spits out a DOM tree using the React.DOM.* objects. The JSX allows you generate the appropriate calls to those constructors by writing something that more resembles HTML. You can't just use Handlebars, etc.

It's not exactly novel. Opa ( http://opalang.org ) has been doing this for a few years...

I'd never heard of Opa before. Thanks for sharing, it looks interesting!

Re: React: Finally, a great server/client web stack

#104
post #90

Earlier quoted context omitted.

The important thing with this technique is you can render before any JS has been downloaded, parsed and executed, which is a huge amount of time relative to HTML parse and paint. fwiw, React isn't tied to Node: I've used it with Django via PyExecJS (which just uses raw JavaScriptCore).

I started with this line: >initial rendering should definitely be on the server this technique is called pre-rendering, and yes, I am amazed people don't do it. "PyExecJS (which just uses raw JavaScriptCore)." this seems pretty slow or can you cache the execution function. (aka you don't have to parse the js multiple times) Our backend is jvm so we decided on closure, with this on startup we compile our templates on…

PyExecJS is slow :)

We are actively working on more static analysis tools for React: it's certainly one of our major priorities.

Re: React: Finally, a great server/client web stack

#105
post #61

Earlier quoted context omitted.

I get your gripe, but there's a good use case for this stuff in building dynamic web applications . Just because a technology is misused doesn't mean the technology is to blame.

Browsers aren't general purpose applications. They can't fill every application role on the computer. The more "web dev" tries to push them in that direction, the slower, more difficult to develop and maintain, and generally poor they will be, and then the "dynamic web applications" that run on them will suffer.

What do you propose, exactly?

Re: React: Finally, a great server/client web stack

#106
post #90

Earlier quoted context omitted.

I started with this line: >initial rendering should definitely be on the server this technique is called pre-rendering, and yes, I am amazed people don't do it. "PyExecJS (which just uses raw JavaScriptCore)." this seems pretty slow or can you cache the execution function. (aka you don't have to parse the js multiple times) Our backend is jvm so we decided on closure, with this on startup we compile our templates on…

PyExecJS is slow :) We are actively working on more static analysis tools for React: it's certainly one of our major priorities.

i assume you work on the team at FB. Are you considering writing jsx compilers for platforms like the jvm?

Re: React: Finally, a great server/client web stack

#107

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

http://mnmlist.com/w

Re: React: Finally, a great server/client web stack

#108

> You can choose to use this, but after getting over my initial distaste for it ("Ack! Who got markup in my code!"), I could never go back to not using it. Or you could just use HTMLbars/Handlebars. Seems like "JSX" is just a more complicated version of a Mustache-esque logic-less template.

Being slightly more complicated is a feature, IMO. I always get the impression that the logicless templates end up as quite logicful languages once you add all the control flow directives. But its all very ad hoc so some simple things end up being tricky to do, like passing parameters to a subtemplates or giving different CSS classes to the even and odd rows. If you just use a regular programming language from the start these are just a matter of calling a subroutine or using an if statement instead of being something you will need to go to Stackoverflow to figure out.

Re: React: Finally, a great server/client web stack

#109

God I am sick of the passive-agressive "Finally, we have something GOOD! for X" titles that disparage everything that already exists for X. I saw a reddit article yesterday about "Finally a way of doing X that doesn't suck" despite there already being libraries to do X. This casual dismissal and disparaging of existing work is the kind of thing that causes people to give up on stuff (WhytheLuckyStiff for example) It…

Honestly, articles like that get more attention and discussion on HN.

After the first person comments about how they're sick of articles that are titled like that, a real discussion starts among the other comments which is the goal.

If the author named it: "React: A great way to do this and that". It'd get 5 upvotes, 10 minutes in the primetime and die off.

Re: React: Finally, a great server/client web stack

#110
post #49

Am I the only one that kind of thinks most websites should just be static pages? Like, I get pretty irritated when I go to read a blog post on Medium or wherever and it loads a header and a blank page, and then loads a bunch of javascript (mostly tracking and analytics frameworks), and finally goes out and gets the actual content. And then if I scroll down, it has to load some more garbage from Disqus or something. P…

>Am I the only one that kind of thinks most websites should just be static pages? No, the majority of people agree. And contrary to what javascript happy dumbasses keep repeating, the majority of new development is absolutely not doing everything client side. It is sad that the web is so fad driven, but this stupid fad will pass just like flash intros and spinning under construction animated gifs.

Internet itself was called "a fad" by some.
Post reply on HN