News for hackers. Stuff that matters.
Re:Expo – open-source platform for making universal apps for... by afavour on Wednesday July 26, 2023 @08:23AM (#36876468)
I’m primarily a web developer that’s long been interested in native mobile environments and after trying out many of these cross platform frameworks (all the way back to Appcelerator for those who remember!) my conclusion always ends up that they’re almost always a bad idea. The experience is inferior to native, it’s full of compromises to make cross platform work and you’re at the mercy of a company standing between you and the underlying mobile OS.

My advice these days is to go in one of two directions:

- make a progressive web app. No, it’s not a native experience. But if your priority is cross platform then this is cross platform. Service Workers etc make it a ton more paletable than it was back in the day.

- make native UI and code your business logic in some kind of shared layer (Rust, Go, Kotlin Multiplatform). Native UI has come a long way too, as someone who speaks webdev I find SwiftUI and Jetpack Compose to be very grokkable compared to their predecessors, a lot like React if you squint a little.

Re:Expo – open-source platform for making universal apps for... by kaypro on Wednesday July 26, 2023 @08:30AM (#36876544)
I remember Appcelerator. In fact I'm still using it to this day. The core Titanium is now open source and the Apps are "true" native. Give them another look and you may be surprised: https://titaniumsdk.com
Re:Expo – open-source platform for making universal apps for... by xctr94 on Wednesday July 26, 2023 @08:46AM (#36876744)
After 4 years of doing cross-platform mobile, I loathe React and React Native by now, and I dislike Expo. But… suggesting any other alternative is tricky.

True native development is, indeed, much better. But a small team will be hard-pressed for doing good work on both platforms, especially once you start fiddling with more important APIs. Configuration and getting your system to compile things to properly is almost a job in itself. Sigh.

KMM, Flutter, and MAUI are all promising, but with different trade-offs.

So we’re stuck with RN/Expo… At least Expo promises some stability between upgrades, by handling the package compatibility checks for you. Well, when it works.

“Make a progressive web app”: yes, that might be the way to go; provided you can get the users to ‘install’ it on their devices. For some companies that’s not optional due to different pressures (e.g. teachers would expect students to have our app installed on their phones).

Neither of these 2 solutions is that simple. There are trade-offs involved, and each team must compromise where they can/are weaker. All in all, if you MUST do RN, at least Expo saves you a lot of headaches with config/build/compatibility. It’s mediocre, but worlds better than pure RN (at least for me).

Re:Expo – open-source platform for making universal apps for... by MrBodangles on Wednesday July 26, 2023 @11:20AM (#36879213)
I came across a standard notes blog recently about how they “migrated” to a single codebase by relegating RN to render a single component of their web view, which is the same view that’s rendered in their desktop app and website, using a native “DeviceInterface” wrapper for each OS.

Sounded like a preferable approach to dealing with the complexity and limitations of RN and multi-platform. I wonder why more teams haven’t gone with this type of approach…

https://standardnotes.com/blog/react-native-is-not-the-futur...

Re:Expo – open-source platform for making universal apps for... by CharlesW on Wednesday July 26, 2023 @11:41AM (#36879593)
> “Make a progressive web app”: yes, that might be the way to go; provided you can get the users to ‘install’ it on their devices.

Assuming you're talking about the not-well-known process of adding PWAs to the Home screen, it's worth noting that you can package web apps for app store distribution as well. https://capacitorjs.com/

Re:Expo – open-source platform for making universal apps for... by xctr94 on Wednesday July 26, 2023 @03:26PM (#36883491)
This seems quite good, if reviewers don’t reject the app on the basis that not enough of it is native. We’ve gotten push back from Apple for all sort of minutiae.

Thanks for the tip tho :)

Re:Expo – open-source platform for making universal apps for... by munbun on Wednesday July 26, 2023 @07:49PM (#36886790)
The changes coming in Safari 17 are a great step forward for PWAs
Re:Expo – open-source platform for making universal apps for... by cuddlyogre on Wednesday July 26, 2023 @08:49AM (#36876789)
Almost no one knows what a progressive web app is. And for most people, the only way they use the internet on their phones is through apps. It just doesn't occur to them to do otherwise.

I wish things were different. It would have saved our company almost a year's worth of development on a pwa.

Re:Expo – open-source platform for making universal apps for... by afavour on Wednesday July 26, 2023 @09:27AM (#36877313)
This is highly dependent on your target market. On Android PWAs effectively are apps as far as users are concerned, you can even make a “WebAPK” and submit it to the Play Store.

The story on iOS is much worse, naturally. But if you can get past getting users to actually install the app the rest of the experience is acceptable.

Re:Expo – open-source platform for making universal apps for... by jayant_kaushik on Wednesday July 26, 2023 @12:58PM (#36880934)
Can’t we disguise the PWA as a browser on the iOS App Store? So in theory it’s just another browser that only allows to open one website- the PWA. But on the surface, to the users it will be available as an app in App Store.
Re:Expo – open-source platform for making universal apps for... by jameside on Wednesday July 26, 2023 @03:26PM (#36883504)
It is technically possible, of course, though I vaguely recall iOS App Store guidelines saying not to just wrap an existing website in a webview. On the flip side, PWA support in Safari has been gradually improving with better support for web manifests and web notifications, for example.
Re:Expo – open-source platform for making universal apps for... by willsmith72 on Wednesday July 26, 2023 @09:13AM (#36877106)
That decision completely depends on the context. For a small team, without too much native experience, I'd still 100% recommend using expo. It's just going to be easier for everyone with less bottlenecks and less code to maintain.

If PWAs were actually used by the mass markets, I'd go with that option, but the fact is they're not, and you can't expect to force your users to learn a new behaviour like that.

Re:Expo – open-source platform for making universal apps for... by afavour on Wednesday July 26, 2023 @09:41AM (#36877534)
> For a small team, without too much native experience, I'd still 100% recommend using expo.

Maybe I'm too optimistic but as a web developer I loved being given the opportunity to learn some Swift and Kotlin. Compared to Objective C and Java they are really very approachable for JS devs and with not all that much work you'll end up with a deeper bench of developers more satisfied with their jobs.

Re:Expo – open-source platform for making universal apps for... by jameside on Wednesday July 26, 2023 @02:07PM (#36882194)
Looking to always learn new things is great. If you find yourself looking to try out Expo and have completed the first setup steps, I'd suggest looking at making a development build of your app and the Expo Modules API for writing Kotlin and Swift code.

Almost all of the best apps made with Expo also have a small amount of custom native code. And I find it's just generally good to understand the abstraction layer above and the abstraction layer below the one you're working at to bring the two together the best you can.

[development-builds]: https://docs.expo.dev/develop/development-builds/introductio... [expo-modules]: https://docs.expo.dev/modules/overview/

Re:Expo – open-source platform for making universal apps for... by FireInsight on Wednesday July 26, 2023 @11:56AM (#36879882)
Flutter is the second nicest platform I've found for developing for Android (losing to Jetpack Compose) and best one for cross-platform. As a user though, I hate using Flutter (and non-native) apps for simple things. They often look totally different from the rest of the OS. For products that exist as something other than apps, it's fine, but I still prefer native Material You apps.

The best Android app for a product I've used is the AnonAddy app. It's stylish Material You while feeling very custom and tailored.

Re:Expo – open-source platform for making universal apps for... by jameside on Wednesday July 26, 2023 @01:09PM (#36881135)
Part of Expo's approach is for Expo apps to be native apps that provide a user experience that is native to the underlying platform, whether it's Android, iOS, the web, or something new.

For instance, navigation is one of the more complicated parts of an app's UX. The navigator UI has many subtle behaviors and animations that have been built over the course of several years, like how the back button and screen headers transition in and out. The gestures often have invisible hit boxes that are hard to replicate without using the system UI components. The screen transitions use specific animation curves users expect. And there's non-visual behavior like supporting universal deep links that take the user to a specific screen, which tends to require quite a bit of work to implement.

Expo uses the system UI components and the behaviors described above are present. The goal is for Expo UI to be native UI. And in some aspects, Expo can already provide a better default user experience like with universal links. Every screen gets a URL with Expo Router since URLs are a first-class concept, like they are on the web. This lets us provide deep linking (navigate from URL to a screen) and universal linking (HTTPS links work across web and native) as default features.

Sometimes the way we talk about Expo is that it brings together the best of native and web, and a lot of that is the user experience of native applications with the developer experience of the web.