Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
In search of lost web
Search
Maurizio Mangione
February 24, 2015
Technology
0
16
In search of lost web
Past, present and future of components
seen through the eyes of Marcel Proust.
Maurizio Mangione
February 24, 2015
Tweet
Share
Other Decks in Technology
See All in Technology
Cloud Runでコロプラが挑む 生成AI×ゲーム『神魔狩りのツクヨミ』の裏側
colopl
0
120
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
370
配列に見る bash と zsh の違い
kazzpapa3
3
160
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
390
Frontier Agents (Kiro autonomous agent / AWS Security Agent / AWS DevOps Agent) の紹介
msysh
3
180
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
740
SchooでVue.js/Nuxtを技術選定している理由
yamanoku
3
170
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
520
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
840
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
600
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
130
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The SEO Collaboration Effect
kristinabergwall1
0
350
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Un-Boring Meetings
codingconduct
0
200
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
57
Information Architects: The Missing Link in Design Systems
soysaucechin
0
780
Docker and Python
trallard
47
3.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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