• Complain

Kathy Walrath - What is Dart?: A new language for building structured web apps

Here you can read online Kathy Walrath - What is Dart?: A new language for building structured web apps full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2012, publisher: OReilly Media, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Kathy Walrath What is Dart?: A new language for building structured web apps
  • Book:
    What is Dart?: A new language for building structured web apps
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2012
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

What is Dart?: A new language for building structured web apps: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "What is Dart?: A new language for building structured web apps" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Get ready to build modern web apps. This concise book covers the Dart language, libraries, and tools that help you develop structured, fast, and maintainable web apps that run in any modern browser. The Dart platform has been designed to scale from simple scripts to complex apps, running on both the client and the server. With this book, you can use Dart to architect and develop HTML5 apps for the modern web. Table of Contents Why Did Google Create Dart? Does the Web Really Need Another Language? Show Me the Code How Can I Play with Dart? How About a Real Editor? Whats New About Dart? Why Does Dart Look so Familiar? What Is in the Dart Platform? Should I Use Dart for My App Today? How Do You Expect People to Use Dart? How Can I Compile to javascript? What Libraries Are Available? Show Me More Code Where Can I Learn More? About the Author Kathy is a technical writer whos worked on docs for Chrome and other developer APIs at Google since 2006. Before that, she worked at Sun, NeXT, and HP. Back when the web was young, she wrote the first doc to help developers write Java applets. She also co-created The Java Tutorial and maintained it for a very long time. Seth is a Developer Advocate with the Chrome team. He is a conference organizer (Aloha on Rails, New Game), author (Expert Spring MVC), helped publish Angry Birds for the web, and is a big fan of HTML5 and the modern web.

Kathy Walrath: author's other books


Who wrote What is Dart?: A new language for building structured web apps? Find out the surname, the name of the author of the book and a list of all author's works by series.

What is Dart?: A new language for building structured web apps — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "What is Dart?: A new language for building structured web apps" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
What is Dart?
Kathy Walrath
Seth Ladd
Editor
Meghan Blanchette

