Tuesday, August 10, 2021

What is Dart Programming language? how to use Dart? Example

Google Dart: Structured Web Programming language 

Google has launched its much-awaited mysterious DART web programming language. Ahh, another programming language…, why does google launched a new language Google DART? What I read from the web is that Google is trying to replace JavaScript as the main web scripting language. Over the years from Netscape Era JavaScript has evolved, formed a large based of Developers and has existing codes, framework, and utilities, so I am not sure how far Google DART can go but this is a serious attempt to replace JavaScript much in the line of Chrome which was launched to replace Internet Explorer and What we see now is they are living happily with their own market share though Chrome is growing and snatching market share from other browsers.

Now let’s get back to Google Dart, according to a leaked Memo, Google perceives that Security Problems of JavaScript cannot be solved by modifying or evolving language and it has tried to solve that on Google Dart: A structured web programming language in its own way.




Example of Google Dart Code

Let's see an example Hello World program in Google Dart, I bet you will see and understand it in one second if you wrote code in Java or C#.


  main(){
  print("Hello World from Google Dart");
  print("My Name is Google Dart and I am going to replace JavaScript");
  }




Nothing fancy simple and familiar syntax and that's what Google reiterates as one of the design goals.  You can execute Dart Code in two ways either in native Dart Virtual Machine; Google is planning Dart support in Chrome and pushes other vendors to do the same. 

There is also Flutter which is making Dart more and more popular for mobile and web development. If you want to learn Flutter with Dart check these best Flutter and Dart courses from Udemy and other websites.  



The key features of Google Dart Programming languages

Familiar Syntax: if you look at Google Dart code you will easily be able to understand what's going on because its syntax is quite similar to Java, Which is an undoubted world famous programming language. It is also similar to C# on the same line.

High Performance: Dart is promising high performance from a web browser to handheld devices to Server Side Execution.

Runs in Virtual Machine: Similar to Java Google Dart also run on Virtual Machine.
Google Dart is semi typed language where you can switch from typed to untyped based on your need.

Open Source: Google Dart is an open-source project and it comes with a set of tools for compiling and executing Dart Code. You can check dartlang.org for further details.
 

How Google Dart will get Popular

Google is doing its hard work to get Dart accepted by web developers and the community and arranging support, tools, and execution environment for Google Dart.

1. Google will provide support of Dart in Google Chrome by integrating native virtual Machines and it will encourage Microsoft and Mozilla to do the same.

2. Google will provide a Cross Compiler which will convert Dart to ECMAScript 3 so that it can run on NonDart Browser. This will be the major step in getting Dart Virtual Machine integrated on all popular browsers might take some time.
 
 

What is positive for Google Dart

Though Google Dart is a new programming language and anything new takes it time to get adopted and supported by the community and that's the most difficult phase for language. Google Dart is not an exception but there are some positive facts that suggest that it can go a long way:

Technologically advanced: Dart is technologically advanced than JavaScript and since it aims to fix security and other problems of JavaScript it will definitely have an appeal.

Google: Since language is developed and launched by Google, expect future support, marketing, and strong backup from Google.

Familiar Syntax: Google Dart doesn't reinvent the wheel at least on language syntax it's quite familiar to Java and C# which gives it easy access to a large community of Java and C# web developers.

Google Dart Cross Compiler: Cross compiler will make Dart running on browsers that don't have native Google Dart Virtual Machine if google gets it right this would be the biggest point and can provide language an initial thrust.

High Performance: Google Dart Promises high performance from a web browser, webserver to handheld devices
  
  
If you want to know more about Google Dart I suggest reading References

10 comments :

Sandeep said...

Good post covering all aspects of Dart language.
JSON cheatsheet

Anonymous said...

Why can't you have one single syntax and multiple virtual machines for different platforms?

PL-Web
PL-Console
PL-Enterprise
PL-Science
PL-StandAlone

PL stands for Programming Language

Anonymous said...

I am new to this so i had this question, What is the difference between the new Google DART and GWT(which i suppose is used for web development).
Will it replace GWT also?

Carlos Gouveia said...

is it possible to make mysql queries? how?

Javin @ String to Integer Java said...

@Anonymous, I am not very familiar with GWT but it looks Google Dart is more on JavaScript side and act as scripting language with browser support.

Javin @ mysql command tutorial said...

@Carlos , Sorry I didn't understand your question, are you looking to generate mysql queries from google dart ?

Anonymous said...

Because it was developed by google which had a good impact on everyone ., DART definately get success.

Unknown said...

www.DartExperience.com An independent view on Google Dart

Anonymous said...

what is the latest update on google dart programming language is it still up and running , is there any major development like Eclipse is going to support google dart ?

Unknown said...

From what I understand, Dart doesn't want to be dependent only on an IDE, but also wants to have the IDE option; ie. I've seen .JSON files that were human-readable and others that weren't. I'm assuming that both file styles used the same simple formatting rules,with the only diff. being that the readable ones are created by a simple text editor and the other generated by some type of IDE. The presumption is that the compiled content would be assured of usability and the handmade could be experimental or presumed unstable simply by glancing at either's raw data with a cat/type console/commandline. Just a hunch.

Post a Comment