Imagine you own a business, and you are successful 🎉 Your main audience consumes your business from mobile devices, predominately smartphones, right? And so, your mobile app is stored on users' devices and this app fetches all relevant data from Server "A". So far so good, hope you're following...
You also want to have a web-based app, because why not 😄 The problem, however, that the browser doesn't store it (at least initially) and your web app needs a home 🏠
Now you have 2 options:
Option A: squeeze a view layer into the Server "A" and have some kind of switch logic deciding when to serve JSON/Protobuf and when to serve HTML/HTMX
Option B: spin up just one extra Next.js server that will host your frontend app and fetch data from Server "A" just like your mobile app does
I personally will never choose Option A, but both options are fine with me and neither makes frontend dying!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Imagine you own a business, and you are successful 🎉 Your main audience consumes your business from mobile devices, predominately smartphones, right? And so, your mobile app is stored on users' devices and this app fetches all relevant data from Server "A". So far so good, hope you're following...
You also want to have a web-based app, because why not 😄 The problem, however, that the browser doesn't store it (at least initially) and your web app needs a home 🏠
Now you have 2 options:
Option A: squeeze a view layer into the Server "A" and have some kind of switch logic deciding when to serve JSON/Protobuf and when to serve HTML/HTMX
Option B: spin up just one extra Next.js server that will host your frontend app and fetch data from Server "A" just like your mobile app does
I personally will never choose Option A, but both options are fine with me and neither makes frontend dying!