Slide 1

Slide 1 text

@klarstil @last__sgt Shopware 6 Plugin Development @klarstil @last__sgt - Sebastian Seggewiß & Stephan Pohl -

Slide 2

Slide 2 text

Quick start in 5 minutes @klarstil From zero to hero @last__sgt

Slide 3

Slide 3 text

@klarstil First let’s create your plugin @last__sgt

Slide 4

Slide 4 text

@klarstil Take a look at your auto generated config @last__sgt

Slide 5

Slide 5 text

@klarstil A little template adjustment and… @last__sgt

Slide 6

Slide 6 text

@klarstil Your first plugin is done! @last__sgt

Slide 7

Slide 7 text

And what it does for you… @klarstil Our brand new plugin system @last__sgt

Slide 8

Slide 8 text

@last__sgt Plugin system facts you need to know - Changelogs are in a simple markdown structure - Uses the same database migrations as the core - Plugin config for easy configurations in the administration - Versioning is driven by Composer @klarstil Extensibility Stability Performance DX

Slide 9

Slide 9 text

@klarstil @last__sgt ...but what is a plugin? - Symfony bundle with lifecycle functionality (install, uninstall, activate, deactivate) - composer.json for versioning and meta data - PluginBaseClass as the entry point for your extension

Slide 10

Slide 10 text

Technology stack @klarstil @last__sgt Well-established standards

Slide 11

Slide 11 text

@klarstil @last__sgt Symfony Vue.js Twig FlySystem Enqueue ES6 JavaScript Webpack Bootstrap Swagger SCSS JWT

Slide 12

Slide 12 text

@klarstil @last__sgt Serverside aka Symfony - 99 console commands ready-to-use - Controllers for our API actions - EventDispatcher driven EventSystem - DependencyInjection out-of-the box - Cart process chain uses tagged services

Slide 13

Slide 13 text

Data flow through the application @klarstil @last__sgt Data handling and how it works

Slide 14

Slide 14 text

@klarstil Data e.g. Product EntityDefinition Entity EntityCollection @last__sgt Data flow through the application

Slide 15

Slide 15 text

@klarstil @last__sgt EntityDefinition EntityRepository API Data flow through the application

Slide 16

Slide 16 text

@klarstil @last__sgt Repository SearchResult EntityDefinition Factory Entity Vue.js Component Save entity Request Changeset Generator Payload API Server Administration Data flow through the application

Slide 17

Slide 17 text

@klarstil @last__sgt Sophisticated data handling - Entity scheme generated based on the defined server side entities - Automatic generation of repositories and entities - Changeset generator to minimize the payload - OpenAPI compatible format - Resolves associations between entities out-of-the box

Slide 18

Slide 18 text

Administration - the big picture @klarstil @last__sgt Shopware Vue.js

Slide 19

Slide 19 text

@klarstil @last__sgt Module system - Registration of module specific snippets out-of-the-box - Color-coded routing system & icon for your module by definition - Define routes & child routes as well as support for route middleware - Definition of a navigation entry into the main menu

Slide 20

Slide 20 text

@klarstil @last__sgt Module Routes Page component Vue.js Components Child Routes component View component Routing & components handling General Component handling Client-side routing

Slide 21

Slide 21 text

@klarstil @last__sgt Component system - Register, extend & override components - 230 pre-defined components ready to use - Access the entire application using the third-party interface - Built-in dependency injection combined with Vue.js' "inject & provide" pattern

Slide 22

Slide 22 text

...it's more than just a website @klarstil @last__sgt

Slide 23

Slide 23 text

@klarstil @last__sgt app Order Module Product Module Settings Module Customer Module CMS Module Media Module Login Module Vue.js Adapter Initializers Decorators Filters General Snippets Mixins Components Assets Icons General Routes Vue.js Plugins Data Layer Factories Dependency injection Workers core module Category Module Dashboard Module Helper

Slide 24

Slide 24 text

A closer look on the Storefront @klarstil @last__sgt

Slide 25

Slide 25 text

@last__sgt @klarstil A closer look on the Storefront - Using well-defined standards like Symfony, Twig & Bootstrap - Vanilla ES6 JavaScript plugins (jQuery optional) - Pre-processing using Webpack, SCSS & Autoprefixr - Hot-module reloading for a great DX

Slide 26

Slide 26 text

@klarstil Let's create your very own theme @last__sgt

Slide 27

Slide 27 text

@klarstil Changing SCSS variables... @last__sgt

Slide 28

Slide 28 text

@klarstil ...voilá, done! @last__sgt

Slide 29

Slide 29 text

If you don’t like it - change it! @klarstil @last__sgt Be that person

Slide 30

Slide 30 text

@klarstil @last__sgt Other things you can do - Extend the cart behavior by writing your own CartCollector & Processor - Implement your own payment method - Add filters to the storefront listing page - ...and much more!

Slide 31

Slide 31 text

Thank you, time for your questions! @klarstil @last__sgt Keep being awesome