Why Nick ♥ Dart #dartlang

Get Started. It's Free
or sign up with your email address
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. Differentiating Features

2.1. Performance

2.1.1. Classic

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

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

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

2.2. true is the only truthy value

2.2.1. Yah Truth

2.2.2. also NO undefined, ONLY null

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

2.3. Optional Static Types

2.3.1. production mode vs checked mode

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

2.3.2.1. because

2.4. Implicit Interfaces

2.4.1. No more "just in case interfaces"

2.4.1.1. Default Implementations Too

2.4.2. Also has Abstract Classes

2.4.3. Also has Mixins

2.4.4. No primitives

2.5. Function Interface

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

2.6. Tree Shaking

2.6.1. & minifying

2.7. Futures & Streams

2.7.1. Futures == promises

2.7.2. Streams

2.8. Concurrency via Isolates

2.8.1. Separate Memory Heaps Uses Messages

2.8.1.1. web workers in js

2.9. Lexical Scoping & Closures

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

2.10. Useful Error Messages

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

2.10.2. As opposed to seeing this all day long

2.11. Snapshots

2.11.1. Memory snapshot of app startup

2.11.2. or script

2.11.3. or isolate

3. Get Started

3.1. What's Next?

3.1.1. Seriously!

3.2. Go To http://dartlang.org

3.2.1. Well organized site, lots of useful info

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

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

3.4.1. or just auto complete it...

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

3.6. http://try.dartlang.org/

3.6.1. simple web dart runner

3.6.2. this launched day 1 of dart

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

3.7. Next Projects?

3.7.1. Definitely Personal

3.7.2. Siris of the Future?

3.7.3. Garage Projects?

3.7.4. Anything else you can think of?

4. But FIRST... Background

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

4.1.1. What it looks like

4.1.1.1. .

4.2. Open Source since 2011

4.2.1. www.dartlang.org

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

4.3. Ultimate Goal

4.3.1. Enable better apps for the modern web

4.4. Built with 3 Perspectives in Mind

4.4.1. Performance

4.4.1.1. Overcome performance problems that all EcmaScript VMs have

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

4.4.1.2.1. V8 is over half a million lines of code

4.4.1.2.2. Dart is being built with performance as a feature

4.4.2. Developer Usability

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

4.4.2.2. Add structure

4.4.2.2.1. optional types

4.4.2.2.2. generics

4.4.2.2.3. implied interfaces

4.4.2.2.4. for each...

4.4.2.3. Easily recognizable syntax

4.4.2.3.1. Not attempting to force number of spaces per tab

4.4.3. Ability to be tooled

4.4.3.1. Tooling

4.4.3.1.1. Supports large-scale projects

4.4.3.1.2. Enables code-comprehension features

4.4.3.2. BUT does not require tooling

4.4.3.2.1. You can still use vim

4.5. How it relates to Javascript

4.5.1. Dart compiles to js for production builds

4.5.2. Assembly language of the web

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

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

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

4.5.4.1. not pretty, but works

4.6. Google Suggested waiting for version 1.0

4.6.1. no more waits!!

4.6.2. Version 1.0 - Nov 2013

5. Clean Code

5.1. Read Clean Code

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

5.1.1.1. it's addictive

5.2. Javascript can often be not so clean code

5.2.1. wrapper safety

5.2.2. server.js

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

5.3. Dart has clean code as a feature

5.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

5.3.2. Idiomatic Dart Article

5.4. Named Constructors & Automatic Field Intialization

5.4.1. peeeerty

5.5. Functions

5.5.1. Regular

5.5.2. Single Line

5.5.3. Anonymous Still

5.6. Getters & Setters

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

5.7. Optional Args and Defaults

5.7.1. all built in

5.8. Strings

5.8.1. less hideous

5.9. Operator Overload

5.9.1. yahhh bringing back the old

5.10. Cascading operator

5.10.1. no more awkwardly building it into complex apis

5.11. more and more

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