Flutter study notes (2) - Dart Language Introduction

Dart profile:

Dart was born on October 10, 2011, Dart is a "structured web programming" language, though Google Dart is developed computer programming language, but was later found bits ECMA standard, the language for the Web, the server , the field of the development of mobile applications and other things;

There are so many kinds of programming language, why Flutter to choose Dart as a development language? This is because the Dart way to build more in line with the user interface;

Here are some characteristics of the Flutter team valued Dart language:

1.Dart is AOT (Ahead Of Time) compilation, the compiler fast, predictable native code, is almost Flutter Dart can be used to write, which not only Flutter faster, and almost all of the components can be customized;

2.Dart may JIT (Just In Time) compiler, exceptionally fast development cycle, subverting the conventional workflow (including thermal overloading of Flutter);

3.Dart can more easily create smooth animations and transitions to 60fps running, Dart can object allocation and garbage collection in the absence of lock cases, just as JavaScript, Dart avoid preemptive scheduling and shared memory (and therefore not lock required), since the Flutter application is compiled to native code, it is not necessary to establish a bridge between the slow art, it is also much faster startup speed;

Flutter 4.Dart so no separate declarative layout language, or a separate visual interface builder, because Dart declarative programming and easy to read visual layout, the layout of all in one language, together in one place, it is easy to Flutter It provides advanced tools to make layout easier;

Dart important concepts:

1. Everything is an object, whether it is variable, digital, functions, etc. are objects. All objects are instances of classes. All objects are inherited from the built-in Object class, which is similar to the Java language "everything is an object";

2. The program to develop the type of data makes the program a reasonable allocation of memory space and help the compiler syntax checking, however, specify the type is not necessary, Dart language was weak data types;

3.Dart code before parsing operation, and specifies the data type of the compile-time constant, the operating speed can be increased;

4.Dart program have a unified program entrance: main ();

5.Dart not public, protected, and private concept, by a private variable or function characteristic represented underlined;

6.Dart support anync / await asynchronous processing;

7.Dart language commonly used library:

dart: async asynchronous programming support, and provide Future Stream class;

dart: collection of dart: to provide more support for a set of core;

dart: convert between different character encoding types (JSON, UTF-8), decoding support;

dart: core Dart language built-in types, objects, and dart language core function;

dart: html web development library used;

dart: io library file read and write I / O operations associated;

dart: math functions and digital constants, to provide a random number algorithm;

dart: svg vector graphics support events and animation;

Which follows three development libraries using the highest frequency:

dart: core core library, including strings, numbers, collections, errors, dates, URIs etc;

dart: html web development in a number of related DOM libraries;

dart: io I / I / O O library using the command line;

Note: dart: core library is already included in the Dart language initialize library, any other libraries before use need to add import statements. The column used dart: html can use the following commands: import 'dart: html'

 

Guess you like

Origin www.cnblogs.com/upwgh/p/11105420.html