Rendering for enterprise apps: CSR, SSR or both?
This is part 4 of 8 of the free series Frontend system design for enterprise applications , first published on tt-tech.io . A team adds server-side rendering to an internal banking dashboard. Every page needs a logged-in user, no search engine will ever see it, and now there is a Node server to run, patch and audit. The first load is a little faster. The bill and the attack surface are a lot…
In the fourth part of the series on frontend system design for enterprise applications, the focus is on choosing between CSR, SSR, and prerender for enterprise apps. The decision is typically based on per-page basis rather than the entire company.
For internal banking dashboards, server-side rendering (SSR) is added, which results in faster initial loads but also increases server hosting costs and adds to the attack surface. CSR is favored for public pages due to its simpler development model, however, it may negatively affect SEO and have worse performance. Pre-rendering can be used for pages that are the same for everyone.
Angular supports both server-side rendering and prerender on a per-route basis, while React Server Components render ahead of time in a separate environment from the client app or SSR server. Zoneless and OnPush are two defaults in Angular that change what triggers rendering. Lazy routes can be split by team lines, and Angular advises eager loading primary landing pages while cautioning against deeply nested lazy loading. SSR and ISR are performance techniques specific to certain frameworks.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to