74

Polymer State of the Union - Chrome Dev Summit 2014

Embed Size (px)

Citation preview

Page 1: Polymer State of the Union - Chrome Dev Summit 2014
Page 2: Polymer State of the Union - Chrome Dev Summit 2014

PolymerState of the Union

Page 3: Polymer State of the Union - Chrome Dev Summit 2014

Jim Lo Scalzo/EPA/Landov

Page 4: Polymer State of the Union - Chrome Dev Summit 2014

About Me

+Matthew McNulty @mattsmcnulty

Page 5: Polymer State of the Union - Chrome Dev Summit 2014

About Polymer

Page 6: Polymer State of the Union - Chrome Dev Summit 2014

Polymer helps developers build awesome applications faster.

easierbetter

Page 7: Polymer State of the Union - Chrome Dev Summit 2014

How awesome?

Very.

Page 8: Polymer State of the Union - Chrome Dev Summit 2014

Let’s see.

Page 9: Polymer State of the Union - Chrome Dev Summit 2014

Polymer mail

Page 10: Polymer State of the Union - Chrome Dev Summit 2014

What is Polymer?

Page 11: Polymer State of the Union - Chrome Dev Summit 2014

Polymer is a library, not a framework

for making applications out of web components

Page 12: Polymer State of the Union - Chrome Dev Summit 2014

What does Polymer do?

Page 13: Polymer State of the Union - Chrome Dev Summit 2014

Polymer makes web components sweeter

Image:

Page 14: Polymer State of the Union - Chrome Dev Summit 2014

Image:

Primitives are primitive

Page 15: Polymer State of the Union - Chrome Dev Summit 2014

Polymer does a lot that reduces boilerplate that you

have to write over and over and over

Page 16: Polymer State of the Union - Chrome Dev Summit 2014

<polymer-is-declarative> </polymer-is-declarative>

Page 17: Polymer State of the Union - Chrome Dev Summit 2014

Polymer has an opinion

Image:

Page 18: Polymer State of the Union - Chrome Dev Summit 2014
Page 19: Polymer State of the Union - Chrome Dev Summit 2014

The Polymer Experiment

Page 20: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Ergonomics

Polymer Unified School District

Page 21: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Ergonomics: A

Polymer Unified School District

Page 22: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Productivity

Polymer Unified School District

Page 23: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Productivity: A

Polymer Unified School District

Page 24: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Expressiveness

Polymer Unified School District

Page 25: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Expressiveness: A

Polymer Unified School District

Page 26: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Performance

Polymer Unified School District

Page 27: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Performance: Needs Improvement

Polymer Unified School District

Page 28: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Performance: Maximum Improvement Opportunity! ☺

Polymer Unified School District

Page 29: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Polymer Unified School District

Complexity & Payload

Page 30: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Complexity & Payload

Polymer Unified School District

Page 31: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report Card

Complexity: Needs Improvement

Polymer Unified School District

Page 32: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report CardErgonomics:

Productivity: Expressiveness:

Performance: Complexity:

AAANeeds Improvement

Needs ImprovementPolymer Unified School District

Page 33: Polymer State of the Union - Chrome Dev Summit 2014
Page 34: Polymer State of the Union - Chrome Dev Summit 2014

The experiment is over.

It’s time to make Polymer production-ready

Page 35: Polymer State of the Union - Chrome Dev Summit 2014

Needs Improvement

• We took a hard look at every feature • Improve performance and complexity • But don’t sacrifice the features

developers love

Page 36: Polymer State of the Union - Chrome Dev Summit 2014

Layering

• Refactored into layers • Core features are fast and lean • Advanced functionality is opt-in • Vast majority of use cases covered by

base feature set

Page 37: Polymer State of the Union - Chrome Dev Summit 2014

Simplified Data Binding

• Optimized for performance and simplicity • Two-way binding opt-in • Explicit property typing • Change notification uses events for

interoperability

Page 38: Polymer State of the Union - Chrome Dev Summit 2014

Leaner Polyfill for Shadow DOM

• Shadow DOM Polyfill is amazing, spec-compliant

• If we only shim features Polymer needs, we can make it much lighter & faster

