DEV Community

Discussion on: The Front-End Development we’re used to is dying

Collapse
 
snigo profile image
Igor Snitkin • Edited

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!