Google takes fluent as its original breakthrough, and the mobile end is about to be unified


The past and present of Android

Android system

Android system is the largest system in the world, and the mobile terminal based on Java has many performance advantages The performance bottleneck of H5 and the shutdown of RN before 2018 lead to the industry’s loss of confidence in cross platform development Until October 2018, Google launched its first cross platform flutter solution, breaking the whole direction of mobile development.

Why flutter has become the direction mark of Android

  1. Cross platform: Based on the image rendering engine, the rendering effect of flutter is absolutely consistent under different platforms. It can truly cross platform and run everywhere
  2. Performance advantages: unlike H5, which uses DOM rendering and RN mapping components, fluent draws directly based on native. Completely surpassing the native in performance
  3. Hot overload: Android native development will encounter the compile package install trilogy. Development efficiency cannot be improved. Hot and heavy load technology is perfectly reflected in the flutter

Detailed introduction to flutter

  1. Dart syntax compilation: dart is a strongly typed, cross platform client development language. It has the style of optimization for clients, high productivity, high efficiency, portability and easy to learn. Dart is mainly developed and maintained by Google
  2. Flutter plug-in: dart language used by flutter can not directly call the java interface provided by Android system, so plug-in is needed to realize transfer. Flutter officially provides a wealth of native interface packages

Flutter system structure

Skia image processing engine

  1. In 2005, skia image processing engine was established to show the use of chrome Firefox and other Google’s own products.
  2. In 2007, the first Android system came out, so Google developers transplanted skia to Android platform.
  3. Skia as a 2D graphics system, including drawing, rendering, display pictures are completed with skia.

Will native development touch skia?

Skia engine details

  • Question: is it true? I only touched bitmap. There are many mysteries under bitmap

What’s the relationship between skia engine and flutter?

  • Is there any other way to define the layout through XML or inherit view to display on Android screen?

Why does flutter realize three major features

Cross platform

Excellent performance

Rendering process

React rendering is the same as flutter rendering

Fluent rendering

The rendering process of the flutter interface is divided into three stages: layout, drawing and composition. The engine is responsible for the composition of layout and drawing in the flutter framework.

Previously, Google released version 1.0 of the flutter front-end framework. Some students want to ask, what is flutter? Flutter is a Google front-end framework based on dart language. At present, it can be compiled and run on Android and IOS platforms, and its running efficiency can be comparable to that of native applications, which is also the biggest advantage different from JS cross platform frameworks, such as weex, taro, react native, etc. at the same time, dart language was originally released by Google to improve JS, so dart to JS is not a problem Title. It is reported that the next step for flutter is to get through the web development by compiling it into JS. So far, flutter can not only cross the mainstream mobile operating systems IOS and Android, but also get through the mainstream desktop operating systems Windows, MacOS and Linux through browsers and PWA like applications.

Google has developed for more than two years. The latest mobile operating system, fuchsia OS, is intended to replace Android. The basic front-end is written in the framework of flutter. If Fuchsia system is released, then flutter and dart must be the first choice of front-end programming language and framework. But after suffering a lot of programmers, there is something new to learn

There is also the rapid growth of Google’s go language. With its efficiency comparable to C + +, minimal server concurrent programming, efficient server operation efficiency and modern programming features and methods, most companies at home and abroad have applied it to replace some of the previous interfaces and server applications. Docker is the most famous example. The go language has already broken through the 1. X stage and is steadily moving towards the 2.0 stage.

We can clearly see Google’s layout and outlook. Dart mainly focuses on the front end and mobile end, and go mainly focuses on the server end. Different from Microsoft’s C and Apple’s OC and swift, Google seems to have a more comprehensive layout and wider application and influence. To some extent, the wild hope of Google’s unified front and back end development in the Jianghu will be realized. At least, the open-source language and powerful companies relying on the mountains will be better than others.

Now, the benefits of playing flutter are as follows:

1. If we want to run programs on Google’s new system in the future, it must be right to use flutter to write programs. Of course, recent reports show that Fuschia supports art natively, so Android programs should be OK. But I think it’s better to use flutter directly

2. Dart is used for flutter. Learning flutter will enable us to master a new language. Buy one and get one free

3. Flutter naturally supports IOS style controls, called Cupertino, so that we can design one set and run one set of code on two systems

4. The process of learning flutter will change the thinking of app development on the mobile phone. After all, the parent has only one activity. The whole process is the same as that of a game engine. 60 frames per second of drawing

5. Hot reload. It has greatly accelerated our development efficiency. After trying, I will definitely fall in love with it

6. Flutter provides method channel for Android and IOS. In fact, we can only use flutter to develop UI. Other underlying logic can encapsulate the Lib packages of Android and IOS respectively. Then directly RX encapsulates and writes back to method channel. It is also a new development mode

7. Better performance, better compatibility and more fun to develop. This is the life of programmers. But flutter can meet all requirements

How to learn about flutter:

From the current situation and rhythm, this time Google is serious, connecting the past and the future to pave the way for its next generation operating system Fuchsia So, I still suggest that you can start to learn when you are free, and when you are really mature, you will be all right. I don’t know. Do you like flutter? You are welcome to leave a message at the bottom of the article.

Read more

Capital in winterAndroid profile, necessary for interview

Flutter foundation environment construction and demo operation

A complete Android studio to build a flutter tutorial

If you are interested in technology development, you can pay attention to my public address: terminal R & D department, id:codeGoogler