Javascript – Are (mostly) client-side JavaScript web apps slower or less efficient

ajaxbrowserclient-sidejavascriptnode.js

I am in the midst of writing a web application for work. Everything is from scratch. I have been a PHP programmer for about 13 years, Node.js programmer for the past 2 years, and have no shortage of experience with JavaScript. I love Node.js, and recently rebuilt the company's API in it…

So, in planning this web application, the approach I'm considering is, have the Node.js API for getting data from the server, but render everything in the browser. Use AJAX for retrieving data, History API for loading pages, and a MVC-like pattern for the different components.

I have read articles detailing twitters rebuild a few years ago. It was more or less a client-side JavaScript app, but a couple years after launching it, they started moving a lot of processing/rendering back to the server, claiming the app improved dramatically in terms of speed.

So, my question is as the title asks, is a client-side centric app substantially slower?

Best Answer

The answer is that it's entirely situational.

The intricacy and scale of user interaction, customer experience, the functionality of the application, server load, security concerns and other factors have to be taken into consideration in order to address this question with any degree of accuracy.

To be honest this question should not be answered in generalised terms - there is no wrong answer. If you can provide more details of the nature of the application, we might be able to give some useful advice.