SlideShare a Scribd company logo
1 of 68
Download to read offline
MANAGING COMPLEX PROJECTS 
WITH DESIGN COMPONENTS 
J O H N A L B I N W I L K I N S 
F R O N T - E N D T R A C K — O C T O B E R 1 , 2 0 1 4
@JOHNALBIN 
Senior Front-end Developer
FREE GIFTS FROM ME 
Zen Grids 
zengrids.com 
! 
Normalize.css for Sass/Compass 
github.com/JohnAlbin/normalize-scss 
Succinct theme for Colloquy (IRC for Mac) 
github.com/JohnAlbin/succinct-for-colloquy 
git-svn-migrate 
john.albin.net/git/git-svn-migrate 
Zen theme for Drupal 
drupal.org/project/zen
TRIGGER ALERT 
This session will mention the word: 
AGILE
WHERE ARE WE HEADED?
“ARE YOU NEW TO 
FRONT-END WEB DEVELOPMENT? 
HERE’S A SECRET: 
NO ONE ELSE REALLY KNOWS 
WHAT THEY’RE DOING EITHER.” 
– N I C O L A S G A L L AG H E R 
January, 2013
WHAT THE HELL IS GOING ON? 
Process Technology
IS THERE A BIGGER PICTURE? 
Vagrant Twig / Handlerbars 
Grunt/Gulp 
task runner 
Jenkins / CI 
build tools 
npm shrinkwrap / Bundler 
Web Components 
CSS frameworks 
Bootstrap / Foundation 
CSS/JS linting 
Yeoman / Bower! 
scaffolding tools 
Behat / Selenium 
regression testing 
Sass / Less
IS THERE A BIGGER PICTURE? 
Vagrant Twig / Handlerbars 
Grunt/Gulp 
task runner 
Component 
Jenkins / CI 
build tools 
npm shrinkwrap / Bundler 
Travis 
Web Components 
CSS frameworks 
Bootstrap / Foundation 
CSS/JS linting 
Yeoman / Bower! 
scaffolding tools 
Behat / Selenium 
regression testing 
Sass / Less 
YSlow 
PageSpeed 
Cucumber 
KSS Wraith 
Web Starter Kit 
CSSLoad 
Node.js
IS THERE A BIGGER PICTURE? 
Continuous 
Integration 
Component 
Library
IS THERE A BIGGER PICTURE? 
Continuous 
Integration 
Component 
Library 
are documented by! 
style guides 
Agile Development! 
requires
WATERFALL PROJECT 
Plan 
Design 
Develop 
Theme 
Start Deadline
WATERFALL PROJECT 
Plan 
: 
Design 
: 
Develop 
: 
Theme 
Today 
: 
Start Deadline
Agile development
Reduce your risk 
by controlling/minimizing your risk
AGILE PROJECT 
Feature backlog 
Feature #1 
Feature #2 
Feature #3 
Feature #4 
Feature #5 
Feature #6 
Feature #7 
Feature #8 
Feature #9 
Feature #10 
Start 
Deadline 
Sprint Sprint Sprint Sprint Sprint Sprint Sprint
AGILE PROJECT 
Each 2-week sprint: 
• Prioritizes project goals 
• Completes a set of features 
• Creates a releasable product 
Feature backlog 
Feature #1 
Feature #2 
Feature #3 
Feature #4 
Feature #5 
Feature #6 
Feature #7 
Feature #8 
Feature #9 
Feature #10 
Start 
Deadline 
Sprint Sprint Sprint Sprint Sprint Sprint Sprint
AGILE + WEB = ? 
Component-based design 
+ 
Automated style guides
STYLEGUIDE-DRIVEN DEVELOPMENT: 
THE NEW WEB DEVELOPMENT 
J O H N A L B I N W I L K I N S 
F R O N T - E N D T R A C K — O C T O B E R 1 , 2 0 1 4
STYLE GUIDE DRIVEN DEVELOPMENT 
Only requirements are: 
Component-based design 
and 
Automated style guides
What are we doing 
wrong?
CSS SPECIFICITY 
WARS
CSS SPECIFICITY 
WARS 
.menu .item a:link {}! 
.sidebar .menu .item a:link {}! 
.page-37 .sidebar .menu .item a:link {}
CSS SPECIFICITY 
WARS 
.menu .item a:link {! 
.sidebar & {! 
.page-37 & {}! 
}! 
}
OVERLY GENERIC CLASS NAMES 
.title&{&} 
.block&.title&{&} 
.node&.title&{&} 
.views&.title&{&} 
.content&{&} 
.block&.content&{&} 
.node&.content&{&} 
.views&.content&{&}
SEEMED LIKE A GOOD IDEA 
AT THE TIME
WHAT IS A DESIGN COMPONENT? 
“Component” is the same as… 
⨯ “Object” in OOCSS 
⨯ “Module” in SMACSS 
⨯ “Block” in BEM’s Block-Element-Modifier 
⨯ “UI Pattern”
CSS DESI GN COMPONENTS ARE: 
⨯ Applied to a loose collection of HTML elements 
⨯ Repeatable 
(even if never repeated) 
⨯ Specific 
Replace CSS specificity with specific names 
⨯ Self contained 
Styles do not bleed onto anything else 
⨯ Nest-able
SMACSS 
1.BASE 
2.LAYOUT 
3.MODULE 
4.STATE 
5.THEME
SMACSS 
1.BASE 
2.LAYOUT 
3.COMPONENTS 
4.STATE 
5.SKIN 
1.BASE 
2.LAYOUT 
3.MODULE 
4.STATE 
5.THEME
SMACSS 
1.BASE 
2.LAYOUT 
3.COMPONENTS 
4.STATE 
5.SKIN
SMACSS 
1.BASE 
2.LAYOUT 
3.COMPONENTS 
3.1.STATE 
3.2.SKIN
SMACSS 
BEM 
} 
1.BASE 
2.LAYOUT 
3.COMPONENTS 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFIER 
3.4.STATE 
3.5.SKIN
“You see, radio is a kind 
of a very, very long . cat.
You pull his tail in New 
York and his head is 
meowing in Los Angeles.
Do you understand this? 
You send signals here, they 
receive them there. The 
only difference is that…
…there is no cat.” 
— Albert Einstein
.flower 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFI ER 
3.4.STATE 
3.5.SKIN
.flower_ _ petals 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFI ER 
3.4.STATE 
3.5.SKIN
.flower_ _face .flower_ _stem 
.flower_ _leaves
.flower_ _ bed 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFI ER 
3.4.STATE 
3.5.SKIN
.flower--tulip 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFI ER 
3.4.STATE 
3.5.SKIN
Don’t make it complicated 
.channel-tab_ _guide_ _upcoming-
Don’t make it complicated 
guide_ _upcoming-video_ _info_ _time
On semantic naming 
⨯ Content semantics 
are handled by HTML5 elements 
⨯ Let’s make our class names use 
Design semantics 
⨯ Class names should be meaningful to 
developers and designers
.flower:hover 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFIER 
3.4.STATE 
3.5.SKIN
.flower.is-pollinating 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFIER 
3.4.STATE 
3.5.SKIN
@media (min-width: 48em) { .flower } 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFIER 
3.4.STATE 
3.5.SKIN
@media print { .flower } 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFIER 
3.4.STATE 
3.5.SKIN
.is-night .flower 
! 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFIER 
3.4.STATE 
3.5.SKIN ( global modfier )
.flower 
An automated 
style guide of 
.flower is available: 
! 
johnalbin.github.io/flower-power
All the selectors 
.the3component& 
.the3component33modifier& 
.the3component__an3element& 
.the3component33modifier__an3element& 
.the3component.is3state& 
& .the3component:hover& 
& @media&all&{&.the3component&{}&}& 
.the3skin&.the3component
CSS DESI GN COMPONENTS ARE: 
⨯ Applied to a loose collection of HTML elements 
⨯ Repeatable 
(even if never repeated) 
⨯ Specific 
Replace CSS specificity with specific names 
⨯ Self contained 
Styles do not bleed onto anything else 
⨯ Nest-able
SMACSS 
BEM 
} 
1.BASE 
2.LAYOUT 
3.COMPONENTS 
3.1.COMPONENT 
3.2.ELEMENT 
3.3.MODIFIER 
3.4.STATE 
3.5.SKIN
Drupal 8 CSS coding standards 
www.drupal.org/node/1886770
FILE ORGANIZATION = 3 SMACSS CATEGORIES
SIMPLE SASS SETUP
STYLES.SCSS
SIMPLE FOLDER STRUCTURE
EASY TO FIND YOUR COMPONENTS. 
⨯ Inspect the DOM. 
⨯ Find the CSS class on the 
component. 
⨯ Look for a file with that 
name in the components 
folder.
THE “Fugly” SELECTOR HACK
THE “Fugly” SELECTOR HACK 
Selector in DOM 
I couldn’t change 
Class name I wish 
I could use in DOM
AUTOMATED STYLE GUIDE 
kss-node 
github.com/kss-node/kss-node
AUTOMATED STYLE GUIDE
WHAT DID YOU THINK? 
E V A U L A T E T H I S S E S S I O N - A M S T E R D A M 2 0 1 4 . D R U P A L . O R G / S C H E D U L E 
THANK YO U!

