17 ms·
A bit off-topic, but what's the best method to build cross-platform mobile & web apps nowadays ? I'm talking either business logic + UI , or just business logic
by bsaul 2y ago
A bit off-topic, but what's the best method to build cross-platform mobile & web apps nowadays ? I'm talking either business logic + UI , or just business logic ?
like gomobile, rust, typescript, etc ?
At some point i thought about using typescript for all business logic, as it seemed the most portable tech, but i realized there's no good way to have decent performance running javascript on iOS.
- Pepe1vo 2y agoWhat's your definition of decent performance? My company has built quite a few complex capacitor + Angular + Ionic apps and the performance on iOS is fine. Some even got featured by Apple, so that should be some indication that quality and performance was alright.
- devjab 2y agoWe use Tauri, but I think that it’s important to know that we solely use it for internal tools. I have no idea if it’s a good tool for consumer facing products. It works well enough for what we use it for, which is mostly for our solar park technicians where using cross platform Typescript on terrible internet became too much work for our small team.
- junon 2y agoWe use Tauri at GitButler and love it.
- DreaminDani 2y agoAgreed. Tauri for desktop, capacitor for mobile. Bring your own front-end library either way.
- brabel 2y agoThe best option is probably Flutter right now: https://flutter.dev/ https://flutter.dev/ If you don't mind writing the UI native, sharing only business logic code, Kotlin is an option: https://kotlinlang.org/docs/multiplatform.html#kotlin-multiplatform-use-cases https://kotlinlang.org/docs/multiplatform.html#kotlin-multip... Kotlin also can do the UI if you use Compose: https://www.jetbrains.com/lp/compose-multiplatform/ https://www.jetbrains.com/lp/compose-multiplatform/ ... however, iOS support is still in alpha, and Web is "experimental". If you're not willing to cope with that (expect to have to change your code as they develop the framework) then Flutter is the way as it's pretty stable already on all platforms. If you already know Typescript and React, you may also consider React Native (but I can't attest to its performance on iOS or anywhere else): https://reactnative.dev/ https://reactnative.dev/
- nitinreddy88 2y ago[flagged]
- rhabarba 2y agoThat's unfortunate. I actually liked Flutter.
- yellowfool 2y agoDon't worry, it's a lie.
- metaltyphoon 2y agoUntil it isn’t. Too much faith on Google.
- joezydeco 2y agoC'mon, just because they lied 295 times before doesn't mean they'll do it again. =)
- synergy20 2y agoI think they are just outsourced
- enjoytheview 2y agohttps://twitter.com/MiSvTh/status/1785767966815985893 https://twitter.com/MiSvTh/status/1785767966815985893
- bitvoid 2y agoFirst comment on that Reddit thread: --- Hey folks! Kevin, product manager on Flutter and Dart here. The layoffs were decided AT LEAST a couple of layers above our team and affected a LOT of teams. (I think I can say that). Lots of good folks got bad news and lots of great projects lost people. Flutter and Dart were not affected any more or less that others. It was a tough day...tough week. It was crazy to be seeing demos and new things working and discussions about new customers the same day we lost colleagues and friends. We're sad, but still cranking hard on I/O and beyond. We know ya'll care SO MUCH about the project and the team and the awesome ecosystem we've built together. You're nervous. I get it. We get it. You're betting on Flutter and Dart. So am I. So is Google.
- mdhb 2y agoFlutter is so far in front of anything else out there I think at the moment.
- petesergeant 2y agoI’m getting on pretty well with Ionic + TypeScript, using React and Redux. Performance hasn’t really been an issue, although I’m also not doing anything that performance heavy. I’d recommend it. I like that it ends up being comprehensible HTML + CSS, as well as simple React that I’m already comfortable with and can debug.
- SoKamil 2y agoI would say React Native with all the Expo stuff. While Flutter is okayish, web is bad in terms of feel and accessibility since it renders to a canvas. Also, iOS still has issues with lag even after introducing Impeller rendering engine. Look at Bluesky's client. The app performs decent on all supporting platforms and has single codebase. https://github.com/bluesky-social/social-app https://github.com/bluesky-social/social-app
- ricardobeat 2y agoMy team achieved better than native performance using RN when rewriting a very large iOS app. And that was in 2018, before Hermes and a lot of other optimizations. It takes some careful usage of requestIdleCallback and avoiding doing work in the UI thread but it is not rocket science. You do have to avoid a lot of the going advice and bloated libraries / frameworks though.
- mradonic 2y ago| better than native performance Maybe better than the native you had before the rewrite lol
- ricardobeat 2y ago“The app we had before” had 50M+ users, developed by a large iOS team, including a lot of experienced developers working on performance, and generating billions. I think it was a valid baseline.
- robterrell 2y ago> better than native performance using RN You had an app written natively in Objective-C or Swift, switched to single-threaded javascript React Native, and then your app ran faster?
- wiseowise 2y agoUnoptimized native application, probably written in a yolo let’s ship it faster way, is slower than rewrite that learned from mistakes of previous application. What makes you surprised?
- ricardobeat 2y agoThough JS is single-threaded, it only builds the render tree and is more than fast enough if you’re careful. RN has a separate UI thread for actual rendering, I/O is offloaded and extensions can use extra threads. The largest bottleneck historically was the bridge between obj-c and js (now superseded by JSI), and not the speed of the engine itself.
- neonsunset 2y agoBusinesses do seem to like AvaloniaUI and Uno. https://avaloniaui.net/ https://avaloniaui.net/ https://platform.uno/ https://platform.uno/
- lakomen 2y agoThanks, which of the two would people recommend for a C# beginner? And is oidc well supported on all target platforms?
- neonsunset 2y agoBoth frameworks have various packages that add OIDC support to them so that shouldn't be an issue. As for beginner - there's quite a bit of learning curve in terms of writing GUI applications themselves. Avalonia is kind of like WPF* but good(tm) and cross-platform. Uno platform is more like Xamarin and MAUI except in a better shape as of today. From technical perspective, Avalonia focuses on consistent rendering on all platforms with Skia while Uno tries to use native controls instead. I generally would not advise using Avalonia for mobile over Uno. In mobile case you might actually want to also give MAUI a try as, despite harsh criticism it has been receiving, it has improved significantly. * either platform supports various declarative UI libraries (that are either part of their ecosystem or community-maintained), so you are not married to XAML thankfully.
- deleted 2y ago[deleted]
- cseleborg 2y agoThat's a great answer, very helpful. I just picked up Avalonia for a test drive. Why do you think Uno is better than Avalonia for mobile?
- neonsunset 2y agoPerformance on mobile devices and UI libraries. Avalonia ecosystem is predominantly focused on desktop, which is not the case for Uno. But I liked the fact that setting up and AOT compiling Avalonia templates was a breeze so use it for side projects. For something more serious that has to target mobile, I would investigate how much MAUI has progressed in terms of quality and if problematic, would just go with Uno.
- kitd 2y agoIn Go land, there's Wails https://wails.io/ https://wails.io/
- lakomen 2y agoWhat are all the target platforms? The website doesn't have a list, or I'm unable to find one. EDIT: never mind, I found it https://wails.io/docs/reference/cli#platforms https://wails.io/docs/reference/cli#platforms It doesn't seem to support Android, IOS or web.
- peddling-brink 2y agoWouldn’t those be the server platforms?
- leeman2016 2y agoAren’t those platforms for the dev machine on which you would write the code and build you app? Edit: looks like it’s for the server machine
- ludwik 2y agoI tried quite a lot of multiplatform frameworks in the context of mobile, and for me Flutter is in a completely different league than the rest of them. I really love it.
- divan 2y agoFor the last 4 years the answer is Flutter.
- Robinxd 2y agoHas been posted here before also, so adding it for people not aware of it already - https://areweguiyet.com https://areweguiyet.com
- scosman 2y agoNative UI for anything that requires polish. I’ve been through too many iterations of frameworks that promise everything and don’t deliver. You’re up and running faster, then soon after you’re patching the core libraries after an OS update to try to get the FPS closer to native, or match a system animation more closely. The time saving only exist if you never polish your UI. Core logic can be shared. I use gomobile - mostly love it but 3mb overhead for runtime (so not for web). Kotlin multi platform looked good, but I found it missing pretty basic libraries (which exist for Kotlin Android, so no one is building multi platform equivalents). Rust with Mozilla’s language binding layer looks good but I haven’t tried it.
- mdhb 2y agoI don’t think that premise of “native UI for anything that needs polish” is true these days. Canonical the company behind Ubuntu have said for some time now that all future app UIs of theirs would be done in Flutter starting with the very first thing people see the installation process. Google just rewrote Google Earth’s UI in Flutter. BMW are doing all of their in-car entertainment systems in Flutter.
- deergomoo 2y agoAre any of those better than the alternative, or just cheaper? I suppose if the alternative is “this only exists on one platform” or “this doesn’t exist at all” then maybe, but I find it a bit sad how keen we are as a profession to accept compromise and mediocrity to save developer time and expense. I get it, but I don’t like it.
- mdhb 2y ago2/3 of those examples had no requirements for cross platform and still chose it anyways. Additionally all 3 of those examples decided to take what they already had with native and decided to rewrite it because of the benefits. I’m saying the “gap” between Flutter and native in this case is much much much smaller than you seem to think it is. Quite a bit has changed there in the past year or two. That isn’t my opinion but that was the result of many major and very competent teams coming to that conclusion and putting their money where their mouth is in order to substantiate the claim.
- bossyTeacher 2y agoYou already answered your own question imo. The web is the best thing we have so far and nothing comes closer to the full package. It literally is write once and write everywhere. All the other alternatives are young frameworks that have not been battle tested and have weird quirks once you want anything relatively complicated.
- andsoitis 2y ago> what's the best method to build cross-platform mobile & web apps nowadays ? Uno (https://platform.uno https://platform.uno): * open-source * targets Android, iOS, Windows, Mac, and Linux (https://platform.uno/platforms/ https://platform.uno/platforms/) * C# * automatically implements views and controls using each platform's native UI frameworks * good IDE support: Visual Studio, VS Code, Rider (though you are not limited to those) * Figma plugin for design collaboration
- mort96 2y agoI mean I guess that's fine if you're into .NET but how about those who prefer to avoid that
- neonsunset 2y ago[flagged]
- mort96 2y ago[flagged]
- balencpp 2y agoWhy would you avoid .NET?
- mort96 2y agoNot generally a huge fan of locking myself into Microsoft platforms
- balencpp 2y agoIf you mean windows, it has been so many years since .NET has been able to run on many different platforms; and by now, most of the ecosystem supports majority of platforms too.. You get an amazing runtime with near native performance, access to value types, no type erasure, access to low-level operations when utmost performance is needed, very good cross platform and architecture SIMD support, three different great IDEs with two of them being cross-platform, AoT compilation that keeps getting better, WASM target with a good framework (Blazor), and so on. Modern .NET is truly amazing and highly undervalued IMO.
- Alifatisk 2y agoFlutter
- paulddraper 2y agoExpo targets iOS, Android, web.
- raminf 2y agoFor mobile, this looks promising: https://skip.tools https://skip.tools Transpiles SwiftUI over to Kotlin/JetPack Compose. Native all the way down. Haven't used it in production, but the demos work and are native after going through XCode and Android Studio.
- malermeister 2y ago> first-class development environment (Xcode) this made me lol. As somebody who does mobile dev professionally, the worst thing about iOS dev is how terrible XCode is compared to Android Studio. There's no way I would want this.
- marcusbuffett 2y agoI tried React Native, but ended up re-writing and going with SolidJS + Capacitor, and I love the setup. I've barely thought about performance since switching, people think the iOS/Android apps feel native, there's almost never any differences in behavior between the platforms, it's a fantastic setup for a solo dev.
- felipefar 2y agoI would mention as an alternative QML, although I wouldn't claim it is the "best method". It's marketed as being mobile-capable, but I've heard problems about scrolling inertia and vsync delays. I'm curious to know what others think about it.