Useless preface

In fact, since Jetpack Compose came out, the choice between Flutter and swarm has been a problem in Android development, just like iOSer’s decision to choose between Flutter and SwiftUI. One of the more troubling aspects of Android development is that Flutter and Swarm are the same parent.

Originally there is nothing good to write about this topic, because this topic belongs to the “thankless” type, after all, was seen by the native development, someone may be painful criticism of me:

“Is it me Andorid who can’t lift the knife, or are these little frames of a year or two floating, maybe we’ll wait and they’ll all get cold, and you’ll know all day long ‘selling anxiety’ harvesting flow.”

However, seeing your heated discussion and having to answer similar questions from time to time, I could not hold back any longer. Therefore, I finally chose to export a wave of “risk death” to introduce the relationship between them and how to choose from my point of view.

Of course, did someone say I can’t even choose? Of course, because Flutter and Compose do not affect your Android development status at this stage, they are at best competing tools.

Flutter and Compose were originally intended

Flutter and Compose have the same future goals, but at least they have different origins.

Compose is the new UI library for the Jetpack family. Understand that! Compose is a member of the Jetpack family, so it can be used for Android UI development, so you can either use it or not.

Compose was born to redefine the way UI writing is done on Android, to improve the efficiency of Android’s native UI development, and to bring Android UI development up to date.

Like it or not, declarative interface development is the way of the day, as shown by React, SwiftUI, Flutter, etc.

For Flutter, it is cross-platform, because Flutter has no platform of its own. Some people say that Fuchsia will be the home of Flutter. But that is a future story, because Fuchsia needs to feed itself first.

Because Flutter was born as a new UI framework designed to exist across platforms, from the bottom to the top it was an “innovative” and “bold” design, choosing Dart itself was a “bold” decision. Even Web platforms dare support the Canvaskit WebAssembly mode.

Therefore, the “willfulness” of Flutter was not viewed favorably from the beginning. Of course, there are still people who do not view Flutter favorably, because Flutter is somewhat “extreme” and unfriendly.

So, with all that said, the summary is:

  • Compose is the future of the Android UI. For now, you may not, but if you’re going to be on The Android platform in the future, you’ll have to.

  • The future of Flutter is multi-platform, a more stable and reliable multi-platform UI framework. If you’re not going to be a big front-end or multi-end developer, you don’t need to be.

By the way, there is also a similar implementation of Flutter on Hongmeng. Those who are interested can check it out for themselves.

Compose and Flutter are the same future

Although Compose and Flutter do not initially serve the same people, their future goals are definitely the same.

Why do you say so? Isn’t Jetpack Compose for Desktop: Milestone 1 Release an example of this attitude? Compose is only a subset of Jetpack’s UI, but the idea and architecture of its design have the potential to be cross-platform.

The essence of Compose is that Compose works like a compiler with a Skia. This is no different from Flutter. Flutter and Compose don’t feel strange just from the names of their controls, regardless of how they are developed.

Dart 1.12 is null-safety similar to Kotlin in this Flutter 2.0 update.

So coming back to the theme of the other question, do Flutter and Compose conflict?

Flutter and Compose seem to conflict in the sense of project establishment, but they do not conflict from the user’s point of view.

Because for developers, whether you learn Compose or Flutter first, it will help you to master the other skill. Learning one is equivalent to learning 70% of the other skill

From the perspective of the future:

  • If you are a native developer and have not yet been exposed to Flutter, learn Swarm first, which will be more helpful for your Android career, and then learn Flutter.

  • If you are already using or learning about Flutter, please continue your education and do not have to worry about Compose. You will not be too far away from Flutter once you master Flutter.

Both of them are going to be multi-platform in the future, and I think the conflict is more about hands-on learning, rather than being torn between the two.

From a practical point of view: Android and iOS are Stable under Flutter 2.0. The Web has entered the Stable branch, and Macos/Linux/Win has entered the Beta stage. It can be previewed with snapshot in the Stable branch. So from this stage, if you need to develop cross-platform, even on PC, then Flutter should be a priority.

The React Native version is currently available at 0.64 😏

Of course, people may be concerned about whether or not frameworks have potholes. Essentially, all frameworks have potholes, and even network factors can be a pain point for you. The question is whether or not you accept these potholes.

Cross-platform itself is “dirty work” and “hard work”. The road to the full platform of Flutter is very difficult. As I wrote earlier in my book “Understanding the Misconceptions and Prejudices of Flutter full platform Development”, at this stage, Flutter full platform is more of a gimmick, just providing “one more possibility” stage.

One last thing to add routinely:

The reason why cross-platform is cross-platform, first of all, is the existence of the corresponding native platform. Many problems of the native platform need to be solved by the platform. Those who like to talk about XXX and dominate the native and cool rhythm, just because “your anxiety will become their profit”.

Talk nonsense

Said “I know all truth” of the truth, the nature is that we as developers, actually not should reduce yourself to in a language and a specific framework, we now need to be summarized in one area only because work, and for our future, but more should pay attention to is the foundation and hands-on programming ability.

I got in touch with Vue through Weex. I also used Uni-App to make a simple small program, developed apps on both ends with React Native, and wrote Web with Flutter. Even hand-writing apis in Kotlin on SpringBoot.

Therefore, in my opinion, the division between client and front-end has become increasingly blurred. I have met many Android developers who have written applets or Vue, and many front-end developers have also written apps through Uni-App, RN and Flutter. This is a normal trend as the platform matures. The more mature the platform is, the more it will start to merge with similar areas.

If you want to say “scroll”, this trend will allow simple, repetitive, or shareable content to be delivered across platforms. I’m sure some people don’t like cross-platform, but the context in which it exists has key value.

Maybe I don’t have a very deep understanding of some fields, but I can meet the needs and even explore them in depth when needed. I also have my own expertise in some fields, and the second time is not a conflict.

Of course you said I only want to study on a platform is there a problem? That’s fine, of course, and that’s a good thing, because being good at something is a very good thing.

But! Yes, I will say this again. However, in many cases, mastery of a certain technology needs to be verified and promoted by business scenarios. If it is not a large-scale business scenario and has not experienced various extreme tests, the so-called mastery is only superficial mastery in many cases.

Why do you say that? Because in the process of communication, some people often say that they want to go deep into XXX to master a certain technology or field, but eventually they still “pass through three doors but fail to enter”.

Finally, I would like to say that learning itself is a long-term investment. It is normal for us to pursue “cost performance” and “high return”, but this is the same as investment and finance. If you always want to make profits through “speculation”, you should be prepared for leeks.