Flexible UI Components
UI Development For a Multi-Framework World
@kbal11
kball@zendev.com
https://zendev.com
Implementing UI is
Easier Than Ever
Let’s remember how it
used to be…
How It Used To Be
• Tables for layout
• Hand-coded CSS IF YOU WERE LUCKY
• Spend a week on a site, and then another
week getting it to work on Internet Explorer
Photo Credit: http://dullneon.com/randomnotes/2016/07/goodbye-yahoo.html
Yahoo
GeoCities
Photo Credit: http://geocitiessites.com/soho/veranda/4103/
When I first learned
about Grid 960…
When I first learned about
Grid 960…
We’ve come a long
way…
Modern UI Frameworks
[ bootstrap image ]
Flexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework World
Flexible UI Components for a Multi-Framework World
But We’re Still Doing It Wrong
JS Ecosystem When Modern
Frameworks Emerged
(Pre 1.0!) (Barely 1.0!)
JS Ecosystem Today
UI Libraries Are Done Two Ways
The Bootstrap Way
• Naive to JS Frameworks
• Provide “Vanilla” Implementation
• Every JavaScript Framework gets
its own “port” (rewrite)
The Material Way
• Pick a JavaScript Framework
• Deep Integration with that JS
• Rewrite if needed for other
frameworks
The Result Is The Same
[ image of visual
inconsistencies]
Photo Credit: https://www.thisiswhyimbroke.com/warping-mirrors/
Marketing
Site
Web App Mobile
App
Environments Are Not
Consolidating
Marketing
Site
Web App
Mobile
App
Wordpress +
jQuery
Mobile
App
Web App
Wordpress +
jQuery
Mobile
App
React +
Redux
Wordpress +
jQuery
Ionic
(Angular)
React +
Redux
Environments Have
• Different DOM manipulation paradigms
• Different “natural” markup structures
• Different approaches to state
Environments Don’t Have
• Different User Expectations
• Different Branding Needs
We Can Do Better
About Me
• Lead of ZURB Foundation project
• Founder & President ZenDev, LLC
• Known to get a bit over-excited
about CSS and JavaScript
Photo Credit: ZURB
Just a little over-excited
About ZenDev
• Frontend Consulting - Strategy, Architecture, and all things
ZURB Foundation
• Team Training - ZURB Foundation
• Publishing Friday Frontend newsletter: 

https://zendev.com/friday-frontend.html
ZURB Foundation 7
ZURB Foundation 7
• Design Language Agnostic
• JavaScript Framework Agnostic
• “Flexible UI Components”
Design Goals
Flexible UI Components
Flexible UI Components
Components designed to be
adapted to any JS framework
Principles of Flexible UI
Components
• Components Should Be State Driven
• Coupling Should Be Event Driven
• Components Should Be “DOM Flexible”
• Components Should Be State Driven
• Coupling Should Be Event Driven
• Components Should Be “DOM Flexible”
Principles of Flexible UI
Components
The 2 Component
Programming Models
• Imperative Manipulation
• State-driven implicit manipulation
Imperative manipulation is like
telling your kids what to do
• Go to your room
• Pick out one pair of underwear
• Pick out one pair of pants
• Pick out one shirt
Imperative manipulation is like
telling your kids what to do
Photo Credit: My Wife
Imperative Manipulation Example
elem.setAttribute(‘aria-selected’: ‘active’);
elem.classList.add(‘selected’);
Paradigms Using Imperative Manipulation
• Native JavaScript
• jQuery
• Polymer/Web Components
State driven manipulation is like
me taking my car to the shop
• This car should be more awesome.
Make it happen.
State driven manipulation is like
me taking my car to the shop
Photo Credit: http://www.mycarconnector.com/pimp-my-ride-was-a-big-fat-lie/
Photo Credit: https://www.pinterest.com/pin/431219733043180678/
Photo Credit: http://www.carsut.com/pimped-out-cars/
State Driven Example
component.setState({‘selected’: true});
Examples of State Driven
• Angular
• React
• Vue
• Ember
State => Imperative is easy.
Imperative => State is HARD.
Implication: Treat
EVERYTHING as State
EVERYTHING as State
• Application State
• UI State
• User entered content
• ARIA attributes
• Components Should Be State Driven
• Coupling Should Be Event Driven
• Components Should Be “DOM Flexible”
Principles of Flexible UI
Components
Coupling Should Be Event Driven
• Loose Coupling > Tight Coupling
• Enables Different Models of State
Loose Coupling > Tight
Coupling
Photo Credit: https://gfycat.com/gifs/detail/abandonedsizzlinghatchetfish
Challenges of Tight Coupling
Loose Coupling
• Allows multitude of component
relationship models
• Enables multitude of programming
models
Multiple Models of State
• Redux: event === dispatch
• RxJS: Components => observables
• Native: event => update local state
imperatively
Redux
myComponent.on(‘core.event’, (e, stateChange) => {
dispatch(‘MY_COMPONENT_CHANGE’, stateChange)
});
RXJS
myComponent.subscribe(‘core.event’, (stateChange) => {
doSomethingWithIt();
});
Flexible UI Components
• Components Should Be State Driven
• Coupling Should Be Event Driven
• Components Should Be “DOM Flexible”
What does “DOM Flexible”
Mean?
• Explicit over Implicit
• Classes and Attributes over Elements
• Can still facilitate common cases via opt-in
Class and Attributes Over
Elements
<ul	class="dropdown	menu"	data-dropdown-menu>	
		<li>	
				<a	href="#">Item	1</a>	
				<ul	class="menu">	
						<li><a	href="#">Item	1A</a></li>	
				</ul>	
		</li>	
		<li><a	href="#">Item	2</a></li>	
