Pages

Sunday 12 April 2015

Coding in Dart

The Dart programming language was introduced around October 2011. Last year in July 2014 I downloaded the stable Dart SDK version 1.8.3 to experiment with this relatively new language. From the onset, let me list the key objective of Dart as espoused by Google:
  • Dart is a structured language with optional typed capability.
  • Dart is targeted at both client and server side development.
  • Dart is an alternative to JavaScript coding.
I have successfully developed a couple web applications where the browser side is Dart and the server side is PHP. I have tested several features such as Json, MySQL and an Http server. The image below (I could not figure out how to insert formatted text) is a screenshot of the entire code for sending an email using my Google credentials. It works flawlessly, though I still have to test send an email with an attachment or two:


Dart Editor



You may have recognised the similarity of the Dart editor to Eclipse, particularly if you have used Google's SDK editor for native Android development.

In terms of serve side development, Dart's inherent asynchronous feature can lead to some unexpected results. A good grasp of the "Futures" feature will go a long way in writing code that meets your expectation in the sequence of event that should result in predictable output.

Google for dartlang and explore the suitability of Dart in your new projects - even if it for experimental purposes only.

No comments:

Post a Comment