Slide 1

Slide 1 text

ngular 2: quick web start Minko Gechev github.com/mgechev twitter.com/mgechev blog.mgechev.com

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

github.com/mgechev twitter.com/mgechev blog.mgechev.com

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Agenda

Slide 8

Slide 8 text

https://www.flickr.com/photos/jackson22/16706843701 Tooling…

Slide 9

Slide 9 text

Angular 2 is language agnostic

Slide 10

Slide 10 text

Angular 2 with ES5

Slide 11

Slide 11 text

angular2-seed

Slide 12

Slide 12 text

Seed project for Angular 2 apps with statically typed build

Slide 13

Slide 13 text

Seed project for Angular 2 apps with statically typed build

Slide 14

Slide 14 text

Seed project… • Development and production builds • TypeScript transpilation • BrowserSync support • Karma with Jasmine integration • e2e testing with protractor • Test coverage • Follows best practices • ng2lint

Slide 15

Slide 15 text

Seed project… • Development and production builds • TypeScript transpilation • BrowserSync support • Karma with Jasmine integration • e2e testing with protractor • Test coverage • Follows best practices • ng2lint

Slide 16

Slide 16 text

Seed project… • Development and production builds • TypeScript transpilation • BrowserSync support • Karma with Jasmine integration • e2e testing with protractor • Test coverage • Follows best practices • ng2lint

Slide 17

Slide 17 text

Seed project… • Development and production builds • TypeScript transpilation • BrowserSync support • Karma with Jasmine integration • e2e testing with protractor • Test coverage • Follows best practices • ng2lint

Slide 18

Slide 18 text

Seed project… • Development and production builds • TypeScript transpilation • BrowserSync support • Karma with Jasmine integration • e2e testing with protractor • Test coverage • Follows best practices • ng2lint

Slide 19

Slide 19 text

Seed project… • Development and production builds • TypeScript transpilation • BrowserSync support • Karma with Jasmine integration • e2e testing with protractor • Test coverage • Follows best practices • ng2lint

Slide 20

Slide 20 text

Seed project… • Development and production builds • TypeScript transpilation • BrowserSync support • Karma with Jasmine integration • e2e testing with protractor • Test coverage • Follows best practices • ng2lint

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Introducing Best Practices

Slide 24

Slide 24 text

Section agenda • Use common style & best practices • Angular 2 (will) have great IDE support • Use static code analysis for less bugs

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Angular 2 has “runtime-type checking”

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Why not build-time

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

ng2lint

Slide 35

Slide 35 text

“ng2lint is a project which aims to enforce common style and verify correctness of your program”

Slide 36

Slide 36 text

Angular in Web Workers

Slide 37

Slide 37 text

– MDN “Web Workers provide a simple means for web content to run scripts in background threads. The worker thread can perform tasks without interfering with the user interface.”

Slide 38

Slide 38 text

– MDN “Web Workers provide a simple means for web content to run scripts in background threads. The worker thread can perform tasks without interfering with the user interface.”

Slide 39

Slide 39 text

Angular 2 is platform agnostic

Slide 40

Slide 40 text

Angular 2 can run… • In the browser • On the server • In WebWorkers • In native mobile apps

Slide 41

Slide 41 text

Angular 2 can run… • In the browser • On the server • In WebWorkers • In native mobile apps

Slide 42

Slide 42 text

Angular 2 can run… • In the browser • On the server • In WebWorkers • In native mobile apps

Slide 43

Slide 43 text

Angular 2 can run… • In the browser • On the server • In WebWorkers • In native mobile apps

Slide 44

Slide 44 text

Angular 2 can run… • In the browser • On the server • In WebWorkers • In native mobile apps

Slide 45

Slide 45 text

WebWorker UI thread App Change Detection Web Worker renderer … UI Renderer Do whatever you want

Slide 46

Slide 46 text

JSON WebWorker UI thread App Change Detection Web Worker renderer … UI Renderer Do whatever you want

Slide 47

Slide 47 text

…but

Slide 48

Slide 48 text

Can’t touch DOM

Slide 49

Slide 49 text

What about? document.body.style .backgroundImage = 'url(background.png)';

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

…at least…? document.querySelectorAll('.foo');

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

WebWorkers recap • Angular is platform agnostic • Running apps in background • WebWorkers can’t touch the DOM

Slide 54

Slide 54 text

angular/offline

Slide 55

Slide 55 text

angular/offline: • Offline access to static content • Notifications for new versions • Efficient download of deltas • Support off push notifications

Slide 56

Slide 56 text

angular/offline: • Offline access to static content • Notifications for new versions • Efficient download of deltas • Support off push notifications

Slide 57

Slide 57 text

angular/offline: • Offline access to static content • Notifications for new versions • Efficient download of deltas • Support off push notifications

Slide 58

Slide 58 text

angular/offline: • Offline access to static content • Notifications for new versions • Efficient download of deltas • Support off push notifications

Slide 59

Slide 59 text

angular/offline: • Offline access to static content • Notifications for new versions • Efficient download of deltas • Support of push notifications

Slide 60

Slide 60 text

angular/offline: • Offline access to static content • Notifications for new versions • Efficient download of deltas • Support of push notifications

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

– MDN “Service workers essentially act as proxy servers that sit between web applications, and the browser and network (when available)....”

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

– MDN “HTML5 provides an application caching mechanism that lets web-based applications run offline. Developers can use the Application Cache...”

Slide 65

Slide 65 text

AppCache Service Workers AppCache Service Workers = ~91.8%

Slide 66

Slide 66 text

In progress integration with angular2-seed

Slide 67

Slide 67 text

Alright…but when?

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

Soon…

Slide 70

Slide 70 text

STANG2 50% off

Slide 71

Slide 71 text

Use with us

Slide 72

Slide 72 text

Thank you! github.com/mgechev twitter.com/mgechev blog.mgechev.com