Lately, I keep hearing about the Dart language all over the Internet, so this weekend I decided to take a quick look at it.
Dart is a programming language developed by Google for building mobile, web, desktop and IoT applications, and it has even been used for Google’s advertising products. Its best-known use today is Flutter, Google’s UI framework that lets you build apps for iOS, Android and more from a single codebase.
If you come from Java, JavaScript or TypeScript, Dart’s syntax will feel familiar. It borrows many ideas from these languages (classes, generics, async/await, and Streams similar in spirit to RxJS) while adding its own improvements. In this post, I will skim through the basics, mainly by comparing Dart with Java.
Dart examples can run in DartPad, an interactive, browser-based tool OR Visual Studio Code with the Dart Code extension.
Dart uses the following tools:
- stagehand - provide templates for creating Dart apps
- pub - package manager for Dart
Install dart on Windows:
You can install the Dart SDK using Chocolatey.
To install the Dart SDK:
C:\> choco install dart-sdk
To upgrade the Dart SDK:
C:\> choco upgrade dart-sdkAnother method is that The SDK can be installed by installing Flutter from https://flutter.dev/docs/get-started/install/windows.
Here is the log from install dart progress using Chocolatey:
Angular Dart:
Where Dart may go:
- Mobile: Flutter will take market share from React Native.
- Web front-end: Flutter for Web and AngularDart will be adopted more and more.
- IoT: Dart could be used to build high-performance IoT servers, though this is still an open question.
- Advertising and marketing: Dart will find more use in advertising and marketing tools.
- Back-end development: Dart is unlikely to overtake Java here. Java has a huge range of mature open-source projects (such as Spring) that cover almost every business need. Dart is mainly used for front-end frameworks like AngularDart and Flutter, and I don’t know yet whether it will grow into a back-end role like Java Spring.
Good news for Java developers
Dart’s syntax is very close to Java’s, so a Java developer can start building Flutter apps right away.
Reference:

0 comments:
Post a Comment