Earlier quoted context omitted.
Actually, Twitter gave up on it every performing and everything is rendered server-side.
Actually, it gave up on performing _everything_ client-side, and now renders the first page server-side, and then handles subsequent rendering client-side. It found a performant happy medium, which is something I hope React will enable a lot more people to do with a lot less work.
React: Finally, a great server/client web stack
121–130 of 134 posts
Re: React: Finally, a great server/client web stack
#122Am 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…
So, you read an article about how easy server-side rendering is with React, and your first impulse is to rant about client-side rendering? Did you not read the post or did you just feel an overwhelming urge to posture?
The article just says it's easy. It doesn't provide any concrete examples.
I imagine it would be easy in Node to do this but what about Ruby, Python etc.
Re: React: Finally, a great server/client web stack
#123Earlier quoted context omitted.
So, you read an article about how easy server-side rendering is with React, and your first impulse is to rant about client-side rendering? Did you not read the post or did you just feel an overwhelming urge to posture?
>So, you read an article about how easy server-side rendering is with React The article just says it's easy. It doesn't provide any concrete examples. I imagine it would be easy in Node to do this but what about Ruby, Python etc.
It doesn't provide code, but it points out that you can render to a string. It is literally that easy — you can just call React.renderComponentToString instead of React.renderComponent, though in practice there are Node libraries that make this even easier.
> I imagine it would be easy in Node to do this but what about Ruby, Python etc.
Well, it's a JavaScript library. If you can run JavaScript, you can render React templates. For example, Instagram is a Django app that runs a Node subprocess to render templates.
Re: React: Finally, a great server/client web stack
#124Am 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…
There's a happy middle ground between heavyweight javascript SPAs and static pages.
Frankly I love it when I interact with a web page and it doesn't have to reload the whole page just to update a single element, article, etc that I requested.
But neither am I fan of overly heavy frontend JS apps, like how Twitter used to be [1], or Quora seems to be, for example. Especially since I'm a chronic browser tab abuser where JS-heavy pages bring my browser to a halt or make it chug.
So yeah, aim for that sweet spot happy middle ground when possible.
[1]:https://blog.twitter.com/2012/improving-performance-on-twitt...
Re: React: Finally, a great server/client web stack
#125Earlier quoted context omitted.
Yes, and that's a great use case for it. But you can also use your existing Backbone Views (if they have some nice, say, formatting or data-munging-for-display logic in them) and simply replace your render function with React. The next step you can take is replacing your HTML templates with React's JSX templates, if you'd like...
Thanks for replying and for your work on CoffeeScript and Backbone. I might give this a try as I love Backbone's Model layer. I think I like the second approach you suggested better. That might almost turn the Backbone.Views into ViewModels, right? I'm still up in the air on how I feel about the whole JSX thing but I'm willing to give it a try.
Re: React: Finally, a great server/client web stack
#126Earlier quoted context omitted.
Opa should be more popular.
Also, fruitmachine (Github)- Financial Times - Graphics Lab. They say it handles multiple pages better then React. They also claim to have had the React concept first.
Re: React: Finally, a great server/client web stack
#127I 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
#128I am learning how to make desktop apps with Reactjs + Backbone + PouchDB and Brackets-Shell just for fun and learning purposes, so far it has been a very exciting experience.
Re: React: Finally, a great server/client web stack
#129If you used this with Backbone, could you throw Backbone's entire View object away and use this instead?
Re: React: Finally, a great server/client web stack
#130Earlier quoted context omitted.
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?