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
15
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
SIEMを用いて、セキュリティログ分析の可視化と分析を実現し、PDCAサイクルを回してみた
coconala_engineer
0
280
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
データベース02: データベースの概念
trycycle
0
150
VSCodeの拡張機能を作っている話
ebarakazuhiro
1
360
On Your Data を超えていく!
hirotomotaguchi
2
670
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
820
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
240
20分で完全に理解するGrafanaダッシュボード
hamadakoji
3
430
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
0
200
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
6
3.7k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
380
本当のAWS基礎
toru_kubota
0
510
Featured
See All Featured
The Brand Is Dead. Long Live the Brand.
mthomps
49
28k
Agile that works and the tools we love
rasmusluckow
325
20k
A designer walks into a library…
pauljervisheath
200
23k
Embracing the Ebb and Flow
colly
80
4.1k
Into the Great Unknown - MozCon
thekraken
10
990
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Fireside Chat
paigeccino
21
2.6k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Designing the Hi-DPI Web
ddemaree
276
33k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
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