+4 votes
219 views
in Web development by (242k points)
reopened
Google Dart: An Introduction to the Dart Language

1 Answer

+5 votes
by (1.6m points)
edited
 
Best answer

What is Dart programming?
How is Google Dart structured?
What is Dart used for?
What are Dart's strengths and weaknesses?
How is Dart different from other programming languages?
Advantage
Drawbacks

image

Google Dart: An Introduction to the Dart Language

Programming languages ​​abound, and the relatively new Dart language is one of them. If you compare the different programming languages ​​on the internet, the basic programming paradigms are generally very similar. Only by looking closely will the differences be revealed..

Nowadays, the programming languages ​​that are developed are usually dedicated to the creation of mobile applications for smartphones or tablets. To do this, the language used must promote a good user experience with the least amount of syntax possible and, at the same time, pay attention to the available memory of the device. Next, you will discover what role the Google Dart language plays in this and what it implies.

Index
  1. What is Dart programming?
  2. How is Google Dart structured?
  3. What is Dart used for?
  4. What are Dart's strengths and weaknesses?
    1. Advantage
    2. Drawbacks
  5. How is Dart different from other programming languages?

What is Dart programming?

The Dart programming language was developed primarily by Google. Dart is an Ecma standard, the European organization for the standardization of computer and communication systems and electronic products. Dart programming is an interesting alternative to JavaScript in today's web browsers. According to the Dart developers, it is no longer possible to fix the shortcomings of JavaScript through language development..

Google's Dart language began development in 2010 and was introduced a year later. As browsers could not, and cannot, work with this language in a natural way, and JavaScript can run in all current browsers, there is the Dart2js compiler , that is,? Dart for JavaScript ?. The Dart language is similar to the already established object-oriented programming languages , including Swift, C # or Java, which are subordinate to certain programming paradigms. The rules for combining defined characters, that is, the syntax , are similar to the C language. This similarity greatly facilitates learning, so that it is possible to get started without having to face major language problems.

How is Google Dart structured?

The Dart language has variables, operators, conditional statements, loops, functions, classes, objects, and lists. In addition, it offers inheritance and generic programming, important concepts for an object-oriented programming language, nothing new for a skilled programmer. If you want to try this language for the first time, the open source platform DartPad is available for free, where you can start programming with Dart and also see some examples in the form of a drop-down menu..

Any program written in Dart begins with the function? Main ?.

  void main() { }  

Example of defining a variable and executing a conditional statement:

  void main() { var animal = 'horse'; if (animal == 'cat' || animal == 'dog') { print('This animal is a pet.'); } else if (animal == 'elephant') { print('That\?s a huge animal.'); } else { print('This animal is not a pet.'); } }  

Through DartPad, the following output is generated in this console:

image
A simple example to demonstrate programming with the Dart language

In the variable? Animal? ( var animal ), substitute? horse? by? cat ?,? dog? or? elephant? and observe the changes in the result in the console to the right. In our Dart tutorial, we introduce you to this language in detail.

What is Dart used for?

Google Dart is primarily focused on programming Internet-enabled devices , that is, smartphones, tablets and computers, but also servers. Until recently, the idea of ​​novice programmers developing their own mobile or web applications was somewhat unrealistic. The Dart language has the goal of simplifying the programming of such applications. Flutter, Google's own software development kit, is programmed with Dart, as is the popular Google Ads advertising tool. Other examples are the websites of the New York Times newspaper or the Groupon service. The aforementioned DartPad offers the comfortable possibility of approaching the programming language with the trial and error method, and thus acquire basic knowledge.

What are Dart's strengths and weaknesses?

Dart stands out for its list of advantages, but it also has some drawbacks:

Advantage

Dart is an open source language and, therefore, free to access for anyone. Behind Dart programming is the giant Google, offering long-term prospects for language development. Due to its syntax, this language is easy for programmers to learn because developers have simplified many complicated features from other languages ​​and combined them intelligently. Those who already know the C # language will soon become familiar with Dart. The programming language has been developed for the web and through direct (and very fast) translation to JavaScript, Dart works on all current desktop and mobile browsers. For development tasks, a simple text editor is sufficient , although this requires a more in-depth knowledge of the language. Lastly, Dart from Google makes it easier to work with special editors such as Android Studio (Google) or Visual Studio Code (Microsoft).

Drawbacks

The Dart programming language is relatively new, which implies a still fairly small support community and a lower availability of learning materials than JavaScript. However, it is expected that it will grow and improve in the short term. Although the initial installation of an editor on a computer and its technical details are well documented, it is also full of obstacles. Likewise, many critics negatively judge the existence of a new language on the market rather than the refinement of existing ones.

How is Dart different from other programming languages?

A big difference compared to other programming languages ​​is that Google Dart is easier to read , because its syntax is close to human language. There are fewer commands , but more possibilities . The names for the variables can be freely chosen, thus rendering any own code intelligible, which also avoids many additional comments. It is possible to use blank characters, tabs and newlines at will, which allows programmers to structure the code well, so that it is ultimately ignored by the compiler. However, there are a few exceptions, such as keywords and names of variables and functions, that is, all the definitions established within the Dart language. These include, for example,? If ?,? Else ?,? String? or? void ?. Finally, it is case-sensitive, leaving room for the designations.

In 2019, the Stack Overflow development platform determined in an analysis of the most popular programming languages that Dart, with 66.3%, is just behind JavaScript (66.8%).


...