Is it better to have a backend service sending json and using a clientside framework such as AngularJS (or) have a full webapp in the backend serving HTML with minimal javascript?
-
I am looking for performance concerns, if any in case of clientside heavy framework?
-
Answer:
Serving JSON responses would be so much better than just spitting dumb HTML. Gone are those days when processing used to happen server-side. Agreed that loading angular is an overhead, but also think of the numerous HTML responses that your server has to process instead of byte sized JSON. You can speed up the site by using a CDN ( cdnjs, Google CDN ) You will save a lot on bandwidth and I don't see any performance degradation by using a client side framework. Most systems are capable enough to run JavaScript heavy apps on the browser.
Surya Pappoppula at Quora Visit the source
Other answers
While choosing between client side rendering and server side rendering you need to understand their pros and cons. Since you are asking for performance concerns, by choosing client side rendering you don't have the control over performance. That is because the performance depends upon the client device and browser capabilities. But for the server side rendering you have the full control over the server and you can scale up depending upon your needs. We are using client side rendering for our http://www.chorusplay.com mobile web app. ours is a single page application mainly for mobile devices, we use JQuery mobile to render HTML from JSON response Problems we faced with client side rendering. Device Performance: Most of our users have medium-end smartphones and rendering in those phones were slow. Mobile browser fragmentation: Unlike desktop browsers, in mobile there are lot of different manufactures and lot of different browser implementations causes testing and debugging nightmare Cross domain issues: Since we are consuming data via APIs, we faced lot of Cross domain issues. Lot of mobile browsers couldnât handle Cross Domain Requests. We had to do some hacks to solve this. Content visibility: Content is not visible to search engines like Google. This will affect SEO and organic traffic. (Googleâs https://developers.google.com/webmasters/ajax-crawling/docs/specification for solving this.) Hybrid rendering There are some new frameworks like http://nerds.airbnb.com/weve-launched-our-first-nodejs-app-to-product/ and http://artsy.github.io/blog/2013/11/30/rendering-on-the-server-and-client-in-node-dot-js/ which leverages both client side and server side rendering. They are not matured enough but take a look. Do your homework well before choosing client side or server side. Both have its own cons and pros. Choose one which is suitable for your use.
Sooraj Elamana
Browsers today are fast and powerful enough to handle heavy applications. In a typical webapp, the server should handle tasks related only to database manipulation and authentication, the rest can be very efficiently taken care of by the client side using AngularJS or any other javascript framework.
Abhiroop Patel
Related Q & A:
- If you were to start using a Wordpress framework today, which one would you use?Best solution by WordPress
- How to call a web service using HttpWebRequest?Best solution by Stack Overflow
- How to populate a Tree with flat JSON?Best solution by jqwidgets.com
- Is it better to use a tv as your computer monitor, or a computer monitor as a tv?Best solution by tomshardware.com
- How hard is it making a career out of sports betting?do a lot of people manage okay and make a decent salary?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.