More Related Content

What's hot

The Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect ContentThe Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect Content
Dave Olsen
 

What's hot (20)

MIMA 2014 - Changing your Responsive Design Workflow
MIMA 2014 - Changing your Responsive Design WorkflowMIMA 2014 - Changing your Responsive Design Workflow
MIMA 2014 - Changing your Responsive Design Workflow
 
Data science for infrastructure dev week 2022
Data science for infrastructure   dev week 2022Data science for infrastructure   dev week 2022
Data science for infrastructure dev week 2022
 
Atomic Design
Atomic Design Atomic Design
Atomic Design
 
Atomic Design con Pattern Lab
Atomic Design con Pattern LabAtomic Design con Pattern Lab
Atomic Design con Pattern Lab
 
Building the Media Block in ReactJS
Building the Media Block in ReactJS Building the Media Block in ReactJS
Building the Media Block in ReactJS
 
ACSS: Rethinking CSS Best Practices
ACSS: Rethinking CSS Best PracticesACSS: Rethinking CSS Best Practices
ACSS: Rethinking CSS Best Practices
 
Creating Style Guides with Modularity in Mind
Creating Style Guides with Modularity in MindCreating Style Guides with Modularity in Mind
Creating Style Guides with Modularity in Mind
 
Documenting an Atomic Design System with Jekyll
Documenting an Atomic Design System with JekyllDocumenting an Atomic Design System with Jekyll
Documenting an Atomic Design System with Jekyll
 
