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

Tech Talk: Create varied applications with Svelte

Tech Talk: Create varied applications with Svelte

Camunda Tech Talk 18th August 2020

Niklas Kiefer

August 18, 2020
Tweet

More Decks by Niklas Kiefer

Other Decks in Programming

Transcript

  1. 2 What to get from the next couple of minutes?

    Why varied applications are important How to use dynamic components How to use variant toggles How to use noop functions How to build this stuff with Svelte
  2. 11 Varied application Web Application Component A Component B Component

    D Component E Component C n Variants of Prototypes Components differ in certain aspects
  3. 14 Dynamic components Web Application Component A Component B Component

    D Component E Component C n Variants of Prototypes Components differ in certain aspects
  4. 15 Dynamic components Web Application Component A Component B props.componentD

    Component E props.componentC n Variants of Prototypes
  5. 16 Dynamic components Web Application Component A Component B props.componentD

    Component E props.componentC n Variants of Prototypes Variant A Component C Component D Variant B Component C Component D Variant C Component C Component D
  6. 18 Variants Toggle Web Application Component A Component B props.componentD

    Component E props.componentC n Variants of Prototypes Variant A Component C Component D Variant B Component C Component D Variant C Component C Component D Variants Toggle
  7. 21 Noop components / functions Web Application Component A Component

    B props.componentD Component E props.componentC n Variants of Prototypes Variant A Component C Component D Variant B Component C Component D Variant C Component C noop Variants Toggle
  8. 22 Noop components / functions “Instead of using a null

    reference to convey absence of an object (for instance, a non-existent customer), one uses an object which implements the expected interface, but whose method body is empty. “ -- Null object pattern (Wikipedia)
  9. 24 Summary • Use variants to demonstrate different solutions of

    a problem in your application • <svelte:component /> offers an easy-to-use slot mechanism for customizing your application • Use the Null object pattern to ensure your application won’t crash