A presentation at Ask the Expert Meetup by Horacio Gonzalez
Futureproof Design Systems with Web Components Horacio Gonzalez 2020-06-22
Who are we? Introducing myself and introducing OVH OVHcloud
Horacio Gonzalez @LostInBrittany Spaniard lost in Brittany, developer, dreamer and all-around geek Flutter
OVHcloud: A Global Leader 200k Private cloud VMs running 1 Dedicated IaaS Europe 30 Datacenters Own 20Tbps Hosting capacity : 1.3M Physical Servers 360k Servers already deployed Netwok with 35 PoPs
1.3M Customers in 138 Countries
OVHcloud: 4 Universes of Products WebCloud Domain / Email Domain names, DNS, SSL, Redirect Email, Open-Xchange, Exchange Baremetal Cloud VM General Purpose Baremetal SuperPlan T2 >20e Virtualization T3 >80e Storage PaaS for Web Mutu, CloudWeb Compute Standalone, Cluster Game Collaborative Tools, NextCloud Database T4 >300e Bigdata T5 >600e HCI Plesk, CPanel AI PaaS with Platform.sh VDI Cloud Game Public Cloud 12KVA /32KVA Hosted Private Cloud K8S, IA IaaS PaaS for DevOps Storage File, Block, Object, Archive Databases SQL, noSQL, Messaging, Dashboard Network Virtual servers VPS, Dedicated Server Network VPS aaS pCC DC SaaS CRM, Billing, Payment, Stats IP FO, NAT, LB, VPN, Router, DNS, DHCP, TCP/SSL Offload Virtuozzo Cloud Security Wordpress, Magento, Prestashop Wholesales Hosted Private Cloud IAM, MFA, Encrypt, KMS IT Integrators, Cloud Storage, VMware SDDC, vSAN 1AZ / 2AZ vCD, Tanzu, Horizon, DBaaS, DRaaS Nutanix HCI 1AZ / 2AZ, Databases, DRaaS, VDI OpenStack IAM, Compute (VM, K8S) Stortage, Network, Databases Storage Ontap Select, Nutanix File OpenIO, MinIO, CEPH Zerto, Veeam, Atempo AI ElementAI, HuggingFace, Deepopmatic, Systran, EarthCube Bigdata / Analitics / ML Cloudera over S3, Dataiku, Saagie, Tableau, MarketPlace CDN, Database, ISV, WebHosting Support, Managed High Intensive CPU/GPU, Support Basic Encrypt Support thought Partners KMS, HSM Managed services Encrypt (SGX, Network, Storage) IA, DL Hybrid Cloud Standard Tools for AI, AI Studio, vRack Connect, Edge-DC, Private DC IA IaaS, Hosting API AI Dell, HP, Cisco, OCP, MultiCloud Bigdata, ML, Analytics Datalake, ML, Dashboard Secured Cloud GOV, FinTech, Retail, HealtCare
Disclaimer Before going further…
A talk for devs by a dev I am not a designer, neither I play one on TV…
Design isn’t only look and feel Look and feel must be a emanation of brand’s ethos, values and spirit
Example
Design principles Grounding principles and values emanating from the brand ethos, shared by everybody around the product.
Example of Design Principles: Pinterest https://medium.com/@suprb/redesigning-pinterest-block-by-block-6040a00d80a3
Example of Design Principles: gov.uk https://www.gov.uk/guidance/government-design-principles
Functional Patterns Functional patterns are the building blocks of the user interface. They must guide and facilitate user’s behavior.
Functional Patterns Example: Netflix
Perceptual Patterns Perceptual patterns are visual elements defining the look of the product: typography, color palette, illustration styles, layout shapes, textures… They should help to express the brand image.
Perceptual Patterns Example: Slack
Shared Languages A product team need to share a pattern language based on design principles, to create a coherent set of functional and perceptual patterns.
Shared Languages Example: Future Learn
So, what are Design Systems? And why should I look at them?
The same or different?
Style Guides A document listing the styles, patterns, practices, and principles of a brand design standards
Style Guides Style guides define the application’s look and feel
Style Guide Example: Uber https://brand.uber.com/
Style Guide Example: Medium https://www.behance.net/gallery/7226653/Medium-Brand-Development
Style Guides alone are ambiguous Interpretation needed to adapt the preconisation to the use case
Component Catalogs A component catalog is a repository of components, with one or several implementations, code examples and technical documentation
Component Catalog example: Bootstrap https://getbootstrap.com/
Component Catalog Example: ING’s Lion https://lion-web-components.netlify.app/
Component Catalogs alone create inconsistency Like using the same LEGO bricks to create very different objects
Design Systems A Design System is like a common visual language for product teams
Design systems A Design System is a set of design standards, documentations, and principles, alongside with the toolkit (UI patterns and code components) to achieve those standards
Design systems
Example: Carbon Design System https://www.carbondesignsystem.com/
Example: Firefox’s Photon Design System https://design.firefox.com/photon/
Example: Material Design https://material.io/
The component catalog The poor relative of the Design System family
Let’s choose a simple example Bootstrap based component catalogs
A long time ago Components were defined in HTML, CSS and some jQuery
Then it was AngularJS time… And new reference implementations were needed
But you know the sad story… All UI Bootstrap based catalogs woke up with an obsolete implementation
Worry no more, let’s do Angular! ng-bootstrap to the rescue
But times had changed… In 2017 Angular is only one more in the clique
TM React is the new Big Thing So let’s build React Bootstrap…
Wait, what about Vue? We also need BootstrapVue
OK, I think you see my point…
Most Design System do a choice Either they choose a by canonical implementation or they ship and maintain several implementations
Both choices are problematic Shipping only one implementation: Web dev ecosystem changes quickly and almost nobody keeps the same framework for years…
Both choices are problematic Shipping several implementations: You need to maintain all the implementation… and you still miss some others
Incomplete catalogs are problematic People will need to recode the components in their chosen framework… Coherence is not guaranteed!!!
Example: Carbon Design System
The 3 minutes context What the heck are web component?
Web Components Web standard W3C
Web Components Available in all modern browsers: Firefox, Safari, Chrome
Web Components Create your own HTML tags Encapsulating look and behavior
Web Components Fully interoperable With other web components, with any framework
Web Components CUSTOM ELEMENTS SHADOW DOM TEMPLATES
Custom Element To define your own HTML tag <body> … <script> window.customElements.define(‘my-element’, class extends HTMLElement {…}); </script> <my-element></my-element> </body>
Shadow DOM To encapsulate subtree and style in an element <button>Hello, world!</button> <script> var host = document.querySelector(‘button’); const shadowRoot = host.attachShadow({mode:’open’}); shadowRoot.textContent = ‘こんにちは、影の世界!’; </script>
Template To have clonable document template <template id=”mytemplate”> <img src=”” alt=”great image”> <div class=”comment”></div> </template> var t = document.querySelector(‘#mytemplate’); // Populate the src at runtime. t.content.querySelector(‘img’).src = ‘logo.png’; var clone = document.importNode(t.content, true); document.body.appendChild(clone);
But in fact, it’s just an element… ● Attributes ● Properties ● Methods ● Events
Web Components are a web standard Web Components everywhere, baby!
Do you remember AngularJS? And all the code put in the trash bin when Angular arrived…
The pain of switching frameworks? Rewriting once again your code…
The impossibility of sharing UI code? Between apps written with different frameworks
Web Components change that In a clean and standard way
They are truly everywhere 🚀 🚀 Even in the spaaaaaaaace 🚀
Web Components & Design Systems A match made in heaven
You can have a single implementation And it simply works everywhere
When you need interoperability Nothing beats the standard
One more thing…* Let’s copy from the master
Stencil is not so important WebComponents ARE
Use the Platform, Luke… WebComponents ARE native
Do you love your framework? Oh yeah, we all do
Would you marry your framework? Like until death…
How much does cost the divorce? Do you remember when you dropped AngularJS for Angular?
Why recode everything again? Reuse the bricks in your new framework
Lots of web components libraries LitElement SkateJS
And some good news Angular Elements Vue Web Component Wrapper Frameworks begin to understand it
So for your next app Choose a framework, no problem… But please, help your future self Use Web Components!
Conclusion That’s all, folks!
When you talk about Design System, you should think about webcomponents. Come to understand how you will create the best design system that will survive to the future! Best Practives, tools, ….
The following resources were mentioned during the presentation or are useful additional information.