An introduction to Emulsify
An introduction to EmulsifyAn introduction to Emulsify
An introduction to Emulsify
 
Brad frost: Atomic design (Webdagene 2014)
Brad frost: Atomic design (Webdagene 2014)Brad frost: Atomic design (Webdagene 2014)
Brad frost: Atomic design (Webdagene 2014)
 
Voorhoede - Front-end architecture
Voorhoede - Front-end architectureVoorhoede - Front-end architecture
Voorhoede - Front-end architecture
 
Responsive Design Workflow: Mobilism 2012
Responsive Design Workflow: Mobilism 2012Responsive Design Workflow: Mobilism 2012
Responsive Design Workflow: Mobilism 2012
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)
 
The Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect ContentThe Death of Lorem Ipsum & Pixel Perfect Content
The Death of Lorem Ipsum & Pixel Perfect Content
 
Responsive Design Workflow
Responsive Design WorkflowResponsive Design Workflow
Responsive Design Workflow
 
SEO Before Yoast: WordCamp Rhode Island
SEO Before Yoast: WordCamp Rhode IslandSEO Before Yoast: WordCamp Rhode Island
SEO Before Yoast: WordCamp Rhode Island
 
WordCamp Baltimore 2016
WordCamp Baltimore 2016WordCamp Baltimore 2016
WordCamp Baltimore 2016
 
