UNIT-3 Working With DART
UNIT-3 Working With DART
In other words, Dart is a programming language designed for client development, such as
for the web and mobile apps. It is developed by Google and can also be used to build server
and desktop applications.
Dart is an object-oriented, class-based, garbage-collected language with C-
style syntax. Dart can compile to either native code or JavaScript. It supports interfaces,
mixins, abstract classes, reified generics, and type inference.
Platform Independent
Dart supports all primary operating systems such as Windows, Linux, Macintosh, etc.
The Dart has its own Virtual Machine which known as Dart VM, that allows us to run the
Dart code in every operating system.
Object-Oriented
Dart is an object-oriented programming language and supports all oops concepts such as
classes, inheritance, interfaces and optional typing features. It also supports advance
concepts like mixin, abstract, classes, reified generic, and robust type system.
Concurrency
Extensive Libraries
Dart consists of many useful inbuilt libraries including SDK (Software Development
Kit), core, math, async, math, convert, html, IO, etc. It also provides the facility to
organize the Dart code into libraries with proper namespacing. It can reuse by the import
statement.
Easy to learn
As we discussed in the previous section, learning the Dart is not the Hercules task as we
know that Dart's syntax is similar to Java, C#, JavaScript, kotlin, etc. if you know any of
these languages then you can learn easily the Dart.
Flexible Compilation
Dart provides the flexibility to compile the code and fast as well. It supports two types
of compilation processes, AOT (Ahead of Time) and JIT (Just-in-Time). The Dart code
is transmitted in the other language that can run in the modern web-brewers.
The Dart is the type safe language, which means it uses both static type checking and
runtime checks to confirm that a variable's value always matches the variable's static
type, sometimes it known as the sound typing.
Although types are required, type annotations are optional because of type interference.
This makes it code more readable. The other advantage to being type-safe language is,
when we change the part of code, the system warns us about that modification that we
have modified earlier.
Objects
The Dart treats everything as an object. The value which assigns to the variable is an
object. The functions, numbers, and strings are also an object in Dart. All objects inherit
from Object class.
Browser Support
The Dart supports all modern web-browser. It comes with the dart2js compiler that
converts the Dart code into optimized JavaScript code that is suitable for all type of web-
browser.
Community
Dart has a large community across the world. So if you face problem while coding then
it is easy to find help. The dedicated developers' team is working towards enhancing its
functionality.
Here we have discussed essential features of the Dart language. We will more concepts
of Dart language in upcoming tutorials.
Step -1: Go to the browser and type the following link to download the SDK.
http://www.gekorm.com/dart-windows/
Step - 2: Run the Dart installer (It is the .exe file that we downloaded in the previous
step) and click on the Next button.