Mobile // Mobile Applications
News
10/10/2011
01:54 PM
Connect Directly
LinkedIn
Twitter
Google+
RSS
E-Mail
50%
50%

Google Launches Dart Programming Language

The JavaScript alternative is better suited for creating large Web applications, say Google engineers.

Office 365 Vs. Google Apps: Top 10 Enterprise Concerns
Office 365 Vs. Google Apps: Top 10 Enterprise Concerns
(click image for larger view and forslideshow)
Google on Monday introduced a preview version of Dart, its new programming language for Web applications. The introduction was widely expected, not only because the announcement was listed on the GOTO developer conference schedule, but because a Google engineer described the language and its reason for being in a message sent to a developer mailing list late last year.

"The goal of the Dash [Dart's former name] effort is ultimately to replace JavaScript as the lingua franca of Web development on the open Web platform," said Google engineer Mark S. Miller in his post last year.

Lars Bak, a Google engineer who helped develop Chrome's V8 JavaScript engine and one of the creators of Dart, said in a phone interview that Google works regularly on large Web applications and that the company's engineers feel they need a new programming language to describe large, complex Web applications.

Whereas Miller described Dart as an eventual replacement for JavaScript, Bak offered a more diplomatic assessment. "Program languages have a lot to do with taste," he said. "There will always be people who prefer JavaScript."

But Dart offers several advantages. It allows programmers to write "untyped" code--where data types aren't specified as a string or number, for example--that can be turned into "typed" code later. Writing untyped code is generally faster at the outset and, at later stages of development, having "typed" data in a program aids with debugging and makes code more structured. This is particularly beneficial when developing largescale applications.

[Google recently introduced a database service called Cloud SQL. Find out more.]

Bak also says that Dart should perform better than JavaScript in certain situations. JavaScript, he said, has an Achilles' heel in that it can slow down the launch of an application. This is particularly noticeable on mobile devices, where code has to be loaded over what may be a relatively slow network connection.

"In Dart, we have a way to bundle the app into faster form called 'snapshotting,'" he said, noting that Dart apps prepared this way load about 10 times faster than conventional JavaScript code. "Over time, we think we can make Dart run faster than Javascript."

Dart also offers a structured way to use code libraries that isn't available in JavaScript. In JavaScript, he said, it's possible that a library can be altered while the app is running, leading to unpredictable results or errors. That's not possible in Dart, he said.

"If you develop two independent components using same library, they can use that library without the other component destroying the library," he said.

Dart code can be run either by compiling it into JavaScript or using a virtual machine. Bak says Google is considering how to build the Dart virtual machine into Chrome and hopes that other browser makers will choose to do so as well.

Google has made Dart available as an open source project at dartlang.org.

Comment  | 
Print  | 
More Insights
Building A Mobile Business Mindset
Building A Mobile Business Mindset
Among 688 respondents, 46% have deployed mobile apps, with an additional 24% planning to in the next year. Soon all apps will look like mobile apps and it's past time for those with no plans to get cracking.
Register for InformationWeek Newsletters
White Papers
Current Issue
InformationWeek Tech Digest - July 22, 2014
Sophisticated attacks demand real-time risk management and continuous monitoring. Here's how federal agencies are meeting that challenge.
Flash Poll
Video
Slideshows
Twitter Feed
InformationWeek Radio
Archived InformationWeek Radio
A UBM Tech Radio episode on the changing economics of Flash storage used in data tiering -- sponsored by Dell.
Live Streaming Video
Everything You've Been Told About Mobility Is Wrong
Attend this video symposium with Sean Wisdom, Global Director of Mobility Solutions, and learn about how you can harness powerful new products to mobilize your business potential.