Slide 1

Slide 1 text

⚠ Serious Warning™ Very dense and technical content ahead. TypeScript code examples included. It probably won't help you with your job. You might want to reconsider going to @mixonic's components talk instead.

Slide 2

Slide 2 text

Godfrey Chan @chancancode

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No idea what this talk is about but it's hilarious @chancancode #EmberConf Luke Melia @lukemelia

Slide 5

Slide 5 text

Did @chancancode deliberately misspell temperature as tempreature? #EmberConf Gaurav Munjal @gaurav9576

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Be ambiguous

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Please back

Slide 18

Slide 18 text

design

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

You're closing

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Templates

Slide 25

Slide 25 text

Ember ❤ HTML+CSS

Slide 26

Slide 26 text

Declarative

Slide 27

Slide 27 text

Pure Functions

Slide 28

Slide 28 text

FRP Programs

Slide 29

Slide 29 text

Yehuda Katz @wycats

Slide 30

Slide 30 text

References

Slide 31

Slide 31 text

interface)Reference){) ))value():)T;) }

Slide 32

Slide 32 text

let)foo)=)1;) let)fooReference:)Reference)=){) ))value()){) ))))return)foo;) ))}) };) fooReference.value();)//)=>)1) foo++;) fooReference.value();)//)=>)2

Slide 33

Slide 33 text

let)foo)=)1;) let)bar)=)2;) let)fooReference:)Reference)=){) ))value()){)return)foo;)}) };) let)barReference:)Reference)=){) ))value()){)return)bar;)}) };) let)fooPlusBarReference:)Reference)=){) ))value()){) ))))return)fooReference.value())+)barReference.value();) ))}) };) fooPlusBarReference.value();)//)=>)3) foo)=)2;) fooPlusBarReference.value();)//)=>)4) bar)=)3;) fooPlusBarReference.value();)//)=>)5)

Slide 34

Slide 34 text

Welcome,){{user.name.first}}!

)

Message)of)the)day:){{motd}}

Slide 35

Slide 35 text

Validators

Slide 36

Slide 36 text

{{uppercase)(concat)book.title)":)")book.subtitle)}}

Slide 37

Slide 37 text

{{uppercase)(concat)book.title)":)")book.subtitle)}}

Slide 38

Slide 38 text

{{uppercase)(concat)book.title)":)")book.subtitle)}}

Slide 39

Slide 39 text

class)UppercaseReference)implements)Reference){) ))private)str:)Reference[];) ))constructor(str:)Reference)){) ))))this.str)=)str;) ))}) ))value():)string){) ))))return)this.str.value().toUpperCase();) ))}) }

Slide 40

Slide 40 text

class)ConcatReference)implements)Reference){) ))private)parts:)Reference[];) ))constructor(...parts:)Reference[])){) ))))this.parts)=)parts;) ))}) ))value():)string){) ))))return)this.parts.map(reference)=>)reference.value()).join('');) ))}) }

Slide 41

Slide 41 text

interface)EntityTag){) ))value():)T;) ))validate(ticket:)T):)boolean;) }

Slide 42

Slide 42 text

interface)TaggedReference)extends)Reference){) ))tag:)EntityTag;) }

Slide 43

Slide 43 text

class)UppercaseReference)implements)TaggedReference){) ))public)tag:)EntityTag;) ))private)str:)Reference[];) ))constructor(str:)Reference)){) ))))this.tag)=)str.tag;) ))))this.str)=)str;) ))}) ))value():)string){) ))))return)this.str.value().toUpperCase();) ))}) }

Slide 44

Slide 44 text

class)UppercaseReference)implements)TaggedReference){) ))public)tag:)EntityTag;) ))private)str:)Reference[];) ))constructor(str:)Reference)){) ))))this.tag)=)str.tag;) ))))this.str)=)str;) ))}) ))value():)string){) ))))return)this.str.value().toUpperCase();) ))}) }

Slide 45

Slide 45 text

class)ConcatReference)implements)TaggedReference){) ))public)tag:)EntityTag;) ))private)parts:)TaggedReference[];) ))constructor(...parts:)TaggedReference[])){) ))))this.tag)=)new)CompositeTag(parts.map(reference)=>)reference.tag));) ))))this.parts)=)parts;) ))}) ))value():)string){) ))))return)this.parts.map(reference)=>)reference.value()).join('');) ))}) }

Slide 46

Slide 46 text

