Why Nick ♥ Dart #dartlang

Get Started. It's Free
or sign up with your email address
Rocket clouds
Why Nick ♥ Dart #dartlang by Mind Map: Why Nick ♥ Dart #dartlang

1. Batteries Included Platform

1.1. Enhancing productivity

1.1.1. Fresher approach learning from all the tools used to help scale js

1.2. Dart Editor

1.2.1. Based off eclipse

1.2.2. There is also an IntelliJ/WebStorm Plugin

1.2.2.1. Created by IntelliJ

1.2.2.1.1. Created in 2011

1.2.2.1.2. many contributors

1.2.2.1.3. 10+ from JetBrains

1.2.2.1.4. at least a few from google, probably more

1.2.2.2. Steady updates every month since Aug 2013

1.3. dart:unittest

1.3.1. Testing came with launch

1.3.1.1. wasn't added later

1.3.2. mocking

1.3.3. assertion

1.3.3.1. inspired from hamcrest

1.4. Package Manager - PUB

1.4.1. Because you play darts... in a pub

1.4.2. Is the Maven/NPM/Bower built in

1.4.2.1. http://pub.dartlang.org

1.4.3. uses pubspec.yaml file instead of pom.xml package.json etc

1.4.3.1. yaml = yet another markup language

1.4.3.1.1. AngularDart Pubspec Example

1.4.4. over 1k published libraries

1.4.4.1. over 800 updated & published in past year

1.4.4.2. over 500 updated & published in past 3 months

1.5. VMs

1.5.1. Client

1.5.1.1. Dartium

1.5.1.1.1. DartVM built into Chrome

1.5.1.1.2. Supports fast change and refresh development cycle

1.5.2. Server

1.5.2.1. A lot lot lot like nodejs

1.5.2.2. also can just run dart scripts

1.6. JS Compiler

1.6.1. Core part of dart

1.6.1.1. .

1.6.2. Was not originally written in dart... now it is

1.6.3. tree shaking

1.6.4. Can call it manually with many different options

1.6.5. has source mapping so it can map back to the dart code for debugging in other browsers or chrome proper

2. But FIRST... Background

2.1. "Dart is a new platform for scalable web app engineering"

2.1.1. What it looks like

2.1.1.1. .

2.2. Open Source since 2011

2.2.1. www.dartlang.org

2.2.2. https://code.google.com/p/dart/wiki/Contributing

2.3. Ultimate Goal

2.3.1. Enable better apps for the modern web

2.4. Built with 3 Perspectives in Mind

2.4.1. Performance

2.4.1.1. Overcome performance problems that all EcmaScript VMs have

2.4.1.2. Devs wrote Chrome's V8 (Kasper Lund & Lars Bak) are writing Dart

2.4.1.2.1. V8 is over half a million lines of code

2.4.1.2.2. Dart is being built with performance as a feature

2.4.2. Developer Usability

2.4.2.1. Stay dynamic - easy to get started, no compile nature of Javascript

2.4.2.2. Add structure

2.4.2.2.1. optional types

2.4.2.2.2. generics

2.4.2.2.3. implied interfaces

2.4.2.2.4. for each...

2.4.2.3. Easily recognizable syntax

2.4.2.3.1. Not attempting to force number of spaces per tab

2.4.3. Ability to be tooled

2.4.3.1. Tooling

2.4.3.1.1. Supports large-scale projects

2.4.3.1.2. Enables code-comprehension features

2.4.3.2. BUT does not require tooling

2.4.3.2.1. You can still use vim

2.5. How it relates to Javascript

2.5.1. Dart compiles to js for production builds

2.5.2. Assembly language of the web

2.5.2.1. one of the widest spread technologies across devices and platforms

2.5.3. It's an 'and' world, not an 'or' world

2.5.4. There is a js Interop library to talk to js libs

2.5.4.1. not pretty, but works

2.6. Google Suggested waiting for version 1.0

2.6.1. no more waits!!

2.6.2. Version 1.0 - Nov 2013

3. Clean Code

3.1. Read Clean Code

3.1.1. seriously... don't be that guy

3.1.1.1. it's addictive

3.2. Javascript can often be not so clean code

3.2.1. wrapper safety

3.2.2. server.js

3.2.3. Any language can be written unclean though...

3.3. Dart has clean code as a feature

3.3.1. They chose recognizable syntax and clean code syntax at times so that it would be easier to work with and lower the barrier to entry

3.3.2. Idiomatic Dart Article

3.4. Named Constructors & Automatic Field Intialization

3.4.1. peeeerty

3.5. Functions

3.5.1. Regular

3.5.2. Single Line

3.5.3. Anonymous Still

3.6. Getters & Setters

3.6.1. just in time decisions var right = rectangle.right; left.rectangle = 3;

3.7. Optional Args and Defaults

3.7.1. all built in

3.8. Strings

3.8.1. less hideous

3.9. Operator Overload

3.9.1. yahhh bringing back the old

3.10. Cascading operator

3.10.1. no more awkwardly building it into complex apis

3.11. more and more

3.11.1. go look at dart code, it's pretty awesome

4. Differentiating Features

4.1. Performance

4.1.1. Classic

4.1.2. Continuous Integration of Performance Metrics https://www.dartlang.org/performance/

4.1.3. Dart can be faster because at compile time dart can know what is intended vs javascript guess optimizations

4.1.4. Dart2JS has many times been faster than the equivalent Javascript code

4.2. true is the only truthy value

4.2.1. Yah Truth

4.2.2. also NO undefined, ONLY null

4.2.3. also no type coercion so we can use == again

4.3. Optional Static Types

4.3.1. production mode vs checked mode

4.3.2. compiler warnings in checked mode but still will run to the best of it's ability ignoring types

4.3.2.1. because

4.4. Implicit Interfaces

4.4.1. No more "just in case interfaces"

4.4.1.1. Default Implementations Too

4.4.2. Also has Abstract Classes

4.4.3. Also has Mixins

4.4.4. No primitives

4.5. Function Interface

4.5.1. We want functions to be first class ... then let them act like it =)

4.6. Tree Shaking

4.6.1. & minifying

4.7. Futures & Streams

4.7.1. Futures == promises

4.7.2. Streams

4.8. Concurrency via Isolates

4.8.1. Separate Memory Heaps Uses Messages

4.8.1.1. web workers in js

4.9. Lexical Scoping & Closures

4.9.1. And has LEXICAL 'this' no more _bindAll(this)

4.10. Useful Error Messages

4.10.1. Many bug reports simply to have error messages say what the stack overflow answer says

4.10.2. As opposed to seeing this all day long

4.11. Snapshots

4.11.1. Memory snapshot of app startup

4.11.2. or script

4.11.3. or isolate

5. Get Started

5.1. What's Next?

5.1.1. Seriously!

5.2. Go To http://dartlang.org

5.2.1. Well organized site, lots of useful info

5.3. Find libs at http://pub.dartlang.org

5.4. Core APIs at http://api.dartlang.org

5.4.1. or just auto complete it...

5.5. Try Angular Dart https://github.com/angular/angular.dart

5.6. http://try.dartlang.org/

5.6.1. simple web dart runner

5.6.2. this launched day 1 of dart

5.6.3. has had some updates but hasn't gotten a ton of love

5.7. Next Projects?

5.7.1. Definitely Personal

5.7.2. Siris of the Future?

5.7.3. Garage Projects?

5.7.4. Anything else you can think of?