SlideShare ist ein Scribd-Unternehmen logo
1 von 65
Downloaden Sie, um offline zu lesen
Who am I? 
๏ Founder @ Dynamatik 
๏ Co-Founder @ Ember Chat 
๏ Engineer @ Kobo 
๏ @FaisalAbid 
๏ faisal.abid@gmail.com - Ask me anything about Node, AngularJS, Dart, 
Polymer, and Android.
About the talk 
๏ Split into three parts. 
๏ Goal is to inspire you to go out, learn Dart & Polymer and rule the world. 
๏ Part 1. Quick Dart introduction to basic language concepts 
๏ Part 2. Quick rundown of Web components & Polymer 
๏ Part 3. Dart + Polymer and what Material design is
But first 
Let’s play a game
Guess the language
public String Hello(){ 
return "World"; 
}
public String Hello(){ 
return "World"; 
} 
Java
function Hello(){ 
return "World"; 
}
function Hello(){ 
return "World"; 
} 
Javascript
String Hello(){ 
return "World"; 
}
String Hello(){ 
return "World"; 
} 
Dart!
You already know Dart* 
*95% of it at least
1Dart
What is Dart & Why should I care? 
๏ Dart is a new platform and language by Google. 
๏ Dart is for “Scalable web app engineering”
“Scalable web app engineering” 
What does that mean?
Scalable web app engineering 
๏ Javascript is “Scalable” to an extent 
• RequireJS/AMD modules 
• Frameworks like Backbone, Ember.js, Angular.js 
• JQuery, Zepto
Javascript is the root of all evil* 
*a little bit dramatic, but gets the point across
Scalable web app engineering 
๏ Dart is built for scale 
• Optional type checking - I <3 typed objects 
• Single threaded “Isolate” concept for server apps. Web workers for client. 
• Objects, Classes, Polymorphism 
• Easy async, less messy callbacks 
• Many years of programming language research 
• High performance VM, Dartium 
• Compile straight to JS for cross browser compatibility
All while keeping the language 
easy to develop in.
All while keeping the language 
easy to develop in. 
Because all that scale stuff is cool, but this is what really matters.
class Conference { 
String name; 
num attendees; 
Conference(String name, num attendees) { 
this.name = name; 
this.attendees = attendees; 
} 
} 
// then later 
var webunleashed = new Conference("WebUnleashed", 5800); 
Example Class in Dart
Dart IDE Tour
Dart IDE Tour
Dart Package Manager
Dart IDE Tour
Dart IDE Tour
Optionally Typed 
๏ Dart is optionally typed. 
๏ For Public API’s / Public Methods - Use Type 
๏ For internal method implementations, use var. 
• Dart IDE will make use of type info also. Easy code assist. 
• “Explicit type annotations are usually just visual noise.”
Dart Typed Example
Async / Future 
๏ One of the most powerful features of Dart 
๏ Dart is single threaded, blocking code blocks! 
๏ Dart futures lets you perform async operations. I.e HTTP
Dart Future Example
Async / Future - Recap 
๏ One of the most powerful features of Dart 
๏ Dart is single threaded, blocking code blocks! 
๏ Dart futures lets you perform async operations. I.e HTTP 
๏ Futures make it easy to avoid callback hell and keep syntax simple. 
๏ Almost one line API calls. no callbacks needed
Dart Everywhere 
๏ You can write your Dart apps on the server side also! 
๏ Dart on the full stack! Front-end and backend. 
๏ Use classes, futures and everything you’ve learned
Simple Dart:io Example
Dart for web 
๏ Ran through simple but powerful examples. 
๏ Dart makes web development easy. 
๏ Dart is built to scale, with OOP principals, Async programming made 
easy and simple to use syntax. Making Dart web apps is easy. 
๏ But what’s this polymer thing about?
2Polymer / Web components
What are web components? 
๏ Next generation of encapsulation for the web. 
๏ Build your own tag, hide the implementation details.
Whats the shadow DOM? 
๏ Shadow DOM hides the web component implementation from the 
DOM. 
๏ I.e <my-tag> shows up as <my-tag> and not a series of divs. 
๏ Ready in firefox, chrome, opera, and their mobile counterparts. 
๏ Not in Safari. 
๏ Polyfills ready for older browsers and Safari. Mileage may vary
Now what’s Polymer then? 
๏ Truthfully the web component spec is sometimes messy 
๏ Hard to implement on its own. 
๏ Polymer wraps all this up in a nice abstraction layer. By Google 
๏ Works wherever Web components/ Shadow dom works.
Now what’s Polymer then?
Can I use Polymer with only Dart? 
๏ No! Polymer can be used with Javascript. In fact it’s first written for JS. 
๏ Dart has a feature parity port by Google. 
๏ pub : polymer 
๏ pub : paper-elements 
๏ Polymer is better with Dart. You feel like you are coding for the future.
3Dart meet Polymer
How do you use Polymer with Dart 
๏ Starter project makes it easy to get started. 
๏ Transformer gets polymer all ready to rock.
Dart / Polymer Example
Simple data binding in Polymer 
๏ You want your components to do something and take attributes 
๏ Databinding is simple with polymer. 
๏ Lets take a look!
Dart / Polymer Databinding
Simple data binding in Polymer 
๏ You want your components to do something and take attributes 
๏ Databinding is simple with polymer. 
๏ @published - is two way binding 
๏ @observable - is one way binding
Advanced data binding in Polymer 
๏ Databind on lists too!
@CustomTag(‘speaker-list') 
class SpeakerList extends PolymerElement { 
final List speakers = toObservable(["Speaker One", "Speaker Two", "Speaker Three"]); 
SpeakerList() : super.created(); 
} 
[ . . . ] 
<template repeat=“{{speaker in speakers}}”> 
<li> {{speaker}} </li> 
</template> 
Example list data binding in Dart
Advanced data binding in Polymer 
๏ Databind on lists too! 
๏ DAMN THIS IS EASY!!!!
Material Design & Polymer 
๏ Google introduced this at Google IO 
๏ Sexy fluid new UI components for the web & mobile. 
๏ “Paper-elements” is a package ready to be used by Dart. In fact many 
examples have used paper-elements already 
๏ Must have polymer: ">=0.14.0 <0.15.0” in your pub 
๏ core_elements: ">=0.2.0 <0.3.0" 
๏ paper_elements: ">=0.2.0 <0.3.0"
Material Design & Polymer 
๏ Paper-Elements is the new UI language from Google 
๏ Lets take a look at a sample example
Material Design & Polymer 
๏ Paper-Elements is the new UI language from Google 
๏ Do all Material design apps look alike? 
• No! You can easily theme them via CSS 
• Great resource is http://polymerthemes.com/
Styling Polymer 101 
๏ Styling Polymer components is straight forward with a few pitfalls. 
๏ Use CSS - Duh. 
๏ However CSS is encapsulated in your component. No global css styles. 
๏ New selectors help with this.
<polymer-element name="x-foo" noscript> 
<template> 
<style> 
:host { 
/* Note: by default elements are always display:inline. */ 
display: block; 
} 
</style> 
</template> 
</polymer-element> 
Styling Example
<style> 
x-foo { 
display: block; 
} 
x-foo:hover { 
opacity: 0; 
} 
</style> 
Styling from outside
Closing Thoughts 
๏ Dart is ready for prime time. version 1.6 
๏ Polymer still in beta for Dart, but “pretty” stable. 
๏ Dart brings sanity to web development. 
๏ Polymer/Web components brings proper modularity to web 
development. 
๏ Dart is moving full steam ahead, adopted heavily by Google. 
๏ It’s not going anywhere, so embrace change and lets rule the world.
Thank you 
@FaisalAbid - faisal.abid@gmail.com 
Title screen by Sam Beck - SamBeck.ca
Building for the Material web with Polymer and Dart

Weitere ähnliche Inhalte

Mehr von FITC

Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday InnovationFITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight WebsitesFITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is TerrifyingFITC
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanFITC
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)FITC
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameFITC
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare SystemFITC
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignFITC
 