</ul>
Class and Attributes Over
Elements
<ul	class="dropdown	menu"	data-dropdown-menu>	
		<li	class="dropdown-menu-item"	data-dropdown-menu-item>	
				<a	href="#">Item	1</a>	
				<ul	data-dropdown-submenu	class=“menu”>	
						<li	class="dropdown-menu-item"	data-dropdown-menu-item>	
								<a	href="#">Item	1A</a>	
						</li>	
				</ul>	
		</li>	
		<li	class="dropdown-menu-item"	data-dropdown-menu-item>	
				<a	href="#">Item	2</a>	
		</li>	
</ul>
Class and Attributes Over
Elements
• Allows Finer Control
• Allow More Variation
• More Verbose
More Verbose: Too Much Typing?
Facilitate Common Cases
Facilitate Common Cases
<ul	class="dropdown	menu"	data-dropdown-menu>	
		<li>	
				<a	href="#">Item	1</a>	
				<ul	class="menu">	
						<li><a	href="#">Item	1A</a></li>	
				</ul>	
		</li>	
		<li><a	href="#">Item	2</a></li>	
</ul>
Facilitate Common Cases
<ul	class="dropdown	menu	s-dropdown-menu"	data-
dropdown-menu	data-dropdown-menu-implicit>	
		<li>	
				<a	href="#">Item	1</a>	
				<ul	class="menu">	
						<li><a	href="#">Item	1A</a></li>	
				</ul>	
		</li>	
		<li><a	href="#">Item	2</a></li>	
</ul>
Lets Review
Flexible UI Components
• Components Should Be State Driven
• Coupling Should Be Event Driven
• Components Should Be “DOM Flexible”
Re-imagining the model
of UI Frameworks
Component Libraries
are Developer Utilities
The Old Model
Component Libraries
are Developer Utilities
The Old Model
The New Model
• Put User Experience First
• Enable Shared Language Between Design &
Development
• Enable Consistency Across All Brand Faces
Component Libraries…
How Do We Get There?
1. Recognize UI/UX as a primary concern.
2. Advocate against JS Framework elitism
3. UI Frameworks need more JavaScript experts involved.
4. JavaScript Frameworks need more designers involved.
How Do We Get There?
Questions?
Thank you!
@kbal11
kball@zendev.com
https://zendev.com

More Related Content

PPTX
How NOT to get lost in the current JavaScript landscape
PDF
Modern javascript
PDF
Smooth Animations for Web & Hybrid
PDF
Developing, building, testing and deploying react native apps
PPTX
Untangling - fall2017 - week 8
PDF
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
KEY
jQuery Conference Boston 2011 CouchApps
PDF
Write Once, Run Everywhere - Ember.js Munich
How NOT to get lost in the current JavaScript landscape
Modern javascript
Smooth Animations for Web & Hybrid
Developing, building, testing and deploying react native apps
Untangling - fall2017 - week 8
Michael North "Ember.js 2 - Future-friendly ambitious apps, that scale!"
jQuery Conference Boston 2011 CouchApps
Write Once, Run Everywhere - Ember.js Munich

What's hot (19)

PDF
Webcomponents are your frameworks best friend
PDF
Frameworks and webcomponents
PDF
Modern websites in 2020 and Joomla
PDF
How to Use WebVR to Enhance the Web Experience
KEY
New Perspectives on Performance
KEY
AJAX & jQuery - City University WAD Module
PDF
Choosing the best JavaScript framework/library/toolkit
PDF
PLAT-8 Spring Web Scripts and Spring Surf
KEY
Freelancing and side-projects on Rails
PDF
Avoiding Common Pitfalls in Ember.js
PPTX
Saving Time By Testing With Jest
PDF
APIs: A Better Alternative to Page Objects
PDF
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
PPTX
No Container: a Modern Java Stack with Bootique
PPT
Java EE revisits design patterns
PPTX
Maven
PDF
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
PPT
High Availability Perl DBI + MySQL
KEY
Capybara-Webkit
Webcomponents are your frameworks best friend
Frameworks and webcomponents
Modern websites in 2020 and Joomla
How to Use WebVR to Enhance the Web Experience
New Perspectives on Performance
AJAX & jQuery - City University WAD Module
Choosing the best JavaScript framework/library/toolkit
PLAT-8 Spring Web Scripts and Spring Surf
Freelancing and side-projects on Rails
Avoiding Common Pitfalls in Ember.js
Saving Time By Testing With Jest
APIs: A Better Alternative to Page Objects
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
No Container: a Modern Java Stack with Bootique
Java EE revisits design patterns
Maven
Engage 2015 - 10 Mistakes You and Every XPages Developer Make. Yes, I said YOU!
High Availability Perl DBI + MySQL
Capybara-Webkit
Ad

