4 ms·
Why not both? It's definitely not an either/or, you might have a beefy monolith of a backend and a beefy monolith of a frontend working in tandem for the best p
by WorldMaker 9y ago
Why not both? It's definitely not an either/or, you might have a beefy monolith of a backend and a beefy monolith of a frontend working in tandem for the best possible user experience. It depends on your projects; it depends on your project's needs; it depends on your user's expectations.
> Do they even try to solve the same problem?
They are different tools for different jobs. If a website wants to be, for instance, offline capable (such as a PWA suggests), you need to do more work on the client side. The more work you do on the client side, the more it likely behooves you to use a framework to help you manage that.
Just as you could write "vanilla" Python or Ruby CGI/WSGI instead of Django/Rails on the backend, you might want that framework to help you manage things like routing or template systems or ORM layers or whatever else you rely on the framework for.
Certainly at face value there's some obvious places of overlap there (hence the rise of "universal" or "isomorphic" frameworks where a NodeJS server can do the exact same rendering as a static site as the framework might do client side "live", sharing a lot of code between them), but that also doesn't mean its a competition between front-end versus back-end and even with universal/isomorphic frameworks it turns out the answer really is "both"; there are benefits to doing a lot of work on the server ahead of time and having the client capable of doing all the same work, to share and split the efforts as needed.