7 Comments

Summary:

Google unveiled its effort to create a programming language solely for building web apps. Much like there’s a shift in computer hardware to take advantage of a more connected and mobile world, Google is attempting to push a concurrent shift in software.

Darts

DartsGoogle today unveiled its effort to create a programming language solely for building web apps. Much like there’s a shift in computer hardware to take advantage of a more connected and mobile world, Google is attempting to push a concurrent shift in software.

Dart: What it is and what it isn’t

Google started building Dart last year under the name Dash, with the goal of making it easier to program web applications that run on servers inside a data center. The resulting language unveiled Monday is suggested to become a JavaScript killer, although we’ll have to see if it can take over the king of scripting languages and the lingua franca of bridging the static and dynamic programming divide on the web.

Google states its goals for Dart fairly clearly. The idea is to build a scripting language that can be built easily and quickly, but is also powerful enough to support a webscale applications and be maintained easily by more than just the author of the original code. The idea is that user-friendly languages like JavaScript allows a hobbyist-level developer to build out something quickly and easily, but the way the developer does writes the code can create hidden costs down the line as the application scales and requires more code and more people.

JavaScript requires a programmer to deliver a single chunk of unified code, whereas other languages such as Java and C++ allow for more modularity. Thanks to object-oriented programming, a programmer working with Java can reuse modules or previously written code to build a program. Other people can add to it and easily see how it was made. So where Java and other object-oriented programming are akin to building something with LEGO, JavaScript and other scripting languages are more like using paper-mache. In one, you can see what it is and how it was built in order to maintain or replicate it. In the other, you see the result but figuring out the underlying structure is almost impossible.

Fast is beautiful

Dart hopes to offer the ease of JavaScript coding with the modularity of object-oriented programming languages by using snapshots. In a post over at CNet, based on an interview with Lars Bak, the project leader for Dart, Bak explains a concept called snapshotting:

Google is evaluating the best way to integrate Dart directly into its Chrome browser, something Bak is keen on. One reason: it will enable a “snapshotting” technology that dramatically improves a Web app’s startup time. Snapshotting involves taking an application and “serializing” it into a single block of data.

In one test of snapshotting, a 55,000-line Dart program loaded in 60 milliseconds compared to 640 milliseconds without it, Bak said. A conventional JavaScript program would load in comparable time as Dart without snapshotting, he said. “I can see a lot of optimizations that’ll be applicable to Dart” when it’s integrated directly into a browser, he added.

Snapshots may also be the first hit of the Dart drug that gets developers addicted, if it can speed up load times like Bak says. So if Google integrates the Dart framework into its Chrome browser, that means that folks using Dart to build their web pages will see blazing fast load times while other sites wait for their JavaScript to load. Google still apparently plans to keep pushing JavaScript development in case Dart doesn’t catch developers’ eyes, but it’s clearly hoping it can continue pushing faster web pages for the modern computing era in a way that developers will latch onto. Axel Rauschmayer offers an in-depth post on why developers and browser makers might want to duck and avoid Dart.

But wait, there’s more!

Another stated goal of Dart is to build a framework that allows developer to code both the front end and the back in the same way. A new crop of languages and frameworks are being built, such as Node.js that allow this homogenous programming, because it makes life easier on developers., which combined with ease of building and maintaining code, and faster web sites, is just another way Google wants to entice developers into giving Dart a try.

Google is making the tools available via open source, which does show how committed Google is to pushing this out to the rest of the world. Google understands that any effort to rethink the underlying programming tools for web applications needs broad adoption from those building apps in their spare time to those hired to code for the Fortune 500. It also helps Google get in on the ground floor and potentially dominate a standards effort around what it hopes will become a standard for developing web-based applications.

So we’ll see Dart can deliver on the need for speed and the desire for a scripting language with the modularity of an object-oriented language. If it can, it may indeed be a JavaScript killer. Otherwise, it’s just another Google attempt to make the web faster by rethinking the way things are done.

Additional reporting by Cyndy Aleo.

  1. There already exist open source languages that allow to build modern web apps. Look at http://opalang.org for instance.

    Share
  2. Henry Ford running the Tesla factory would be a _good_ thing. Have you seen the amount of one-off, hand manufacturing that goes into one of their motors? If they applied some standardization to their parts, and went with inexpensive, pre-built components, they might have a viable long-term business model, instead of one that is dependent upon heavy subsidization to produce a small number of really expensive cars.

    Share
  3. Michael Richardson Monday, October 10, 2011

    The key phrase above is “in case Dart doesn’t catch developers’ eyes”. Not just developers, but browser vendors other than Google: Apple and Microsoft. There’s not enough in Dart to pole-vault it over the high bar that’s being set by JS implementations (all browsers!), developer investments (libraries like jQuery), and so forth. It’s like, yes, you can improve somebody’s right hand — but will they be willing to amputate for it? As a precient developer on Twitter said today, it’s a Segway.

    Share
  4. It’s called DART, and Google Europe is located around DART (Dublin Area Rapid Transport System). Waaay too easy to get confused!!!

    Share
  5. “JavaScript requires a programmer to deliver a single chunk of unified code, whereas other languages such as Java and C++ allow for more modularity”

    Is this a joke?

    Share
    1. Sure seems like it. I don’t think the author has any knowledge directly related to JavaScript.

      Share
      1. Which author? Node.js was developed specifically for server-side JavaScript environments, because you sure aren’t going to build a scalable web app by running JavaScript in the browser. It makes it look more like a compliled OOP language, no?

        Please keep in mind that the writers aren’t just writing for a coder audience, and have to make this understandable for a wide audience, and a good portion of it includes business managers with no coding experience whatsoever. Non-compiled code that has to be interpreted by the browser vs. compiled code that can rely upon pre-installed libraries would be described to a non-programmer as?

        You can’t describe inheritance patterns in a scripting language vs pre-installed class files in a 500-or-so-word article so that everyone can understand it.

        Hope that explains it.

        Share

Comments have been disabled for this post