News for hackers. Stuff that matters.
Re:PHP: the quiet powerhouse by Joeri on Wednesday June 13, 2012 @06:21PM (#4108780)
The realities of roundtrip time won't go away. Serverside rendering will always delivers worse responsiveness. Blame physics.
Re:PHP: the quiet powerhouse by LnxPrgr3 on Wednesday June 13, 2012 @10:37PM (#4109521)
Re:PHP: the quiet powerhouse by Joeri on Friday June 15, 2012 @07:01AM (#4115900)
Twitter is a web site, not a web app. First-page load performance is critical for them. I wouldn't have chosen a client-side rendering architecture.

My perspective is that of web apps. By using client-side rendering I can prefetch more data than the user needs at almost no extra cost, and render it when they click without hitting the server. Not having to contact the server at all beats any server-side rendering architecture. Even web apps that supposedly do server-side rendering will end up with some prefetching for performance (e.g. tooltips and detail panes are already embedded in the page but hidden).

The reality is that the big bottleneck in any web app is not the fetching of data but the fetching of the front-end. The more front-end code (images, js, css) that you can fetch from browser cache or CDN the faster your app. The "ideal" case is not having to fetch anything except the data from the server. You can do that today with client-side rendering combined with far-future expiration or HTML5 appcache. The caveat here is that the performance benefits only start compounding for client-side rendering if you can prefetch data. Twitter couldn't do that, so there was no benefit.

Like any complex technical issue, there is no right answer in general, only a right answer in context. People should just be careful about what they're measuring. The important benchmark is time to load the page, not time to process the page on the server (a huge difference), and measurements should be globally distributed (you should be measuring transcontinental page visits).

Re:PHP: the quiet powerhouse by dr42 on Wednesday June 13, 2012 @06:53PM (#4108898)
History has shown that with time these numbers shrink, there will come a time when the difference is between two very small numbers and that won't be a factor. It almost is. A couple of years. 4G LTE for example.
Re:PHP: the quiet powerhouse by daeken on Wednesday June 13, 2012 @07:11PM (#4108972)
The issue in this case isn't (primarily) bandwidth, it's latency. Cell connections have terrible latency, universally, and there are a lot of problems to solve before that stops being true.
Re:PHP: the quiet powerhouse by lucperkins on Wednesday June 13, 2012 @07:08PM (#4108958)
You could be right about these numbers becoming meaningless. But in the meantime, there is a noticeable difference, and that can mean life or death in the jam-packed web dev market that we see today. If cramming as much application logic as possible into the front side continues to shave off milliseconds or even seconds in some cases, then I think that trend will continue.

That said, I hope you're right. A world in which front vs. back end didn't matter with respect to time would be one in which developers were free to reveal far less on the client side, and that would be a victory indeed!