Introduction post

Learning Dart [Part 0]

covers the features and frameworks of Dart

Shrijit_Basak
My Coding Experiments

--

As in computer science, every indexing starts with 0, so why not start this tutorial with the 0th post.

In this world full of programming languages, you might wonder, why Dart?
Why should I learn Dart, when there is a plethora of languages already available like Python, C#, JavaScript, Java etc.

Credit: https://www.cleanpng.com

So let me first motivate you as to why one should learn Dart in this day and age…

TLDR;

If you are already quite motivated or just want to skip to the fun part, then here is a short version for the next set of points:

Dart is an ECMA standardized, cross platform, open source, type safe, object oriented asynchronous programming language whose syntax are similar to those of C# and Java, which can be trans-compiled into JavaScript and which supports JIT and AOT compilation having a rich set of inbuilt libraries.

With so many features also come a lot of frameworks as well. These are a few of them:

Client Web Frameworks: Angular Dart, Futter, MDL, OverReact, etc…
Server Side Frameworks: Jaguar, Angel, Aqueduct, Redstone, etc…
Game Development: Flame, StageXl, DartRocket, Ranger, etc…
Database: Postgres, SqlJockey, PostgresSQL, etc…
Testing: Guinness
Tools: dart2js, js2dart, CrossDart, etc…
IDEs: IntelliJ, Sublime, Vim, Atom, VSCode, DartPad, etc…
And a lot more…..

Pheww…… now that we know what we are about to learn, let’s dive into a bit of learning now.
Do give this Post a Clap if it was able to motivate you to learn more about Dart…

Now the actual way

  • Dart is a cross-platform programming language.
  • It is an open-source and also recognized by ECMA as a standard.
  • It is an object-oriented programming language.
  • It can be trans-compiled into JavaScript using the dart2js compiler to run on web-browsers. That way it targets all platforms, including mobile(using flutter) and web browsers.
  • It can be executed in AOT(Ahead Of Time) mode, where it can be compiled directly into the machine code.
  • It is type-safe i.e. it has compile-time and run-time checks to ensure variables’ type matches the values they are supposed to hold.
  • Code Reuse: It is reported that Dart reuses almost 70% of its code to run in platforms and web browsers using dart2js compiler.
  • Dart also supports JIT(Just In Time) compilation with AOT compilation.
  • Dart is an asynchronous programming language running on a single thread. It uses Isolates like web workers in JavaScript for asynchronous jobs. These isolates don’t share the memory and can communicate with each other using messages which can be serialized and deserialized.
  • Dart comes with a rich set of inbuilt libraries like core, async, math etc.
  • It is very similar to Java and C#, thus it can be adapted very easily and quickly without having a steep learning curve.

Coming to the frameworks that support Dart and make ‘Dart developers’ very powerful are:

Client-Side Frameworks:

  1. AngularDart: Used for building mobile and desktop web applications

2. Flutter: Used to build high-performance cross-platform mobile, desktop, Android, iOS and Web apps.

3. OverReact: library for React UI components

4. VueDart: create Vue web apps using Dart

Server-Side Frameworks

  1. Jaguar: A server-side framework built for speed, simplicity and extensibility

2. Angel: Designed for full-stack development with an emphasis on code-sharing, scalability and a low learning curve.

3. Aqueduct: Fully featured server-side framework with emphasis on ORM, database migration tools and OAuth.

4. Redstone: Server-side metadata-driven micro-framework

5. Start: Sinatra inspired server-side framework for static files, handling dynamic requests and create JSON responses.

6. Shelf: To create easy and compose web servers.

7. Vane: Framework with built-in server runtime environments and middleware systems.

8. Rikulo Stream: To create lightweight web servers with request routing, filtering, template engine and MVC design.

Game Development

  1. Flame: A minimalist flutter game engine.
  2. StageXL: Used to create impressive 2D contents.
  3. DartRocket: HTML5 game framework which uses SageXL rendering engine.
  4. Pixi Dart: A port of pixi.js rendering engine.
  5. Ranger: Centered around HTML5 Canvas and scene graphs.

Database

  1. Postgres: A PostgresSQL driver that uses a binary protocol for efficient and secure query execution.
  2. SQLJockey: MySQL connector.
  3. Dartbase_model: Server-side database object models for simple data manipulation using MySQL/PGSQL without having to write SQL.

4. Dartbase_migration: Serverside database migration for simple version controller database using MySQL/PGSQL without having to write SQL.

Tools

  1. Observatory: tool for profiling and debugging Dart applications
  2. dart2js: compiles Dart code to JavaScript
  3. js2dart: compiles JavaScript code to Dart
  4. Stagehead: A project scaffolding generator, inspired by tools like Web Starter Kit and Yeoman.
  5. Crossdart: cross-reference source code of the packages from Pub
  6. gulp-dart: A gulp plugin for compiling Dart code to JavaScript using dart2js.
  7. json2dart: given a JSON, it generates dart classes to parse and generate JSON with given structure

IDEs

  1. IntelliJ: using a plugin from JetBrains we can use IntelliJ IDEA, PhpStorm, Pycharm and RubyMine
  2. Sublime: using Sublime Text 3 dart package we can use sublime for Dart coding.
  3. Emacs: using Emacs plugin we can transform Emacs to use Dart.
  4. Vim: there is also a Vim plugin for the Vim fans.
  5. Atom: there are tons of plugins to use Dart in Atom.
  6. VSCode: We can use Dart support in VSCode.
  7. DartPad: online lightweight editor.

Now that you have come this far why not learn it a bit here, after all
“Well begun is only half done”

Thanks for reading this post, please do give it a Clap if you felt that you learned something here today and do follow me, for more Dart lessons are coming soon….Till then…“Peace!!”

--

--

Shrijit_Basak
My Coding Experiments

Computer Science enthusiast, gamer, Linux fan(i use arch btw….), foodie.