Google's Dart 2.1: X Things to Know

Mar 20, 2019 9:05:00 AM

shutterstock_1119271403Here at AndPlus, we take a targeted approach to everything we do. Thanks to our fine-tuned, Agile-based development process, our clients tell us we consistently hit the bullseye. That’s why, even though we try to keep sharp objects out of our developers’ hands, we’re excited about a relatively new programming language called Dart.

Regular readers of this blog will notice that we’ve reported on numerous new and up-and-coming programming languages over the last couple of years, not to mention myriad frameworks to support them. So you may be wondering: What’s so special about yet another cleverly named programming language?

Dart: A Brief History

Before we can explain our interest in Dart, it helps to know a bit about how it came to be, and where it stands now.

Dart started life as a Google project; the first version appeared in 2011. Among its original motivations was to fill a perceived need to have a general-purpose, cross-platform language for server-side applications, web apps, and mobile apps. The idea was for it to work side-by-side with, and eventually supplant, JavaScript as the standard language of the web.

Things didn’t quite turn out that way; even with all of Google’s considerable influence on the web development ecosystem, JavaScript is quite mature and well established. Few browser developers (in particular, Microsoft and Mozilla) are willing to put in the effort to support an additional, upstart language in their products.

So a few years ago, Google changed tack and positioned Dart as a “compile-to-JavaScript” language—in other words, when Dart code is compiled using Google’s dart2js tool, the result is JavaScript code that runs on any browser.

Why Dart?

“Okay,” you’re thinking, “so what’s the point? Why not just write JavaScript in the first place and eliminate the middleman?”

Recall that Dart was designed as a cross-platform language. The same Dart code can be compiled to JavaScript or, by using Flutter, Google’s cross-platform mobile app software development kit (SDK), it can be compiled to Android or iOS mobile app executables. This flexibility means reduced development effort and complexity.

That’s the main advantage of Dart. Another is that it’s quite similar to other object-oriented languages, such as C++, C#, and Java. For developers familiar with one or more of those languages, Dart presents a gentle learning curve.

Besides all of that, some developers have found that writing Dart code and compiling it to JavaScript shortens the development cycle compared to writing native JavaScript. In addition, in many cases, the compiled JavaScript code runs faster than the equivalent human-written JavaScript code.

Dart: Recent Developments

Early 2018 saw the release of version 2.0 of Dart, which had already transitioned from an in-house Google project into an open-source, community-supported project. Dart 2.0 was a major update, incorporating improvements across the board to make the language more robust and usable.

In the year since the release of Dart 2.0, the Dart community has unleashed two incremental releases, which collectively offer enhancements such as:

  • Automatic integer-to-double conversion
  • Support for mixins (a way to reuse code from one class in multiple class hierarchies)
  • Compile-time type checking
  • Compilation performance improvements
  • Support for set literals, in addition to previously supported maps and lists

Stuff only a developer could love, in other words.

Bottom Line

The main takeaway from all this is that Dart is a real thing, and even if it never achieves its original lofty goal of pushing JavaScript aside as the de facto standard language of Web app development, it still has carved out a solid niche for itself.

Dart is widely used within Google, particularly by its AdWords and AdSense teams, and it is gaining traction outside Google as well. The effort by its open-source development community to implement the major Dart 2.0 reboot and the steady stream of improvements since then show that there is serious interest in the language on the part of the general development community.

Hence our interest at AndPlus in this emerging language. More of our clients are interested in applications that have the flexibility to be efficiently deployed on multiple platforms, perhaps changing focus over time in response to changing market trends. Dart provides this level of flexibility and appears to be here to stay. We are adding Dart to our toolbox and will closely follow its continued development.

Learn More!

Brian Geary

Written by Brian Geary

Brian is a true believer in the Agile process. He often assists the development process by performing the product owner role. In addition to his technical background, he is an experienced account manager with a background in design and marketing.

Lists by Topic

see all

Get in touch

LET’S BUILD SOMETHING AWESOME. TOGETHER.

Clients

 
Arthromeda
Bloomberg
crossref
Honeywell Logo
Medica
NexRev
Onset
Predicata