3 ms·
I really like the idea of server side rendering. Flask/Django style backend and use Jinja2 templates, sprinkle some vanilla JS for interaction if needed. I won
by systemvoltage 5y ago
I really like the idea of server side rendering. Flask/Django style backend and use Jinja2 templates, sprinkle some vanilla JS for interaction if needed.
I wonder if it is safe to say vast majority of websites are simple enough to use the aforementioned pattern? There are so many "Doctors appointment" type dynamic websites that I don't think need anything like React or Angular.
I think React is great if you're building the next Notion or a web-based application such as Google Sheets.
Edit: Yeah, I am new to webdev and I find server side rendering "refreshing" :-)
- the__alchemist 5y agoI do this. It's remarkable this is considered to be a novel pattern! (Note that some of the advances in modern CSS and JS made this more feasible than it used to be)
- vbsteven 5y agoIt’s not just an idea. It’s tech that has been around for decades now. Rails, Django, Spring, Laravel, Sinatra, Flask and hundreds of others. They work fine for a large chunk of modern websites. And server side templating is not the only concept from that era that is much simpler than what is popular now. Those frameworks were primarily synchronous instead of asynchronous. And they worked in pretty much every browser. Without breaking the back button. With shareable links. And no scrolljacking. For me personally the sweet spot for many applications/websites is still just that: A synchronous MVC framework with serverside rendering. With a sprinkle of vanilla JS or Vue on select pages for dynamic stuff.
- pjmlp 5y agoSame here, such approaches work and do the job just fine.
- yurishimo 5y agoSince you say you're new, it might be worth looking at Laravel if you learned with the componentized JS approach. The Blade templating language they've been perfecting for years now has started to embrace composable components very similar to a JS framework, but all server-side. https://laravel.com/docs/8.x/blade#anonymous-components https://laravel.com/docs/8.x/blade#anonymous-components https://laracasts.com/series/blade-component-cookbook/episodes/1 https://laracasts.com/series/blade-component-cookbook/episod...