class)ConcatReference)implements)TaggedReference){) ))public)tag:)EntityTag;) ))private)parts:)TaggedReference[];) ))constructor(...parts:)TaggedReference[])){) ))))this.tag)=)new)CompositeTag(parts.map(reference)=>)reference.tag));) ))))this.parts)=)parts;) ))}) ))value():)string){) ))))return)this.parts.map(reference)=>)reference.value()).join('');) ))}) }

Slide 47

Slide 47 text

class)CompositeTag)implements)EntityTag){) ))private)tags:)EntityTag[];) ))constructor(tags:)EntityTag[])){) ))))this.tags)=)tags;) ))}) ))value():)any[]){) ))))return)this.tags.map(tag)=>)tag.value());) ))}) ))validate(tickets:)any[]):)boolean){) ))))let){)tags)})=)this;) ))))tags.forEach((tag,)i))=>){) ))))))if)(!tag.validate(tickets[i]))){) ))))))))return)false;) ))))))}) ))))});) ))))return)true;) ))}) };

Slide 48

Slide 48 text

Revision Tags

Slide 49

Slide 49 text

bit.ly/glimmer-guides

Slide 50

Slide 50 text

Take a deep breath.

Slide 51

Slide 51 text

Runtime

Slide 52

Slide 52 text

Welcome,){{user.name}}!

) {{#if)user.isAdmin}}) ))

Admin)Panel

) {{/if}}

Slide 53

Slide 53 text

Welcome,){{user.name}}!

) {{#if)user.isAdmin}}) ))

Admin)Panel

) {{/if}}

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Welcome,){{user.name}}!

) {{#if)user.isAdmin}}) ))

Admin)Panel

) {{/if}}

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

Optimizations

Slide 61

Slide 61 text

Const Optimization

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

Adaptive Optimizations

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

Inlining and Specializations

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Chunked Rendering

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

Rehydration

Slide 71

Slide 71 text

interface)ElementStack){) )openElement(tag:)InternedString):)Element;) )newDestroyable(d:)Destroyable);) )newBounds(bounds:)Bounds);) )appendText(string:)string):)Text;) )appendComment(string:)string):)Comment;) )insertHTMLBefore(nextSibling:)Node,)html:)string):)Fragment;) )setAttribute(name:)InternedString,)reference:)PathReference);) )setAttributeNS(namespace:)InternedString,)name:)InternedString,)reference:)PathReference);) )setProperty(name:)InternedString,)reference:)PathReference);) )closeElement();) )appendHTML(html:)string):)Bounds;) }

Slide 72

Slide 72 text

Glimmer Native

Slide 73

Slide 73 text

interface)ComponentDefinition){) )name:)string;)//)for)debugging) )manager:)ComponentManager;) )ComponentClass:)ComponentClass;) )compile(builder:)ComponentLayoutBuilder);) }) export)interface)ComponentManager){) )create(definition:)ComponentDefinition,)attrs:)EvaluatedArgs,)dynamicScope:)DynamicScope):)T;) )getSelf(component:)T):)any;) )didCreateElement(component:)T,)element:)Element,)operations:)ElementOperations);) )didCreate(component:)T);) )update(component:)T,)attrs:)EvaluatedArgs,)dynamicScope:)DynamicScope);) )didUpdate(component:)T);) )getDestructor(component:)T):)Destroyable;) }

Slide 74

Slide 74 text

Build your own React

Slide 75

Slide 75 text

interface)Environment){) )toConditionalReference(reference:)Reference):)Reference;) )iterableFor(reference:)Reference,)args:)EvaluatedArgs):)OpaqueIterable;) )getDOM():)DOMHelper;) )getIdentity(object:)HasGuid):)InternedString;) )statement(statement:)StatementSyntax):)StatementSyntax;) )refineStatement(statement:)ParsedStatement):)StatementSyntax;) )rootReferenceFor(obj:)any):)PathReference;) )hasHelper(helperName:)InternedString[]):)boolean;) )lookupHelper(helperName:)InternedString[]):)Helper;) )hasComponentDefinition(tagName:)InternedString[]):)boolean;) )getComponentDefinition(tagName:)InternedString[]):)ComponentDefinition;) }

Slide 76

Slide 76 text

It's not just us.

Slide 77

Slide 77 text

No content

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

But that's not it.

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

Thank you for being an awesome community ♥$%&'

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

One More Thing™

Slide 84

Slide 84 text

No content