How to Make WordPress Your Friend
How to Make WordPress Your FriendHow to Make WordPress Your Friend
How to Make WordPress Your Friend
 
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
Hardening WordPress - SAScon Manchester 2013 (WordPress Security)
 
Beginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentBeginning WordPress Plugin Development
Beginning WordPress Plugin Development
 

Viewers also liked

Living Styleguide: design and development workflows
Living Styleguide: design and development workflowsLiving Styleguide: design and development workflows
Living Styleguide: design and development workflows
Fabio Fabbrucci
 

Viewers also liked (9)

Living Styleguide: design and development workflows
Living Styleguide: design and development workflowsLiving Styleguide: design and development workflows
Living Styleguide: design and development workflows
 
BeHeard Styleguide
BeHeard StyleguideBeHeard Styleguide
BeHeard Styleguide
 
Responsive Web Design Retrospective
Responsive Web Design RetrospectiveResponsive Web Design Retrospective
Responsive Web Design Retrospective
 
The Adobe Legal Department Style Guide
The Adobe Legal Department Style GuideThe Adobe Legal Department Style Guide
The Adobe Legal Department Style Guide
 
A Guide for Preparing and Facilitating Retrospectives
A Guide for Preparing and Facilitating RetrospectivesA Guide for Preparing and Facilitating Retrospectives
A Guide for Preparing and Facilitating Retrospectives
 
The History of Graphic Design
The History of Graphic DesignThe History of Graphic Design
The History of Graphic Design
 
The Art of the Retrospective: How to run an awesome retrospective meeting
The Art of the Retrospective: How to run an awesome retrospective meetingThe Art of the Retrospective: How to run an awesome retrospective meeting
The Art of the Retrospective: How to run an awesome retrospective meeting
 
Adobe Digital Insights: Mobile Landscape A Moving Target
Adobe Digital Insights: Mobile Landscape A Moving TargetAdobe Digital Insights: Mobile Landscape A Moving Target
Adobe Digital Insights: Mobile Landscape A Moving Target
 
A Celebration Of Women In Marketing
A Celebration Of Women In MarketingA Celebration Of Women In Marketing
A Celebration Of Women In Marketing
 

Similar to Styleguide-Driven Development: The New Web Development

Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
elliando dias
 

Similar to Styleguide-Driven Development: The New Web Development (20)

KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address them
 
Pain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr SugakPain Driven Development by Alexandr Sugak
Pain Driven Development by Alexandr Sugak
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0
 
Automate Yo' Self
Automate Yo' SelfAutomate Yo' Self
Automate Yo' Self
 
He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!
 
How to write an application and not roll down to 1 fps
How to write an application and not roll down to 1 fpsHow to write an application and not roll down to 1 fps
How to write an application and not roll down to 1 fps
 
Ember Reusable Components and Widgets
Ember Reusable Components and WidgetsEmber Reusable Components and Widgets
Ember Reusable Components and Widgets
 
Rethinking Best Practices
Rethinking Best PracticesRethinking Best Practices
Rethinking Best Practices
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
 
SCSS Styleguide
SCSS StyleguideSCSS Styleguide
SCSS Styleguide
 
WordPress theme frameworks
WordPress theme frameworksWordPress theme frameworks
WordPress theme frameworks
 
JS Lab`16. Владимир Воевидка: "Как работает браузер"
JS Lab`16. Владимир Воевидка: "Как работает браузер"JS Lab`16. Владимир Воевидка: "Как работает браузер"
JS Lab`16. Владимир Воевидка: "Как работает браузер"
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To Know
 
Taking your Web App for a walk
Taking your Web App for a walkTaking your Web App for a walk
Taking your Web App for a walk
 
Slim3 quick start
Slim3 quick startSlim3 quick start
Slim3 quick start
 
