Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Design Systems and Component Based Frontend

Design Systems and Component Based Frontend

Bilal Çınarlı

June 27, 2019
Tweet

More Decks by Bilal Çınarlı

Other Decks in Programming

Transcript

  1. Harmony from Intuit, GEL – Global Experience Language from BBC,

    Material from Google, Lightning from Salesforce, AirBNB’s Visual Language, Joystick from EA, Fluent from Microsoft, Plasma from WeWork, Polaris from Shopify, Lonely Planet, Swarm from Meetup, Canvas from Hubspot …and aDL from Adidas
  2. A collection of reusable components, guided by clear standards, that

    can be assembled together to build any number of applications.
  3. Components define areas of responsibility in your UI that let

    you reuse these sets of UI functionality.
  4. It’s an abstraction that allows us to build large-scale applications

    composed of small, self-contained, and often reusable components.
  5. Think of everything is sort-of a pluggable component. In most

    cases, when you remove it, you should expect no traces left.
  6. // DON’T . !"" controllers | !"" cart.js | #""

    checkout.js !"" models | !"" cart.js | #"" checkout.js #"" views !"" cart.pug #"" checkout.pug // DO . !"" cart | !"" index.js | #"" template.pug #"" checkout !"" index.js #"" template.pug
  7. // add test specs . !"" cart | !"" index.js

    | !"" test.spec.js | #"" template.pug #"" checkout !"" index.js !"" test.spec.js #"" template.pug
  8. . !"" config | !"" index.js | #"" server.js !""

    scripts | !"" build.sh | #"" post-install.sh !"" test | !"" index.js | #"" setup.spec.js !"" cart | !"" index.js | !"" test.spec.js | #"" template.pug #"" checkout !"" index.js !"" test.spec.js #"" template.pug
  9. // DON’T <p style="margin: 10px 0; padding: 0;">Hello World! </p>

    // DO .content-text { margin: 10px 0; padding: 0; } <p class="content- text">Hello World!</p>
  10. // DON’T #main .article .title span { font-size: 32px; font-weight:

    bold; } // DO .main-article-title { font-size: 32px; font-weight: bold; }
  11. // DON’T .content { display: flex; max-width: 1280px; margin: 0

    auto; } .article { width: 900px; } .supplementary { width: 380px; } @media screen and (min-width: 48.0625em) and (max-width: 64em) { .article { width: 644px; } } @media screen and (max-width: 48em) { .content { flex-direction: column; } .article, .supplementary { width: 100%; } } // DO .content { max-width: 1280px; margin: 0 auto; } @media screen and (min-width: 48.0625em) { .content { display: flex; } .article { flex: 1; } .supplementary { width: 380px; } }
  12. Web components are a set of web platform APIs that

    allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps.
  13. Custom components and widgets build on the Web Component standards,

    will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML.
  14. Good part, all JS frameworks outputs to HTML. Theoretically, we

    can use any popular JS library to create Web Components