The Power of Now
The Power of NowThe Power of Now
The Power of NowFITC
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAsFITC
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstackFITC
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFITC
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForFITC
 
The Art of Being Bad
The Art of Being BadThe Art of Being Bad
The Art of Being BadFITC
 
The Making of Freeroam VR
The Making of Freeroam VRThe Making of Freeroam VR
The Making of Freeroam VRFITC
 
Unleash Design Thinking to (Re)Design Your Business
Unleash Design Thinking to (Re)Design Your BusinessUnleash Design Thinking to (Re)Design Your Business
Unleash Design Thinking to (Re)Design Your BusinessFITC
 
Stop Looking for Inspiration: Be Your Own Muse!
Stop Looking for Inspiration: Be Your Own Muse!Stop Looking for Inspiration: Be Your Own Muse!
Stop Looking for Inspiration: Be Your Own Muse!FITC
 
Drawing It Together
Drawing It TogetherDrawing It Together
Drawing It TogetherFITC
 
The Almighty Rabbit Hole
The Almighty Rabbit HoleThe Almighty Rabbit Hole
The Almighty Rabbit HoleFITC
 
Planet of APIs: A Tale of Performance & User Experience
Planet of APIs: A Tale of Performance & User ExperiencePlanet of APIs: A Tale of Performance & User Experience
Planet of APIs: A Tale of Performance & User ExperienceFITC
 