Google Glass Mirror API Setup
Google Glass Mirror API SetupGoogle Glass Mirror API Setup
Google Glass Mirror API Setup
 
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
 

More from John Albin Wilkins

More from John Albin Wilkins (19)

Using the CSS Nesting Spec Today
Using the CSS Nesting Spec TodayUsing the CSS Nesting Spec Today
Using the CSS Nesting Spec Today
 
The Drupal Roadmap: From D7 to D9
The Drupal Roadmap: From D7 to D9The Drupal Roadmap: From D7 to D9
The Drupal Roadmap: From D7 to D9
 
Mastering Drupal 8’s Twig
Mastering Drupal 8’s TwigMastering Drupal 8’s Twig
Mastering Drupal 8’s Twig
 
CSS-in-JS: unexpected lessons for Drupal component design
CSS-in-JS: unexpected lessons for Drupal component designCSS-in-JS: unexpected lessons for Drupal component design
CSS-in-JS: unexpected lessons for Drupal component design
 
DrupalSouth 2014: Managing Complex Projects with Design Components
DrupalSouth 2014: Managing Complex Projects with Design ComponentsDrupalSouth 2014: Managing Complex Projects with Design Components
DrupalSouth 2014: Managing Complex Projects with Design Components
 
SassConf: Managing Complex Projects with Design Components
SassConf: Managing Complex Projects with Design ComponentsSassConf: Managing Complex Projects with Design Components
SassConf: Managing Complex Projects with Design Components
 
Drupal Camp Taipei Keynote
Drupal Camp Taipei KeynoteDrupal Camp Taipei Keynote
Drupal Camp Taipei Keynote
 
Become an IA superstar (Chinese version)
Become an IA superstar (Chinese version)Become an IA superstar (Chinese version)
Become an IA superstar (Chinese version)
 
Mobile drupal: building a mobile theme
Mobile drupal: building a mobile themeMobile drupal: building a mobile theme
Mobile drupal: building a mobile theme
 
Sass: CSS with Attitude
Sass: CSS with AttitudeSass: CSS with Attitude
Sass: CSS with Attitude
 
Mastering zen
Mastering zenMastering zen
Mastering zen
 
Drupal and the Future of the Web
Drupal and the Future of the WebDrupal and the Future of the Web
Drupal and the Future of the Web
 
What's new in D7 Theming?
What's new in D7 Theming?What's new in D7 Theming?
What's new in D7 Theming?
 
Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...Default theme implementations: a guide for module developers that want sweet ...
Default theme implementations: a guide for module developers that want sweet ...
 
Rocking the Theme Layer
Rocking the Theme LayerRocking the Theme Layer
Rocking the Theme Layer
 
Drupal Design Tips
Drupal Design TipsDrupal Design Tips
Drupal Design Tips
 
New Adventures in Drupal Theming
New Adventures in Drupal ThemingNew Adventures in Drupal Theming
New Adventures in Drupal Theming
 
Nanocon Taiwan
Nanocon TaiwanNanocon Taiwan
Nanocon Taiwan
 
Making Drupal Dance: Techniques for Non-obvious Theme Manipulations
Making Drupal Dance: Techniques for Non-obvious Theme ManipulationsMaking Drupal Dance: Techniques for Non-obvious Theme Manipulations
Making Drupal Dance: Techniques for Non-obvious Theme Manipulations
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 

