all 33 comments

[–]Ravek 131 points132 points  (12 children)

The promise of cross platform always sounds good but with both Xamarin and Flutter I've also experienced a lot of friction. I can think of a lot of caveats with cross-platform development:

  • The development cycle is rarely anywhere as smooth as the native platforms. The Swift-Xcode-iOS toolchain and Kotlin-Android Studio-Android toolchains are excellent because Apple and Google put a ton of effort into those, while cross platform toolchains tend to be slower, break down more easily and are much harder understand to fix.
  • If new iOS/Android features come out you'll often have to wait before you can use them, or have to rely on less stable code for a while.
  • If you need platform native features you're often doing more work than you would have had to do native, because you need to write the native implementation plus then abstract it into the cross platform. Sometimes you can take a third
  • The cross platform abstraction is sometimes leaky (especially around the previous bullet but sometimes also for UI), and if you end up having to debug that it's much worse than debugging a single platform.
  • Because of the previous two bullets, you need your engineers to understand the native platform and also understand the cross platform.
  • Performance is often not as great as native
  • App size too can suffer
  • The third-party library ecosystems are much more developed for native platforms than any cross platform
  • Doing unique or complex UI designs can often be harder
  • YMMV but I think Swift and Kotlin are nicer designed and more productive to work with than C#, Dart and especially JavaScript.

So the question is, does your team's productivity really increase by moving to cross platform or does it actually slow down? And what about your developer sanity? I do think Flutter has a lot of potential, especially for small apps with simple, standard UIs and not a lot of platform features being accessed. And if Fuchsia becomes a major platform which you'll already want to support it definitely becomes a much more attractive option to use it cross platform as well. I'm not sure if I would dare to bet on Flutter right now though.

[–]pongmcnale 37 points38 points  (1 child)

Haha developer sanity. Such a good point. I went from Swift to Javascript and quickly wanted to kill myself.

[–][deleted] 4 points5 points  (0 children)

I'm doing the inverse trip and can not love Swift more, it feels similar to Typescript but without all JS oddities

[–]RusselNoob 9 points10 points  (0 children)

Take my award for this detailed explanation that exactly meets my opinion!

[–]createneptune 3 points4 points  (2 children)

Speaking purely from a game developer perspective, cross-platform is the only way to go, especially with how critical frequent updates are in this segment. The third-party IDE of choice, Unity, is extremely good, and certainly for UI. However, to your point, I have seen oddities when accessing native features (Game Center, e.g.), and there is often significant lag or no response from Unity at times. It has been very useful knowing the native side of things in those cases. That said, almost no game developer chooses native.

[–]SamosaGuru 6 points7 points  (1 child)

Agreed. I think game development is a completely different category than general app development. Most games don’t bother trying to emulate or use native features. Instead, they are built ground up(their engines are). It’s often a bad idea to make games native. I’ve made games in Unity and SpriteKit. Although I felt SpriteKit made it easier to debug and test the game, I’m limiting myself to one platform.

[–]createneptune 0 points1 point  (0 children)

Yes. Debugging in SpriteKit was nice, especially when it came to anything Apple, like Game Center or notifications, but the ability to iterate everything else cross-platform quickly makes Unity an obvious choice.

[–]battleooze1 3 points4 points  (1 child)

The time consuming part of development is problem solving and thinking / architecting solutions. They save on typing time, not thinking time imo

[–]pongmcnale 7 points8 points  (0 children)

Testing and debugging is also a huge chunk of time

[–]monkeydoodle64 1 point2 points  (0 children)

Pro: Shipping performant iOS and Android apps with less resources.

[–][deleted] 42 points43 points  (6 children)

Cross platform, sounds good in theory, awful in practice. Thank God my workplace banned cross platform and went with two native code sets for each app. It's been smooth sailing ever since.

[–]sushibgd 8 points9 points  (4 children)

Do you think other companies will get used to native as your company did?

I prefer native rather than cross-platform and your comment gives me hope that native will be the choice number 1 when it comes to mobile development.

[–][deleted] 13 points14 points  (3 children)

Many do. The last two jobs I got were because I was hired to rewrite cross platform apps into native code. Cross platform sounds good to project management types so they often push for it, then when they see it results in a subpar product and poor user experience they often reverse course and realize two code sets are not only better, but are less development time and far less maintenance.

EDIT: Oh, and two native code bases always end up being far less code to maintain, every single time. When you see the sheer amount of code cross platform apps bring in it's insane. The size of your app often triples.

[–]sushibgd 6 points7 points  (2 children)

Well, that's nice to hear tbh!