Mehr von FITC (20)

Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
 
The Art of Being Bad
The Art of Being BadThe Art of Being Bad
The Art of Being Bad
 
The Making of Freeroam VR
The Making of Freeroam VRThe Making of Freeroam VR
The Making of Freeroam VR
 
Unleash Design Thinking to (Re)Design Your Business
Unleash Design Thinking to (Re)Design Your BusinessUnleash Design Thinking to (Re)Design Your Business
Unleash Design Thinking to (Re)Design Your Business
 
Stop Looking for Inspiration: Be Your Own Muse!
Stop Looking for Inspiration: Be Your Own Muse!Stop Looking for Inspiration: Be Your Own Muse!
Stop Looking for Inspiration: Be Your Own Muse!
 
Drawing It Together
Drawing It TogetherDrawing It Together
Drawing It Together
 
The Almighty Rabbit Hole
The Almighty Rabbit HoleThe Almighty Rabbit Hole
The Almighty Rabbit Hole
 
Planet of APIs: A Tale of Performance & User Experience
Planet of APIs: A Tale of Performance & User ExperiencePlanet of APIs: A Tale of Performance & User Experience
Planet of APIs: A Tale of Performance & User Experience
 

Kürzlich hochgeladen

VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...SUHANI PANDEY
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubaikojalkojal131
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...SUHANI PANDEY
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceDelhi Call girls
 

Kürzlich hochgeladen (20)

VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Salem Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 

