|Google's Dart Reborn As Cross Platform App Language|
|Written by Mike James|
|Wednesday, 28 February 2018|
The real question to ask is why is Google bothering?
In 2015 the Dart team announced that any plans to include it in a future version of Chrome had been abandoned and instead it would concentrate on creating a better compiler. This seemed to be the end of the story. or at least the beginning of the end.
Now in 2018 we have the announcement of the beta of Dart 2 and this brings us back to the initial question of why bother?
The future for Dart as a web development language looks not much better with Dart 2 than with earlier versions, but that doesn't seem to be what it is all about. Instead it seems that Dart 2 has a chance in the mobile app world. Flutter, which is also now in beta, uses Dart 2 as its language and it can create apps for iOS and Android.
The idea is you write your program in Dart using the Flutter UI and it will just work on Android or iOS. Notice that you aren't using native UI components. There is a set of basic widgets, a set styled for Android and a set styled for iOS. Widgets are the only UI component and a widget can define:
So how does this all work?
The simple answer is that there is a C++ engine that takes your Dart code and runs it under either Android or iOS. The key is Skia, which is Google's C++ graphics system that is used in Chrome and other Google apps to allow Chrome to run on a range of operating systems. Skia provides a uniform graphics API which isolates the app from the differences in the actual graphics API the app runs under. Skia is also open source. The C++ runtime also gives the app access to the underlying hardware facilities in a uniform way.
So what does Flutter give you over the systems like Cordova?
There are many possible advantages. The first is that Skia is a general purpose graphics engine and the Flutter widget library is likely to be more lightweight than HTML. Also notice that there is, currently at least, no markup language associated with Flutter. Everything is done in code - a method I really like, but only with the help of a layout editor that generates said code. At the moment you can use Android Studio, IntelliJ and VS Code, none of which have a layout editor. Of coruse, you will need XCode if you plan to release an iOS app.
One possible explanation for all this is that Google has committed too much of its own internal code to Dart and really needs it to be better used and supported to avoid the fear of its code base becoming written in a legacy language.
Should you use Flutter for app development?
Not until its is well out of beta.
or email your comment to: email@example.com
|Last Updated ( Friday, 02 March 2018 )|