Copyright 2012

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (.

Nutshell Handbook, the Nutshell Handbook logo, and the OReilly logo are registered trademarks of OReilly Media, Inc. What is Dart? and related trade dress are trademarks of OReilly Media, Inc.

Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and OReilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps.

While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

OReilly Media Chapter 1 What is Dart Dart is a new language developed by - photo 1

O'Reilly Media

Chapter 1. What is Dart?

Dart is a new language developed by Google thats getting attention in web app circles. We asked Kathy Walrath and Seth Ladd, members of Googles developer relations team, to explain Darts purpose and its applications.

Writing a web app can be lots of fun, especially at the beginning when you experience instant gratification: code, reload, repeat.

Unfortunately, finishing and maintaining a web app are not so fun. JavaScript is great for small scripts, and it has the performance chops to run large apps. But when a script evolves into a large web app, debugging and modifying that app can be a nightmare, especially when you have a large team.

Enter Dart, an open-source project that aims to enable developers to build more complex, highly performant apps for the modern web. Using the Dart language, you can quickly write prototypes that evolve rapidly, and you also have access to advanced tools, reliable libraries, and good software engineering techniques.

Even though Dart is young, it already has tools such as Dartboard (which lets you write and run Dart code in your browser) and Dart Editor (which lets you create, modify, and run Dart apps). A recently released SDK contains command-line tools such as a Dart-to-JavaScript compiler (which produces JavaScript that you can put in any modern browser) and a Dart Virtual Machine (the VM , which lets you run Dart code on servers). The latest tool to become available is a build of the Chromium browser, nicknamed Dartium , that contains a built-in Dart VM.

( Note: Dart is still changing. This article is correct as of March 2012, but facts might change and links might go bad. For the latest information, see the Dart website.)

Why Did Google Create Dart?

We want you to be able to create great web apps. Great web apps improve the web, and when the web does better, everyone wins.

Engineers at Google have been thinking about web apps for a long time. Weve written a bunch of complex and widely used large-scale web apps (think Gmail, Google+, and Google Docs), so were quite familiar with the challenges of architecting web apps. Weve also written a browser (Chrome) and a JavaScript engine (V8), so weve thought a lot about how to make web apps run faster.

Basically, we created Dart because we think itll help bring more great apps to the web, and we think it should be easier to create more complex web applications.

Does the Web Really Need Another Language?

App developers from all platforms should be able to build for the modern web, but many non-endemic web developers have different expectations and requirements from their language, tools, and development platform than what is available today. We believe there is room for a new platform, one that is not encumbered by 15 years of cruft, that is familiar to developers of different backgrounds, and that is structured to enable the larger, more complex apps that users are demanding.

We dont think JavaScript is going away. In fact, Google is actively working with TC39 to improve JavaScript, and new features are already landing in V8 and Chrome. However, our commitment to improving JavaScript doesnt prevent us from thinking about other solutions. For example, Dart will take advantage of the continued work on JavaScript, because Dart programs compile to JavaScript to run across the entire modern web.

We believe Dart is a compelling and familiar platform that meets the needs of developers from different backgrounds and experiences, including endemic web developers. We believe that Dart brings fresh ideas to web programming, and that innovation in both Dart and JavaScript will help push the web forward for app developers and users.

Show Me the Code

Enough talk, lets see some code. Whether you know JavaScript or Java, Dart code should look familiar. Heres an example of a simple web page in Dart:

hi.dart:

#import('dart:html');main() { document.query('#status').text = 'Hi, Dart';}

hi.html:

...
...

Now lets look at some Dart code that uses functions:

send(msg, to, from, [rate='First Class']) { return '${from} said ${msg} to ${to} via ${rate}';}main() => print(send('hello', 'Seth', 'Bob'));> "Bob said hello to Seth via First Class"

The => syntax used to implement main() is a nice, compact way to implement a function that evaluates and returns a single expression. Without =>, the implementation of the main() method would look like this:

main() { print(send('hello', 'Seth', 'Bob'));}

In the send() method implementation above, rate is an optional parameter with a default value. That method also illustrates string interpolation at work (${var}).

Heres some Dart code thats more object-oriented:

class Point { Point(this.x, this.y); distanceTo(other) { var dx = x - other.x; var dy = y - other.y; return Math.sqrt(dx * dx + dy * dy); } var x, y;}main() { var p = new Point(2, 3); var q = new Point(3, 4); print('distance from p to q = ${p.distanceTo(q)}');}

This code should look pretty familiar if youve ever used a class-based language.

How Can I Play with Dart?

The easiest way to try out Dart is to use Dartboard, a way to execute Dart code interactively in any modern browser. Dartboard is embedded in the Dart site, at www.dartlang.org. You can also use Dartboard by going directly to try.dartlang.org. Heres a picture of what youll see on that site:

Change the code as you like and then click the Run button at the upper left - photo 2

Change the code as you like, and then click the Run button (at the upper left). Youll see the results of your code in a new area below:

The URL at the upper right of the Dartboard is a link to the code you just ran - photo 3

The URL at the upper right of the Dartboard is a link to the code you just ran.

Like most things related to Dart, Dartboard is still changing. For the latest information, see the Dartboard tutorial.

How About a Real Editor?

When you outgrow Dartboard, try Dart Editor. Its a downloadable editor for Windows, Mac, and Linux that lets you write, modify, and run Dart web apps. Dart Editor can run your Dart code via the VM, or it can compile it to JavaScript and launch it in your browser. Heres a picture of what Dart Editor currently looks like:

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «What is Dart?: A new language for building structured web apps»

Look at similar books to What is Dart?: A new language for building structured web apps. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «What is Dart?: A new language for building structured web apps»

Discussion, reviews of the book What is Dart?: A new language for building structured web apps and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.