Building for the Material web with Polymer and Dart

  • 1.
  • 2. Who am I? ๏ Founder @ Dynamatik ๏ Co-Founder @ Ember Chat ๏ Engineer @ Kobo ๏ @FaisalAbid ๏ faisal.abid@gmail.com - Ask me anything about Node, AngularJS, Dart, Polymer, and Android.
  • 3. About the talk ๏ Split into three parts. ๏ Goal is to inspire you to go out, learn Dart & Polymer and rule the world. ๏ Part 1. Quick Dart introduction to basic language concepts ๏ Part 2. Quick rundown of Web components & Polymer ๏ Part 3. Dart + Polymer and what Material design is
  • 4. But first Let’s play a game
  • 6. public String Hello(){ return "World"; }
  • 7. public String Hello(){ return "World"; } Java
  • 9. function Hello(){ return "World"; } Javascript
  • 11. String Hello(){ return "World"; } Dart!
  • 12. You already know Dart* *95% of it at least
  • 13. 1Dart
  • 14. What is Dart & Why should I care? ๏ Dart is a new platform and language by Google. ๏ Dart is for “Scalable web app engineering”
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. “Scalable web app engineering” What does that mean?
  • 20. Scalable web app engineering ๏ Javascript is “Scalable” to an extent • RequireJS/AMD modules • Frameworks like Backbone, Ember.js, Angular.js • JQuery, Zepto
  • 21. Javascript is the root of all evil* *a little bit dramatic, but gets the point across
  • 22. Scalable web app engineering ๏ Dart is built for scale • Optional type checking - I <3 typed objects • Single threaded “Isolate” concept for server apps. Web workers for client. • Objects, Classes, Polymorphism • Easy async, less messy callbacks • Many years of programming language research • High performance VM, Dartium • Compile straight to JS for cross browser compatibility
  • 23. All while keeping the language easy to develop in.
  • 24. All while keeping the language easy to develop in. Because all that scale stuff is cool, but this is what really matters.
  • 25. class Conference { String name; num attendees; Conference(String name, num attendees) { this.name = name; this.attendees = attendees; } } // then later var webunleashed = new Conference("WebUnleashed", 5800); Example Class in Dart
  • 31. Optionally Typed ๏ Dart is optionally typed. ๏ For Public API’s / Public Methods - Use Type ๏ For internal method implementations, use var. • Dart IDE will make use of type info also. Easy code assist. • “Explicit type annotations are usually just visual noise.”
  • 33. Async / Future ๏ One of the most powerful features of Dart ๏ Dart is single threaded, blocking code blocks! ๏ Dart futures lets you perform async operations. I.e HTTP
  • 35. Async / Future - Recap ๏ One of the most powerful features of Dart ๏ Dart is single threaded, blocking code blocks! ๏ Dart futures lets you perform async operations. I.e HTTP ๏ Futures make it easy to avoid callback hell and keep syntax simple. ๏ Almost one line API calls. no callbacks needed
  • 36. Dart Everywhere ๏ You can write your Dart apps on the server side also! ๏ Dart on the full stack! Front-end and backend. ๏ Use classes, futures and everything you’ve learned
  • 38. Dart for web ๏ Ran through simple but powerful examples. ๏ Dart makes web development easy. ๏ Dart is built to scale, with OOP principals, Async programming made easy and simple to use syntax. Making Dart web apps is easy. ๏ But what’s this polymer thing about?
  • 39. 2Polymer / Web components
  • 40. What are web components? ๏ Next generation of encapsulation for the web. ๏ Build your own tag, hide the implementation details.
  • 41. Whats the shadow DOM? ๏ Shadow DOM hides the web component implementation from the DOM. ๏ I.e <my-tag> shows up as <my-tag> and not a series of divs. ๏ Ready in firefox, chrome, opera, and their mobile counterparts. ๏ Not in Safari. ๏ Polyfills ready for older browsers and Safari. Mileage may vary
  • 42.
  • 43.
  • 44. Now what’s Polymer then? ๏ Truthfully the web component spec is sometimes messy ๏ Hard to implement on its own. ๏ Polymer wraps all this up in a nice abstraction layer. By Google ๏ Works wherever Web components/ Shadow dom works.
  • 46. Can I use Polymer with only Dart? ๏ No! Polymer can be used with Javascript. In fact it’s first written for JS. ๏ Dart has a feature parity port by Google. ๏ pub : polymer ๏ pub : paper-elements ๏ Polymer is better with Dart. You feel like you are coding for the future.
  • 48. How do you use Polymer with Dart ๏ Starter project makes it easy to get started. ๏ Transformer gets polymer all ready to rock.
  • 49. Dart / Polymer Example
  • 50. Simple data binding in Polymer ๏ You want your components to do something and take attributes ๏ Databinding is simple with polymer. ๏ Lets take a look!
  • 51. Dart / Polymer Databinding
  • 52. Simple data binding in Polymer ๏ You want your components to do something and take attributes ๏ Databinding is simple with polymer. ๏ @published - is two way binding ๏ @observable - is one way binding
  • 53. Advanced data binding in Polymer ๏ Databind on lists too!
  • 54. @CustomTag(‘speaker-list') class SpeakerList extends PolymerElement { final List speakers = toObservable(["Speaker One", "Speaker Two", "Speaker Three"]); SpeakerList() : super.created(); } [ . . . ] <template repeat=“{{speaker in speakers}}”> <li> {{speaker}} </li> </template> Example list data binding in Dart
  • 55. Advanced data binding in Polymer ๏ Databind on lists too! ๏ DAMN THIS IS EASY!!!!
  • 56. Material Design & Polymer ๏ Google introduced this at Google IO ๏ Sexy fluid new UI components for the web & mobile. ๏ “Paper-elements” is a package ready to be used by Dart. In fact many examples have used paper-elements already ๏ Must have polymer: ">=0.14.0 <0.15.0” in your pub ๏ core_elements: ">=0.2.0 <0.3.0" ๏ paper_elements: ">=0.2.0 <0.3.0"
  • 57. Material Design & Polymer ๏ Paper-Elements is the new UI language from Google ๏ Lets take a look at a sample example
  • 58.
  • 59. Material Design & Polymer ๏ Paper-Elements is the new UI language from Google ๏ Do all Material design apps look alike? • No! You can easily theme them via CSS • Great resource is http://polymerthemes.com/
  • 60. Styling Polymer 101 ๏ Styling Polymer components is straight forward with a few pitfalls. ๏ Use CSS - Duh. ๏ However CSS is encapsulated in your component. No global css styles. ๏ New selectors help with this.
  • 61. <polymer-element name="x-foo" noscript> <template> <style> :host { /* Note: by default elements are always display:inline. */ display: block; } </style> </template> </polymer-element> Styling Example
  • 62. <style> x-foo { display: block; } x-foo:hover { opacity: 0; } </style> Styling from outside
  • 63. Closing Thoughts ๏ Dart is ready for prime time. version 1.6 ๏ Polymer still in beta for Dart, but “pretty” stable. ๏ Dart brings sanity to web development. ๏ Polymer/Web components brings proper modularity to web development. ๏ Dart is moving full steam ahead, adopted heavily by Google. ๏ It’s not going anywhere, so embrace change and lets rule the world.
  • 64. Thank you @FaisalAbid - faisal.abid@gmail.com Title screen by Sam Beck - SamBeck.ca