TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

React, Relay and GraphQL: Under the Hood of the Times Website Redesign

194 pointsby martgnzalmost 8 years ago

10 comments

notadocalmost 8 years ago
Putting aside all of the technical fun, from a pure reader perspective of <i>any</i> website sometimes I miss just simple boring HTML with a bit of CSS to make it more pleasant and readable. I don&#x27;t know about anyone else, but particularly from a consumption standpoint I miss the days of 100k webpages.<p>I&#x27;m always stunned, but at the same time never surprised, when you discover a single webpage is 35+ MB, consuming 2GB of RAM, and consuming CPU as if it were a midrange video game.
评论 #14679801 未加载
评论 #14678418 未加载
评论 #14678624 未加载
评论 #14678091 未加载
colemorrisonalmost 8 years ago
I&#x27;ve looked at GraphQL a number of times. Does anyone have any practical examples of integrating it with backend(s), APIs, and&#x2F;or specific databases?<p>So instead of &quot;we use GraphQL, much love&quot; + basic example and how it looks on React - a &quot;here&#x27;s how we take that structure and resolve it and return it.&quot; Because that structure looks amazingly sweet - but if in the background it&#x27;s requiring circles of work, work and rework...<p>Anyhow, maybe I just don&#x27;t understand it enough.
评论 #14677620 未加载
评论 #14677824 未加载
评论 #14677629 未加载
评论 #14677711 未加载
评论 #14679897 未加载
评论 #14678456 未加载
评论 #14677605 未加载
评论 #14680437 未加载
评论 #14679216 未加载
评论 #14677789 未加载
评论 #14681246 未加载
TekMolalmost 8 years ago
Do you guys think it makes sense for a newspaper to use React for the frontend?<p>I would think React might make sense for realtime dashboards and similar webapps.<p>But does it make sense for displaying articles, navigation and ads?
评论 #14677981 未加载
评论 #14677987 未加载
评论 #14677907 未加载
评论 #14680757 未加载
评论 #14677948 未加载
sAbakumoffalmost 8 years ago
I tried Relay but found it ridiculously stupid that I need to change the graphql API on my server in order to satisfy the relay concepts(universal id, connections) so we rejected the idea and decided to go with the good old fashioned redux
评论 #14678302 未加载
评论 #14677876 未加载
roucoulawanalmost 8 years ago
That&#x27;s cool to have here a synthetic explanation on how Relay can be more familiar.<p>I think I would just still be more attracted by Appollo framework which is more a redux-like syntax, so more consistent with all the workflow of the apps I used to develop. But maybe Relay has better benchmarks?<p>Also, if I want to stay REST but with optimist transactions between the backend and frontend, I prefer lighter lib like <a href="https:&#x2F;&#x2F;github.com&#x2F;tonyhb&#x2F;tectonic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tonyhb&#x2F;tectonic</a> or even I just write some fast redux-saga watchers that helps to make my frontend always synchronized when my app calls a mutating db request.
reconbotalmost 8 years ago
This is very similar to the stack we use at BDG Media (bustle.com, romper.com, etc) We use Amazon Lambda, GraphQL, a custom model layer with data loader and redis, and preact. We haven&#x27;t seen a clear benefit from Relay or Apollo with out front end apps (tbd on our admin apps) but we have enjoyed the Relay spec to help set server side conventions.<p>GraphQL has helped us make an api that is easy to understand, easy to change and and easy to use. We love it.
评论 #14690351 未加载
dmitriidalmost 8 years ago
A website that should heavily depend on caching relies on tech that allows only POST requests (non-cacheable, non-idempotent) and hopes for workarounds later
评论 #14679895 未加载
pier25almost 8 years ago
Is anyone else here writing their GraphQL queries &#x2F; REST calls in their components?<p>IMO coupling the data layer with the presentation layer is a terrible idea.
评论 #14680607 未加载
xiaomaalmost 8 years ago
The sad irony of all of this is that I regularly view the NYT without JavaScript because the experience is so much better without.
publicopinionsaalmost 8 years ago
Why have you picked Relay over Apollo customer?