Page 39: Polymer State of the Union - Chrome Dev Summit 2014

So how did we do?

Page 40: Polymer State of the Union - Chrome Dev Summit 2014

Chrome

5x faster0

25

50

75

100

Time

Page 41: Polymer State of the Union - Chrome Dev Summit 2014

Safari

8x faster0

25

50

75

100

Time

Page 42: Polymer State of the Union - Chrome Dev Summit 2014

What about payload & complexity?

Page 43: Polymer State of the Union - Chrome Dev Summit 2014

Payload & Complexity

• 15KB vs 123KB • 6KB gzipped

87% smaller

Page 44: Polymer State of the Union - Chrome Dev Summit 2014
Page 45: Polymer State of the Union - Chrome Dev Summit 2014
Page 46: Polymer State of the Union - Chrome Dev Summit 2014
Page 47: Polymer State of the Union - Chrome Dev Summit 2014
Page 48: Polymer State of the Union - Chrome Dev Summit 2014

About that report card…

Page 49: Polymer State of the Union - Chrome Dev Summit 2014

Er

Report CardErgonomics:

Productivity: Expressiveness:

Performance: Complexity:

AAAImproved!

Improved!Polymer Unified School District

Page 50: Polymer State of the Union - Chrome Dev Summit 2014

Nothing in life is free

• Some breaking changes • But not that scary - not a rewrite • A few minor version numbers’ worth • Reflected in the new version number: 0.8 • Closer to 1.0, .3 better.

Page 51: Polymer State of the Union - Chrome Dev Summit 2014

But that’s not all…

Page 52: Polymer State of the Union - Chrome Dev Summit 2014

What is Polymer?

Page 53: Polymer State of the Union - Chrome Dev Summit 2014

Clean-up

• Polyfills are used by others like Brick • Polyfills are not Polymer • Moving to webcomponents.org

Page 54: Polymer State of the Union - Chrome Dev Summit 2014

Clean-up

• Elements are made with Polymer • Polymer is a way to use material design,

but isn’t material design • So they are getting their own website

section

Page 55: Polymer State of the Union - Chrome Dev Summit 2014

What’s left is the core of Polymer…

Page 56: Polymer State of the Union - Chrome Dev Summit 2014

And that core is production-track

Page 57: Polymer State of the Union - Chrome Dev Summit 2014

Polymer Roadmap

• 0.8 - preview today • 0.9 “beta” - Q1 • 1.0 - Q2

Page 58: Polymer State of the Union - Chrome Dev Summit 2014

Who is using Polymer?

Page 59: Polymer State of the Union - Chrome Dev Summit 2014
Page 60: Polymer State of the Union - Chrome Dev Summit 2014
Page 61: Polymer State of the Union - Chrome Dev Summit 2014
Page 62: Polymer State of the Union - Chrome Dev Summit 2014
Page 63: Polymer State of the Union - Chrome Dev Summit 2014
Page 64: Polymer State of the Union - Chrome Dev Summit 2014
Page 65: Polymer State of the Union - Chrome Dev Summit 2014
Page 66: Polymer State of the Union - Chrome Dev Summit 2014
Page 67: Polymer State of the Union - Chrome Dev Summit 2014
Page 68: Polymer State of the Union - Chrome Dev Summit 2014
Page 69: Polymer State of the Union - Chrome Dev Summit 2014

And a whole lot more…

Page 70: Polymer State of the Union - Chrome Dev Summit 2014

Wrapup

Page 71: Polymer State of the Union - Chrome Dev Summit 2014

Summary

• The next major version of Polymer is coming soon

• It’s really fast • It’s much lighter • It’s much more modular

Page 72: Polymer State of the Union - Chrome Dev Summit 2014

Summary

• Polymer is no longer an experiment • The Polyfills are moving to

webcomponents.org • All the cool kids are already using it • You should too - Rob will show you how

Page 73: Polymer State of the Union - Chrome Dev Summit 2014

• Do nothing: Rob’s up next • Do something: follow us @polymer • Do something more: Polymer on github

Page 74: Polymer State of the Union - Chrome Dev Summit 2014

Fin.