[Flutter 1-1] 8 advantages of Flutter and why you should try Flutter in the next project

Initial link

Let us understand the advantages of Flutter and other cross-platform frameworks, and the role of these advantages in the development process.

<span id="jump1">What is Flutter</span>

As far as my current professional development career is concerned, I have witnessed too many examples of projects that don’t know which cross-platform solution to choose. These projects are different, but we all hope that these projects can run on more platforms and more devices. A common practice is to recruit different developers on different clients for development work, such as iOS apps on mobile phones. And Android programmers, etc.
I remember that in 2013, I saw a relatively complete cross-platform game development plan for the first time. At that time, I was thinking, why is there no such tool on the App side that can meet our cross-platform needs?
But now we have it, it is Flutter! I will introduce what I have done with Flutter below, hoping to help or inspire you.
I have some iOS development experience and some game development experience. It can be said that Flutter is the cross-platform solution I have been looking for. It is not only easy to use, but also maintains the consistency of the cross-platform UI, and it is easy to interact with the native. It is a very good experience.

<span id="jump2">Flutter的优势</span>

You may have learned before that all cross-platform frameworks will help save development time. However, Flutter is different from other frameworks in some places. Let's take a look at where Flutter is better than other cross-platform frameworks.

<span id="jump2_1">1. Use the same UI and business logic across platforms</span>

We know that basically all cross-platform frameworks provide a way to share code between target platforms. But no platform like Flutter allows sharing of UI code and the UI itself.
To illustrate this point, let's take a look at the implementation logic of one of the cross-platform framework UI:
Insert picture description here

The rendering process of React Navite looks like it is simple on every platform. However, it is not difficult to find from the figure that this rendering process needs to still be rendered by native components of each platform. React Native helps us to map the UI controls of each platform application layer. This requires mapping each animation and each UI to the animation and UI of each platform, which is obviously more cumbersome.
In contrast, Flutter does not need to rely on UI components on any platform to generate UI interfaces. The only thing Flutter needs is a canvas, which is what we often call Canvas.
The following is the rendering process of Flutter:
Insert picture description here

Flutter can build exactly the same UI on any platform, and this unique rendering method is the key to its stand out.
In short, using Flutter to implement UI and business logic can save time and effort without affecting the performance of the final product. It turns out that iOS and Android need to be equipped with corresponding programmers for each platform. Using Flutter only needs a group of programmers, and it saves programmers!

<span id="jump2_2">2. Save development time</span>

According to my personal development experience, it takes at least 40 seconds from compiling to running an Android App. At the same time, the process of debugging the UI needs to be compiled and run continuously, which requires a lot of time. It is true that Android Studio has a layout preview function, but there is always one shortcoming: Android Studio cannot run as expected every time, especially when customizing the View.
Flutter's "hot reload" function allows us to see the changes in the application in real time without losing the current application state. This is the fundamental reason why Flutter saves development time.
In addition, the Flutter community has made a lot of effort to provide various controls. Most of these controls can be customized, which saves us a lot of time in building the UI. In addition to many core controls, Flutter also provides a large number of Material (Android style) and Cupertino (iOS style) controls to meet different design styles.
As shown below:
Insert picture description here

All in all, using Flutter to develop, we can bypass several time-consuming steps in the program development process, which makes the entire development process faster, simpler and more worry-free.

<span id="jump2_3">3. Faster iteration speed</span>

Using Flutter to develop iterative products will be faster. In most cases, we need to develop and maintain an App on both the Android and iOS sides, and Flutter can complete this task with only a group of people. At least double the development time. The reason is simple, we only need to write a set of codes to get the same interaction effect on each application platform. Any 2D-based UI can be implemented in Flutter without calling native code.
In addition, Flutter uses a declarative grammar to build the UI. According to my experience, it can significantly increase the development speed. This is most obvious when it comes to UI effect adjustments.

<span id="jump2_4">4. Infinitely close to the original interactive experience</span>

We know that App performance is the key to a good user experience.
Although it is difficult to tell the exact number, it is safe to say that in most cases, the performance of Flutter applications is no different from native applications, and even performs better in complex UI animation scenes.
why? Unlike most cross-platform frameworks, Flutter does not rely on any intermediate code for mapping. Flutter applications directly call the underlying code, which greatly improves performance.
We can also use Flutter to fully compile and publish applications.

