DEV Community

Discussion on: "Flutter is better than React Native". Thoughts?

Collapse
 
codenameone profile image
Shai Almog

The market has clearly spoken in favor of flutter: insights.stackoverflow.com/trends?...

I shared my thoughts on this matter here: quora.com/Which-is-going-to-domina...

Collapse
 
mirhsquadri profile image
mirhsquadri

I read your answer at Quora in detail. Thanks for the analysis. I am inclined to believe so myself. I just have question. In your answer you mentioned dart as being 'less desirable'. Is that a comparison against JS or are there some inherent issues with dart? I know that it is OOP language which is on its own not a good thing. But are there other issues you have encountered?

Collapse
 
mirhsquadri profile image
mirhsquadri

Also, what are your thoughts on Flutter for Web Development?

Thread Thread
 
codenameone profile image
Shai Almog

It's not a web development tool. It can be used to replace things you would have historically done with Flash but it isn't meant for building websites.

Thread Thread
 
mirhsquadri profile image
mirhsquadri

Flutter has tried to expand its domain into the web thus attempting to replace Vue and NextJS. But there are many differing opinions on it.

Thread Thread
 
codenameone profile image
Shai Almog

Technically it isn't really an equivalent of most web tools. If you would inspect a flutter or Codename One app in the browser you would see "weird stuff". That's OK for some use cases but it isn't really "web".
It runs in the browser, that's true. But it's an app that runs in the browser. Not a web app. It isn't HTML/DOM etc. That could be a plus for some use cases. I know a lot of developers use our web port to build apps. Hell, one customer even targets IE 6 which would be a nightmare with React/Vue et al but with Codename One it mostly works because we don't need the DOM.

There are a lot of downsides though. Plugins and tools that rely on DOM/HTML start failing. Password managers etc. are hard to work with. We have workarounds for those but it's a hassle.

Thread Thread
 
aadityasiva profile image
Aadityasiva

A web app with flutter is not equivalent to one made with JS. The flutter team themself say

Not every HTML scenario is ideally suited for Flutter at this time. For example, text-rich, flow-based, static content such as blog articles benefit from the document-centric model that the web is built around, rather than the app-centric services that a UI framework like Flutter can deliver. However, you can use Flutter to embed interactive experiences into these websites.

But if you expect most of your users to use the mobile app made with flutter then flutter for web is not a bad choice

Thread Thread
 
codenameone profile image
Shai Almog

Sometimes a web app is just a mobile app placed in the web. This way it can circumvent store restrictions etc. If that's what you want then flutter web will work for you.

Sometimes the web app is something a bit different. It might include some of the functionality of the mobile app but it might also be your marketing website. In this case flutter sucks. SEO and related tooling just won't work with flutter. Maintenance would be painful since the web site and the app would have differences and different paces of update.

You won't be able to reuse all the amazing tools available for doing stuff on the web. It isn't a website, it's an app that runs on the web.

Collapse
 
codenameone profile image
Shai Almog

OOP is wonderful. I mean that Dart has been around for years and no one picked it up for anything. Not even Google. Kotlin and Typescript were winning hearts and minds based on the strength of the languages themselves. Dart had no traction before flutter. Even the Android team within Google didn't want to use it.

It also suffers from the inherent overhead of non-JVM languages on Android. It's amazing to me that Google would pick a cross platform solution that works worse on Android than on iOS...

Thread Thread
 
mirhsquadri profile image
mirhsquadri

I wonder what motivated them to choose dart...

You mentioned OOP is wonderful. Are you speaking in terms of mobile app development or just oop in general.

Thread Thread
 
codenameone profile image
Shai Almog

This was built by the Dart team at Google. Dart was dying so they built a platform to help it gain traction. It worked way better than I thought.

OOP is wonderful for everything. In cross platform specifically encapsulation is crucial. Polymorphism is amazing for widget systems etc.

Collapse
 
christiankozalla profile image
Christian Kozalla

For what reasons is OOP "on its own not a good thing"? The statement itself seems to be highly prejudiced.

Note: I am not affiliated with OOP whatsoever.

Collapse
 
hasnaindev profile image
Muhammad Hasnain

Hmm, so, flutter is better because it is popular?

Collapse
 
mirhsquadri profile image
mirhsquadri

What are your thoughts on Flutter?

Thread Thread
 
hasnaindev profile image
Muhammad Hasnain

I haven't used either but I always advocate for using the tools that are right for YOU and right for the job. There are an infinite amount of opinions and conventions. If you work for company X, name variables a certain way, declare them in a certain sequence. Enter line break here, remove line break there. Choosing tech-stack isn't any different.

It is just stupid and a waste of time. That's why I say, pick whatever is right for your team and your needs. Right tool, for the right job. If you want to get a job or freelance, choose whatever is hyped and mainstream, make money while you can and jump to the next new hyped technology, repeat.

Collapse
 
codenameone profile image
Shai Almog

Because it draws its own widgets. That means it's properly cross platform and not a half measure like react native.
If you use react native you run into platform specific problems. Write once, debug everywhere. Might as well go all the way and write a native app. Flutter (and Codename One BTW) doesn't have that problem. It's truly portable and lets you customize everything.

Thread Thread
 
hasnaindev profile image
Muhammad Hasnain

Makes sense. Thanks!