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
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.2k
Webhook best practices for rock solid and resilient deployments
glaforge
2
300
AI駆動開発を事業のコアに置く
tasukuonizawa
1
340
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
210
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
390
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
160
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.4k
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
470
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
270
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
240
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
280
20260204_Midosuji_Tech
takuyay0ne
1
160
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
120
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
650
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Building a Scalable Design System with Sketch
lauravandoore
463
34k
How to Talk to Developers About Accessibility
jct
2
140
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
ラッコキーワード サービス紹介資料
rakko
1
2.3M
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
67
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