<span id="jump2_5">5. Rich UI animation</span>

One of the biggest advantages of Flutter is that you can modify any control on the screen at any time, no matter how complex the control is. It also supports direct use of native controls for UI animation.
Here is an example of a simple custom animation:
Insert picture description here

Similarly, using Flutter to generate animation is more flexible and versatile, and will not increase the workload. Flutter can easily implement transition animation, rounded corners, colors, shadows, transformations, etc.
Here to provide you with more Demo. Let us get familiar with these animations better.

<span id="jump2_6">6. Independent rendering engine</span>

Compared with other frameworks, Flutter should have more capabilities. Obviously, this requires the framework itself to be very powerful, and the framework itself is a high-performance framework.
Flutter uses Skia as the underlying rendering engine. With Skia's support, the UI layer can be rendered on any platform with consistency. In other words, we can present the UI on other platforms without adjusting any code, which greatly simplifies the development process.

<span id="jump2_7">7. Can easily interact with native</span>

In addition to the UI, we also have many functions that need to rely on native support, such as obtaining GPS information, Bluetooth communication, sensors, cameras, photo albums, and so on. These functions can be achieved through Flutter plug-ins.
Of course, sometimes these plug-ins are not enough to meet our needs. But don't worry, the development language (Dart language) used by Flutter is very simple to communicate with the native code. With just a few lines of code, we can realize the interaction between native and Flutter, and can realize any requirement you want to call native functions.
The interactive process is as follows:
Insert picture description here

<span id="jump2_8">8. Not only can run on the mobile terminal</span>

Flutter is not only available on mobile devices, but also supports web and desktop. At the 2018 I/O conference, Google demonstrated the technology of Flutter Web, which makes it possible to run pure Flutter applications in the browser without modifying any source code.
Here is the demo video:

{% raw %}

<div style="position: relative; width: 100%; height: 0; padding-bottom: 75%;">
<iframe src="//player.bilibili.com/player.html?aid=927277621&bvid=BV1iT4y1c71E&cid=241986005&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true" style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;">
</iframe>
</div>

{% endraw %}

Those who cannot open the video can click here to view the
official operation, which means that Flutter has upgraded from a mobile development framework to a full-platform development framework.
If we don't need to deploy and use on the mobile side, skilled Flutter programmers can make Flutter run on popular platforms, including but not limited to Android, iOS, web browsers, Windows, macOS, Linux, and even embedded devices. The same code can run on any of these platforms, and there is no need to modify any Dart code.

<span id="jump3">From the business perspective, is Flutter a good choice? </span>

Yes! Yes! Yes!
Software products can guarantee performance and stability, easy recruitment of personnel, and rapid product iteration and development. These advantages can bring huge value to enterprises. Once the technical solution has defects and problems in any aspect, it will bring direct or indirect losses to the enterprise.
From this perspective, Flutter can reduce our risks:

  • Google is currently developing Fuchsia OS (to be used with Flutter), so Flutter will continue to invest in R&D personnel to maintain and upgrade without interruption.
  • The threshold for using Flutter is not high, because there are already many popular Android developers in the community who are advocating and using Flutter.
  • There are already many big companies in use, such as: Alibaba, Google Ads, AppTree, Reflectly and My Leaf, etc., this is the proof of Flutter's strength.

<span id="jump4">Why should I try Fultter?</span>

Let us summarize the most prominent advantages of Flutter:

  • The UI and business logic code has always been shown on various platforms
  • Faster development speed
  • Faster iteration speed and faster online speed
  • Infinitely close to the original interactive experience
  • Easier custom UI and animation functions
  • Independent rendering engine
  • UI components that do not depend on any platform
  • Applicable to more platforms
  • Commercial risks are kept to a minimum

Therefore, if you want to develop cross-platform, high-performance applications, Flutter is the best choice. It is only a matter of time before Flutter officially becomes the ultimate cross-platform UI framework.

Guess you like

Origin blog.51cto.com/13824996/2542979