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
Rise above the Framework: JSCamp 2018
Search
Mike Hartington
July 23, 2018
Technology
1
1.4k
Rise above the Framework: JSCamp 2018
or: How I learned to love web standards and stop worrying.
Mike Hartington
July 23, 2018
Tweet
Share
More Decks by Mike Hartington
See All by Mike Hartington
Ionic And Vue For Fast Mobile Apps
mhartington
0
170
Fast PWAs With Angular
mhartington
3
28
Awesome PWAs with Angular
mhartington
1
180
Rethinking Mobile with Ionic 2
mhartington
0
240
Other Decks in Technology
See All in Technology
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
54k
20241125 - AI 繪圖實戰魔法工作坊 @ 實踐大學
dpys
1
450
RubyでKubernetesプログラミング
sat
PRO
3
120
機械学習を「社会実装」するということ 2025年版 / Social Implementation of Machine Learning 2025 Version
moepy_stats
3
470
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
320
アジャイルチームが変化し続けるための組織文化とマネジメント・アプローチ / Agile management that enables ever-changing teams
kakehashi
3
3k
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.1k
効率的な技術組織が作れる!書籍『チームトポロジー』要点まとめ
iwamot
2
200
デジタルアイデンティティ人材育成推進ワーキンググループ 翻訳サブワーキンググループ 活動報告 / 20250114-OIDF-J-EduWG-TranslationSWG
oidfj
0
350
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
280
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
420
30分でわかるデータ分析者のためのディメンショナルモデリング #datatechjp / 20250120
kazaneya
PRO
18
4.3k
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
350
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
490
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
950
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
240
The Cult of Friendly URLs
andyhume
78
6.1k
Being A Developer After 40
akosma
89
590k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Making the Leap to Tech Lead
cromwellryan
133
9k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Transcript
None
RISE ABOVE THE FRAMEWORK Mike Hartington • @mhartington
OR
HOW I LEARNED TO LOVE TO WEB STANDARDS AND
STOP WORRYING
None
I WANT TO BUILD AN APP!
None
None
None
None
None
WHAT HAPPENED…
Web Development used to be "easy" Take some jQuery, add
a bit of Backbone, and done Need something more hands on? Angular, Knockout, Ember
In a short amount of time, we went from simple
Script tags, to more advanced MVC-styled application architecture
Then… JSX, Decorators, Template compilation, code splitting, lazy loading,
CSS preprocessors, CSS-In-JS, build tools, configs files…
WHAT.
Frustrating But when in doubt, look to the standards Finding
balance
CSS JAVASCRIPT COMPONENTS
CSS Global Styles Variables/Dynamic values
GLOBAL CSS Can affect any component in the DOM Cascade
becomes difficult to reason Resets/Overrides become a thing
CSS-in-JS or CSS Modules
SHADOW DOM! Isolates component internals CSS is scoped: No more
global Simplified rules http://bit.ly/2L9fT7R
const header = document.createElement('div'); const shadowRoot = header.attachShadow({ mode: 'open'
}); shadowRoot.innerHTML = ` <link rel="stylesheet" href="style.css"> <style> h1 { font-family: "Impact"; } </style> <h1>Hello From Shadow DOM</h1> `; document.body.append(header); https://bit.ly/2L6QVWG
DYNAMIC VALUES?
CSS VARIABLES! Custom Properties: User declared values Works with/without ShadowDOM
Simplifies theming
:root { --app-color-red: #ff0011; --app-font-family: "Helvetica" } h1 { color:
var(--app-color-red); font-family: var(--app-font-family); } https://bit.ly/2L96nBo
<ELEMENT>.style.setProperty(`--app-color-red`, val); https://bit.ly/2O1AxUZ
JAVASCRIPT Cost of transpiling Reliance on Build Tools
JAVASCRIPT Adding Code the old way: Script Tags ES5 was
guaranteed
ESNEXT JavaScript moves fast Build Tools: New features, but today
Build Tool Fatigue
BUT GUESS WHAT?
<script type="module">
Supports async/await Supports Classes. Supports arrow functions. Fetch, Promises, Map,
Set, and more!
But what about older browsers?
<script nomodule></script>
None
COMPONENTS Removing lock in Cross-framework support
COMPONENTS From MVC to Component AngularJS Directive (first?)
REACT All components, all the time
REACT class AppRoot extends Component { render() { return(
<div> <h1>hello world</h1> </div> ) } }
ANGULAR @Component({ selector: `app-root`, template: ` <div> <h1> Hello
World</h1> </div> ` }) class AppRoot{}
VUE Vue.component('app-root', { template: ` <div> <h1>Hello World</h1> </div>`
});
Different Framework Different API
CUSTOM ELEMENTS! Standards-based API Reusable components... NATIVELY No Framework required
class HelloWorld extends HTMLElement { constructor() { super(); } connectedCallback()
{ this.init(); } init() { this.innerHTML = `<h1>Hello World</h1>`; } } window.customElements.define('hello-world', HelloWorld);
Element Attributes & Properties ShadowDom (optional) Lifecycle Hooks Custom Events
MICRO-LIBS StencilJS SkateJS Lit-html/Lit-element/Lit-html-element
Angular Elements: Angular Components as WC Vue Target: --target web-component
React: custom-elements-everywhere.com
None
CSS JAVASCRIPT COMPONENTS
What can Web Standards Do to help
THANK YOU </html>