News for hackers. Stuff that matters.
Re:We Fell Out of Love with Next.js and Back in Love with Ru... by waprin on Saturday May 03, 2025 @07:42PM (#43883266)
It's one of those things that's like "write one HTML file with zero styling, then you can have multiple different CSS files style the same content completely differently! Separation of Concern!" Sounds perfect in theory but just doesn't always work.

Having one API for web and mobile sounds good but in practice often the different apps have different concerns.

And SEO and page speed were always reasons the server never died.

In fact, the trend is the opposite direction - the server sending the mobile apps their UIs. That way you can roll out new updates, features, and experiments without even deploying a new version.

Re:We Fell Out of Love with Next.js and Back in Love with Ru... by kace91 on Saturday May 03, 2025 @07:59PM (#43883342)
>In fact, the trend is the opposite direction - the server sending the mobile apps their UIs. That way you can roll out new updates, features, and experiments without even deploying a new version

Is that allowed by app stores? Doesn’t it negate the walled gardens if you can effectively treat the app as a mini browser that executes arbitrary code ?

Re:We Fell Out of Love with Next.js and Back in Love with Ru... by waprin on Saturday May 03, 2025 @08:31PM (#43883509)
Expo is the most popular React Native framework and markets remote updates as a feature and highlights that it lets you skip App Review update and Apple hasn't stopped them (Expo updates not exactly server-side mobile UI but it's similar idea).
Re:We Fell Out of Love with Next.js and Back in Love with Ru... by porridgeraisin on Sunday May 04, 2025 @12:39AM (#43884531)
My previous workplace did this.

What app stores don't like is you reinventing javascript i.e shipping your own VM. What they don't mind is you reinventing html and css.

So it is common for servers today to send mobile apps

  {"Elementtype": "bottom_sheet_34", "fg_color": "red",..., "actions": {"tap": "whatever"}, ... }
However the code that takes this serialised UI and renders it, and maps the action names to actual code is shipped in the app itself. So, the app stores don't mind it.

This is what the GP is talking about.

It covers a surprising number of usecases, especially since many actions can be simply represented using '<a href>' equivalents -- deeplinks. With lotties, even animations are now server controlled. However, more dynamic actions are still client-controlled and need app updates.

Additionally, any new initiative , think new feature, or think temporary page for say valentine's day, is all done with webviews. I'm not clued in on the review process for this.

Nevertheless, if your app is big enough then almost every rule above is waived for you and the review process is moot, since once you become popular the platform becomes your customer as much as you are theirs. For example, tiktok ships a VM and obfuscated bytecode for that VM to hinder reverse engineering (and of course, hide stuff)

Re:We Fell Out of Love with Next.js and Back in Love with Ru... by mike_hearn on Sunday May 04, 2025 @03:07PM (#43888731)
It's not really allowed but they aren't policing it, so, the technique ("code push") continuously grows.