Server Side Rendering
SERVER SIDE RENDERING ( The “old” way, but now getting modern again). Before around 2010, all sites were rendered on the Server Side , Assembled on Backend on Web Server and then past on users browser.
On that time JavaScript only used to add couple of Dynamic features on Websites. LATER , Developers used to write more and more JS code, which leads to SINGLE-PAGE APPLICATIONS.
Client Side Rendering
work of rendering a webpage shifted from web server to the Client. Web applications still need data, which usually comes from the backend in the form of API.
NOTE
Server-Side Rendering is making COMEBACK right now, slowly getting modern again. with Frameworks like NextJS, Remix and etc
Why we cant Develop WebApps with JS
- Requires of direct DOM Manipulation and Traversing (imperative)
- Data (state) is usually stored in the DOM, shared across entire app, hard to reason + bugs
- Keeping a user interface in sync with data is really hard and a LOT OF WORK, Front end frameworks solve this problem and take hard work away from developers.