Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
In search of lost web
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Maurizio Mangione
February 24, 2015
Technology
18
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
In search of lost web
Past, present and future of components
seen through the eyes of Marcel Proust.
Maurizio Mangione
February 24, 2015
Other Decks in Technology
See All in Technology
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
170
大型犬好きによるPugの紹介
yamanoku
1
160
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
PRO
0
430
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.1k
Optunaの最新リリースv5.0について
pfn
PRO
0
120
「事実」を「計測」して、「解釈」する 〜AWS Lambdaのメモリ最適解の見つけ方〜
maimyyym
0
170
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
630
古い指輪から広がった JAVA コミュニティ とのつながり
yamad
0
130
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
270
ウォンテッドリーの最近のプロダクトと技術の紹介
stomk
0
120
Local CI × GitHub Actions
gogutan
2
220
USB PDを使ってスマホを労わりたい
raspython3
0
180
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Practical Orchestrator
shlominoach
192
12k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
The SEO identity crisis: Don't let AI make you average
varn
0
590
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
So, you think you're a good person
axbom
PRO
2
2.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Building an army of robots
kneath
307
47k
Transcript
In search of lost web Past, present and future of
components seen through the eyes of Marcel Proust.
@granze Maurizio Mangione Milano JS founder + Lead front end
developer @ Gild
It’s all about time
Kronos - Aiôn
None
Things were easier
<select> <option value="1" selected>option 1</option> <option value="2">option 2</option> <option value="3">option
3</option> </select> A component
None
❖ Easy to use ❖ Configurable ❖ Composable ❖ Clean
code ™ ❖ Single responsibility Components keypoints
Where we are today
❖ Good old HTML element ❖ HTML 5 elements ❖
Frameworks custom elements ❖ Web components
Angular JS Directives
angular.module('myModule', []) .directive('markdown', function ($window) { var converter = new
$window.Showdown.converter(); return { restrict: 'A', link: function (scope, element) { element.html(converter.makeHtml(element.text().trim())); }; }; }); <markdown></markdown>
React JS Elements
var CommentBox = React.createClass({ render: function() { return ( <div
className="commentBox"> Hello, world! I am a CommentBox. </div> ); } }); React.render( <CommentBox />, document.getElementById('content') );
Ember Components
var App = Ember.Application.create(); App.GravatarImageComponent = Ember.Component.extend({ gravatarUrl: function() {
return "http://www.gravatar.com/avatar/" + hex_md5(this.get('email')); }.property('email') }); <script type="text/x-handlebars"> {{gravatar-image email="
[email protected]
"}} </script> <script type="text/x-handlebars" id="components/gravatar-image"> <img {{bindAttr src=gravatarUrl}}> </script>
Web Components
❖ Custom Elements ❖ HTML imports ❖ Shadow DOM ❖
Templates
document.registerElement('paper-tabs', { prototype: Object.create(HTMLElement.prototype) }); Custom element
document.registerElement('super-button', { prototype: Object.create(HTMLButtonElement.prototype), extends: 'button' }); Extending elements
var shadow = el.createShadowRoot(); shadow.innerHTML = "<style>h1 { color: pink;
}</style>" + "<h1>Web components rocks!</h1>"; Shadow DOM
None
A set of polyfills built on top of the Web
Components specifications. webcomponents.js
Polymer
Two-way data binding <polymer-element name="user-group"> <template> This is the {{technology}
} user group. </template> <script> Polymer('user-group', { ready: function() { this.technology = 'Javascript'; } }); </script> </polymer-element>
Declarative event mapping <polymer-element name="g-cool"> <template> <button on-click="{{buttonClick} }"></button> </template>
<script> Polymer({ buttonClick: function(event, detail, sender) { ... } }); </script> </polymer-element>
Extending other elements <polymer-element name="my-superlabel" extends="my-label" noscript> <template> <span> <i>★</i><shadow></shadow>
</span> </template> </polymer-element> <my-superlabel>Hello!</my-superlabel> // "★ Hello!"
Observing properties <polymer-element name="g-cool" attributes="better best"> <script> Polymer({ better: '',
best: '', betterChanged: function(oldValue, newValue) {...}, bestChanged: function(oldValue, newValue) {...} }); </script> </polymer-element>
Core elements
A set of visual and non-visual utility elements. Layout, user
input, selection, and scaffolding apps.
<core-header-panel flex> <core-toolbar> <core-icon-button icon=“menu"> </core-icon-button> <div>MY APP</div> </core-toolbar> <div
class=“content”>…</div> </core-header-panel>
<core-ajax auto id="userajax" url="http://xxx.com/api/data" handleAs="json" response="{{data}}"> </core-ajax> Non visual Core
Elements
Material Design
None
Paper elements
Paper elements collection implements material design for the web. They're
a set of highly visual, highly interactive elements that include things like controls, layouts, hero transitions, and scrolling effects.
<paper-input floatinglabel label="Type only numbers... (floating)" validate="^[0-9]*$" error="Input is not
a number!"> </paper-input>
«[...] our true self, which may sometimes have seemed to
be long dead, but never was entirely, is re-awoken and re-animated when it receives the heavenly food that is brought to it» Marcel Proust, Finding time again
Keep in touch Twitter, Github: @granze http://milanojs.com