Styleguide-Driven Development: The New Web Development

  • 1. MANAGING COMPLEX PROJECTS WITH DESIGN COMPONENTS J O H N A L B I N W I L K I N S F R O N T - E N D T R A C K — O C T O B E R 1 , 2 0 1 4
  • 3. FREE GIFTS FROM ME Zen Grids zengrids.com ! Normalize.css for Sass/Compass github.com/JohnAlbin/normalize-scss Succinct theme for Colloquy (IRC for Mac) github.com/JohnAlbin/succinct-for-colloquy git-svn-migrate john.albin.net/git/git-svn-migrate Zen theme for Drupal drupal.org/project/zen
  • 4. TRIGGER ALERT This session will mention the word: AGILE
  • 5. WHERE ARE WE HEADED?
  • 6. “ARE YOU NEW TO FRONT-END WEB DEVELOPMENT? HERE’S A SECRET: NO ONE ELSE REALLY KNOWS WHAT THEY’RE DOING EITHER.” – N I C O L A S G A L L AG H E R January, 2013
  • 7. WHAT THE HELL IS GOING ON? Process Technology
  • 8. IS THERE A BIGGER PICTURE? Vagrant Twig / Handlerbars Grunt/Gulp task runner Jenkins / CI build tools npm shrinkwrap / Bundler Web Components CSS frameworks Bootstrap / Foundation CSS/JS linting Yeoman / Bower! scaffolding tools Behat / Selenium regression testing Sass / Less
  • 9. IS THERE A BIGGER PICTURE? Vagrant Twig / Handlerbars Grunt/Gulp task runner Component Jenkins / CI build tools npm shrinkwrap / Bundler Travis Web Components CSS frameworks Bootstrap / Foundation CSS/JS linting Yeoman / Bower! scaffolding tools Behat / Selenium regression testing Sass / Less YSlow PageSpeed Cucumber KSS Wraith Web Starter Kit CSSLoad Node.js
  • 10. IS THERE A BIGGER PICTURE? Continuous Integration Component Library
  • 11. IS THERE A BIGGER PICTURE? Continuous Integration Component Library are documented by! style guides Agile Development! requires
  • 12. WATERFALL PROJECT Plan Design Develop Theme Start Deadline
  • 13. WATERFALL PROJECT Plan : Design : Develop : Theme Today : Start Deadline
  • 15. Reduce your risk by controlling/minimizing your risk
  • 16. AGILE PROJECT Feature backlog Feature #1 Feature #2 Feature #3 Feature #4 Feature #5 Feature #6 Feature #7 Feature #8 Feature #9 Feature #10 Start Deadline Sprint Sprint Sprint Sprint Sprint Sprint Sprint
  • 17. AGILE PROJECT Each 2-week sprint: • Prioritizes project goals • Completes a set of features • Creates a releasable product Feature backlog Feature #1 Feature #2 Feature #3 Feature #4 Feature #5 Feature #6 Feature #7 Feature #8 Feature #9 Feature #10 Start Deadline Sprint Sprint Sprint Sprint Sprint Sprint Sprint
  • 18. AGILE + WEB = ? Component-based design + Automated style guides
  • 19. STYLEGUIDE-DRIVEN DEVELOPMENT: THE NEW WEB DEVELOPMENT J O H N A L B I N W I L K I N S F R O N T - E N D T R A C K — O C T O B E R 1 , 2 0 1 4
  • 20. STYLE GUIDE DRIVEN DEVELOPMENT Only requirements are: Component-based design and Automated style guides
  • 21. What are we doing wrong?
  • 23. CSS SPECIFICITY WARS .menu .item a:link {}! .sidebar .menu .item a:link {}! .page-37 .sidebar .menu .item a:link {}
  • 24. CSS SPECIFICITY WARS .menu .item a:link {! .sidebar & {! .page-37 & {}! }! }
  • 25. OVERLY GENERIC CLASS NAMES .title&{&} .block&.title&{&} .node&.title&{&} .views&.title&{&} .content&{&} .block&.content&{&} .node&.content&{&} .views&.content&{&}
  • 26. SEEMED LIKE A GOOD IDEA AT THE TIME
  • 27. WHAT IS A DESIGN COMPONENT? “Component” is the same as… ⨯ “Object” in OOCSS ⨯ “Module” in SMACSS ⨯ “Block” in BEM’s Block-Element-Modifier ⨯ “UI Pattern”
  • 28. CSS DESI GN COMPONENTS ARE: ⨯ Applied to a loose collection of HTML elements ⨯ Repeatable (even if never repeated) ⨯ Specific Replace CSS specificity with specific names ⨯ Self contained Styles do not bleed onto anything else ⨯ Nest-able
  • 29.
  • 30.
  • 31. SMACSS 1.BASE 2.LAYOUT 3.MODULE 4.STATE 5.THEME
  • 32. SMACSS 1.BASE 2.LAYOUT 3.COMPONENTS 4.STATE 5.SKIN 1.BASE 2.LAYOUT 3.MODULE 4.STATE 5.THEME
  • 33. SMACSS 1.BASE 2.LAYOUT 3.COMPONENTS 4.STATE 5.SKIN
  • 34. SMACSS 1.BASE 2.LAYOUT 3.COMPONENTS 3.1.STATE 3.2.SKIN
  • 35. SMACSS BEM } 1.BASE 2.LAYOUT 3.COMPONENTS 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFIER 3.4.STATE 3.5.SKIN
  • 36. “You see, radio is a kind of a very, very long . cat.
  • 37. You pull his tail in New York and his head is meowing in Los Angeles.
  • 38. Do you understand this? You send signals here, they receive them there. The only difference is that…
  • 39. …there is no cat.” — Albert Einstein
  • 40. .flower ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFI ER 3.4.STATE 3.5.SKIN
  • 41. .flower_ _ petals ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFI ER 3.4.STATE 3.5.SKIN
  • 42. .flower_ _face .flower_ _stem .flower_ _leaves
  • 43. .flower_ _ bed ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFI ER 3.4.STATE 3.5.SKIN
  • 44. .flower--tulip ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFI ER 3.4.STATE 3.5.SKIN
  • 45. Don’t make it complicated .channel-tab_ _guide_ _upcoming-
  • 46. Don’t make it complicated guide_ _upcoming-video_ _info_ _time
  • 47. On semantic naming ⨯ Content semantics are handled by HTML5 elements ⨯ Let’s make our class names use Design semantics ⨯ Class names should be meaningful to developers and designers
  • 48. .flower:hover ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFIER 3.4.STATE 3.5.SKIN
  • 49. .flower.is-pollinating ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFIER 3.4.STATE 3.5.SKIN
  • 50. @media (min-width: 48em) { .flower } ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFIER 3.4.STATE 3.5.SKIN
  • 51. @media print { .flower } ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFIER 3.4.STATE 3.5.SKIN
  • 52. .is-night .flower ! 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFIER 3.4.STATE 3.5.SKIN ( global modfier )
  • 53. .flower An automated style guide of .flower is available: ! johnalbin.github.io/flower-power
  • 54. All the selectors .the3component& .the3component33modifier& .the3component__an3element& .the3component33modifier__an3element& .the3component.is3state& & .the3component:hover& & @media&all&{&.the3component&{}&}& .the3skin&.the3component
  • 55. CSS DESI GN COMPONENTS ARE: ⨯ Applied to a loose collection of HTML elements ⨯ Repeatable (even if never repeated) ⨯ Specific Replace CSS specificity with specific names ⨯ Self contained Styles do not bleed onto anything else ⨯ Nest-able
  • 56. SMACSS BEM } 1.BASE 2.LAYOUT 3.COMPONENTS 3.1.COMPONENT 3.2.ELEMENT 3.3.MODIFIER 3.4.STATE 3.5.SKIN
  • 57. Drupal 8 CSS coding standards www.drupal.org/node/1886770
  • 58. FILE ORGANIZATION = 3 SMACSS CATEGORIES
  • 62. EASY TO FIND YOUR COMPONENTS. ⨯ Inspect the DOM. ⨯ Find the CSS class on the component. ⨯ Look for a file with that name in the components folder.
  • 64. THE “Fugly” SELECTOR HACK Selector in DOM I couldn’t change Class name I wish I could use in DOM
  • 65. AUTOMATED STYLE GUIDE kss-node github.com/kss-node/kss-node
  • 67.
  • 68. WHAT DID YOU THINK? E V A U L A T E T H I S S E S S I O N - A M S T E R D A M 2 0 1 4 . D R U P A L . O R G / S C H E D U L E THANK YO U!