Similar to Flexible UI Components for a Multi-Framework World (20)

KEY
NinjaScript 2010-10-14
PDF
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
PDF
React.js - and how it changed our thinking about UI
PPTX
jQuery Conference Austin Sept 2013
PPTX
JavaScript for ASP.NET programmers (webcast) upload
KEY
NinjaScript and Mizugumo 2011-02-05
PDF
React && React Native workshop
PPTX
Wheel.js
PPTX
React.js at Cortex
PPTX
Comparing Angular and React JS for SPAs
PPTX
jQuery Mobile
PPTX
Jquery Mobile
KEY
Beginning jQuery Mobile
PPTX
Getting started with jQuery
PPTX
React basic by Yoav Amit, Wix
PDF
From MEAN to the MERN Stack
PDF
Web app with j query &amp; javascript (5:4)
PDF
Introduction to Web Components
PDF
JQuery mobile
PDF
jQuery: The World's Most Popular JavaScript Library Comes to XPages
NinjaScript 2010-10-14
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
React.js - and how it changed our thinking about UI
jQuery Conference Austin Sept 2013
JavaScript for ASP.NET programmers (webcast) upload
NinjaScript and Mizugumo 2011-02-05
React && React Native workshop
Wheel.js
React.js at Cortex
Comparing Angular and React JS for SPAs
jQuery Mobile
Jquery Mobile
Beginning jQuery Mobile
Getting started with jQuery
React basic by Yoav Amit, Wix
From MEAN to the MERN Stack
Web app with j query &amp; javascript (5:4)
Introduction to Web Components
JQuery mobile
jQuery: The World's Most Popular JavaScript Library Comes to XPages
Ad

More from Kevin Ball (6)

PDF
Npm Shrinkwrap
PDF
Understanding the Nesting Structure of the Ember.js View Layer
KEY
Intro to Javascript
KEY
Underscore.js
PDF
Omniauth: Future Proof Your Authentication
KEY
Ruby 1.9 Fibers
Npm Shrinkwrap
Understanding the Nesting Structure of the Ember.js View Layer
Intro to Javascript
Underscore.js
Omniauth: Future Proof Your Authentication
Ruby 1.9 Fibers

Recently uploaded (20)

PDF
Slides World Games Great Redesign Eco Economic Epochs.pdf
PPTX
Going_to_Greece presentation Greek mythology
PPTX
using the citation of Research to create a research
PDF
JuanConnect E-Wallet Guide for new users.pdf
PPTX
Slides World Games Great Redesign Eco Economic Epochs.pptx
DOCX
MLS 113 Medical Parasitology (LECTURE).docx
PPTX
Networking2-LECTURE2 this is our lessons
PPTX
Introduction to networking local area networking
PPSX
AI AppSec Threats and Defenses 20250822.ppsx
PDF
healthwealthtech4all-blogspot-com-2025-08-top-5-tech-innovations-that-will-ht...
PDF
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D
PDF
B2B Marketing mba class material for study
PDF
Testing & QA Checklist for Magento to Shopify Migration Success.pdf
PPTX
IoT Lecture IoT Lecture IoT Lecture IoT Lecture
PPTX
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
PPTX
Data Flows presentation hubspot crm.pptx
PPTX
日本横滨国立大学毕业证书文凭定制YNU成绩单硕士文凭学历认证
PDF
Paper: World Game (s) Great Redesign.pdf
PPTX
Digital Project Mastery using Autodesk Docs Workshops
PDF
The_Decisive_Battle_of_Yarmuk,battle of yarmuk
Slides World Games Great Redesign Eco Economic Epochs.pdf
Going_to_Greece presentation Greek mythology
using the citation of Research to create a research
JuanConnect E-Wallet Guide for new users.pdf
Slides World Games Great Redesign Eco Economic Epochs.pptx
MLS 113 Medical Parasitology (LECTURE).docx
Networking2-LECTURE2 this is our lessons
Introduction to networking local area networking
AI AppSec Threats and Defenses 20250822.ppsx
healthwealthtech4all-blogspot-com-2025-08-top-5-tech-innovations-that-will-ht...
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D
B2B Marketing mba class material for study
Testing & QA Checklist for Magento to Shopify Migration Success.pdf
IoT Lecture IoT Lecture IoT Lecture IoT Lecture
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
Data Flows presentation hubspot crm.pptx
日本横滨国立大学毕业证书文凭定制YNU成绩单硕士文凭学历认证
Paper: World Game (s) Great Redesign.pdf
Digital Project Mastery using Autodesk Docs Workshops
The_Decisive_Battle_of_Yarmuk,battle of yarmuk

Flexible UI Components for a Multi-Framework World