Common UI patterns

SOME COMMON PRINCIPLES OF UI
DEVELOPMENT
@SAMSELIKOFF
STATEANY DATA THAT CAN CHANGE IN OUR APP
Common UI patterns
Common UI patterns
Common UI patterns
STATEANY DATA THAT CAN CHANGE IN OUR APP
$('.panel').click(function() {
var body = $('panel-body');
if (body.is(":hidden")) {
body.slideDown();
} else {
body.slideUp();
}
});
MODELS
STATE
EXPLICIT
UI
SUBSCRIBE AND RE-RENDER
DECLARATIVE RENDERING
<h2>
Hello, {{name}}! Here are your messages:
</h2>
{{! template.hbs }}
{{#if isOpen}}
<p>Lorem ipsum dolor</p>
{{/if}}
render() {
return (
<div>
{this.props.isOpen

? <p>Lorem ipsum dolor</p>
: null
}
</div>
);
}
HOW SHOULD WE ORGANIZE OUR APPS?
COMPONENTS
“THINKING IN REACT”
Common UI patterns
COMPOSITION, SEPARATION, ISOLATION, REUSE
WHERE SHOULD WE STORE OUR STATE?
STATE MANAGEMENT
COMPONENT STATE
STATE
HOISTING
STATE
HOISTING
STATE
HOISTING
STATE
HOISTING
STATE MANAGEMENTSINGLE SOURCE OF TRUTH
GLOBAL STATE
SUMMARY
COMMON UI PRINCIPLES
▸ Explicitly identify & store state
▸ Declaratively render your UI from state
▸ Use Components to break up your app
▸ Ensure your data has a single source of truth
THANKS
@SAMSELIKOFF
1 of 30

More Related Content

Similar to Common UI patterns(20)

FamilySearch Reference ClientFamilySearch Reference Client
FamilySearch Reference Client
Dallan Quass571 views
Create a res tful services api in php.Create a res tful services api in php.
Create a res tful services api in php.
Adeoye Akintola921 views
Client-side TransformationsClient-side Transformations
Client-side Transformations
John Boxall228 views
Introduction to PHPIntroduction to PHP
Introduction to PHP
Collaboration Technologies300 views
Mozilla Web Apps - Super-VanJSMozilla Web Apps - Super-VanJS
Mozilla Web Apps - Super-VanJS
Robert Nyman8.9K views
Make WordPress realtime.Make WordPress realtime.
Make WordPress realtime.
Josh Hillier1.6K views
Java Script Isn\'t a Toy AnymoreJava Script Isn\'t a Toy Anymore
Java Script Isn\'t a Toy Anymore
Alexis Williams1.1K views
Frontin like-a-backerFrontin like-a-backer
Frontin like-a-backer
Frank de Jonge10.6K views
Asynchronous InterfacesAsynchronous Interfaces
Asynchronous Interfaces
maccman343 views
React lectureReact lecture
React lecture
Christoffer Noring1.4K views
Angular Tutorial Freshers and ExperiencedAngular Tutorial Freshers and Experienced
Angular Tutorial Freshers and Experienced
rajkamaltibacademy77 views
Practical HTML5: Using It TodayPractical HTML5: Using It Today
Practical HTML5: Using It Today
Doris Chen972 views
Styling components with JavaScriptStyling components with JavaScript
Styling components with JavaScript
bensmithett11.2K views
Vertx - Reactive & DistributedVertx - Reactive & Distributed
Vertx - Reactive & Distributed
Orkhan Gasimov537 views
Discover AngularJSDiscover AngularJS
Discover AngularJS
Fabien Vauchelles873 views

Common UI patterns