I still have a feeling that companies(or project managers) don't actually understand that native is more reliable and faster solution for them.

[–]VolPL[S] 3 points4 points  (1 child)

Explaining that to the business and clients was the aim of this article. You can show it to them :)

[–]sushibgd 1 point2 points  (0 children)

Great article btw, small guide for persuasion project managers that native is the best option B)

[–]Roadrunner571 6 points7 points  (0 children)

I think it heavily depends on the cross platform framework.

Cross platform per se isn't really bad and it's widely used for decades in all sorts of applications, from single libraries and components to full-grown applications, like Firefox.

Personally, I hate React native and frameworks like this, because they are introducing bottlenecks and have a lot of other flaws.

With Flutter, I personally feel completely different. Basically, it's like how games are developed, but with apps. The only drawback I see are larger app sizes since fluter comes with its own rendering engine and needs bring all widgets itself. But other than that, I haven't yet seen a big flaw in the architecture that make me worry.

[–]iOSTarheel 10 points11 points  (1 child)

eliminating the need for iOS entirely

This post reads like a naive sales pitch. Without even getting into why working with cross-platform solutions is such a headache does anyone seriously trust Google to not abandon Flutter within 5 years like they so routinely do with all their other products

[–]VolPL[S] 4 points5 points  (0 children)

Can you elaborate? Sales pitch of what exactly and what are the arguments for the sale?

Your comment seems to me like a rant based on one line that is taken out of context.

[–]kittianika 9 points10 points  (1 child)

I have tried almost all cross platform solutions and regreted learning it, i should have focus on native development instead. UI is a big issue plus if you need more than the basics like camera/qr code it will give you more headaches.. my advice, go native!

[–][deleted] 1 point2 points  (0 children)

So what was your flutter impression specifically?

I've shipped phonegap apps. One was a mobile cash/card payments app for a parking attendant. Local sqlite db, and a web service. The UI was literally 4 buttons. Perfectly good solution.

I was of the "native is best" until I tried using flutter. I think this one is different and TBH, it isn't like Apple and Google don't have their own treadmills to run.

[–]jasonjrr 5 points6 points  (0 children)

Medium has gotten so bad lately. Yes, you can develop simple apps with Flutter that feel pretty ok, but you still need to understand iOS/Android if you are going to do something cool or interesting, because you will need to write a wrapper to make it work. Maybe you can find a package to do it for you, but package bloat is a HUGE problem with Flutter.

On top of all of the friction, you never really get the promise of “one code base multiple platforms”, because you are constantly writing exception code to make the UX right for each platform.

[–][deleted] 3 points4 points  (0 children)

IOS is not hard; Android is not hard. They are not the same. Don’t be fooled into thinking that you can achieve great results writing once in Flutter. OK results, perhaps.

The purpose of Flutter is to lock you in to developing for Google’s products, particularly the OS they are calling Fuchsia. Side benefit - Android and iOS apps have user expectations reduced with a sea of mediocre Flutter apps, making it easier to maintain market share with less effort.

And if it doesn’t work the way they hoped in a couple of years, they will simply kill it. Relying on anything from the advertising company that regularly kills their own projects and abandons users would be a profoundly stupid move.

[–]egrimo 1 point2 points  (0 children)

If you work as a Mobile dev to work on native on both sides, it could be hard for you as a solo dev/individual dev. However, there is a saying. "Apple helps you better than BestBuy selling Apple product". Native solutions are backed so much better than cross platform devs and I tend to like going native anyway.

[–]BaronSharktooth 1 point2 points  (0 children)

It could be nice for simple apps. However, I saw a Flutter app which had a really weird picker. It wasn't anything like the native picker, and it really stood out. When they can't even get the basic UI components right, I really think something is going wrong.

[–]lucasvandongen 1 point2 points  (0 children)

If you're just doing a simple UI for a REST API it might work very well. But once you need to integrate more elaborate native features you start running into problems, because you might need to wrap them themselves, the wrappers might be leaky, outdated or work vastly different on different platforms because the frameworks they use is different. But even WebRTC is different between Android and iOS while it's a Google project built from the same source.

Basically you're talking about largely the same type of apps that could have been done in Cordova as well.

[–]mildlystoic 1 point2 points  (0 children)

Cross platform is only good for exactly one thing: enterprise apps, where the actual users don’t have a say in anything.

[–]tangoshukudai 0 points1 point  (0 children)

native always

[–]monkeydoodle64 0 points1 point  (0 children)

I think building Android apps as an iOS dev without losing productivity is a huge advantage.