Decoupling Drupal modules into PHP libraries Bojan Zivanovic - - PowerPoint PPT Presentation

decoupling drupal modules into php libraries
SMART_READER_LITE
LIVE PREVIEW

Decoupling Drupal modules into PHP libraries Bojan Zivanovic - - PowerPoint PPT Presentation

Decoupling Drupal modules into PHP libraries Bojan Zivanovic Coding and Development Bojan Zivanovic (bojanz) Commerce Development Lead @ Commerce Guys Views Bulk Operations, Inline Entity Form Commerce Guys Paris | London | Ann Arbor, MI


slide-1
SLIDE 1
slide-2
SLIDE 2

Decoupling Drupal modules into PHP libraries

Bojan Zivanovic

Coding and Development

slide-3
SLIDE 3

Commerce Development Lead @ Commerce Guys

Bojan Zivanovic (bojanz)

Views Bulk Operations, Inline Entity Form

slide-4
SLIDE 4

Commerce Guys

Paris | London | Ann Arbor, MI Creators of Drupal Commerce and Platform.sh

slide-5
SLIDE 5
slide-6
SLIDE 6

4 YEARS SINCE THE FIRST RELEASE...

slide-7
SLIDE 7

And now we start from scratch

slide-8
SLIDE 8

Re-evaluating our problem space

slide-9
SLIDE 9

Libraries first

slide-10
SLIDE 10
slide-11
SLIDE 11
slide-12
SLIDE 12
slide-13
SLIDE 13
slide-14
SLIDE 14
slide-15
SLIDE 15

Influenced/Infiltrated

slide-16
SLIDE 16

More to come

slide-17
SLIDE 17

Why?

■ Re-examine your problem space. ■ Get additional exposure. ■ Validate your implementation ■ Get development/maintenance help. ■ Allow for backports.

slide-18
SLIDE 18

The (not so) hidden cost

slide-19
SLIDE 19

The anatomy

  • f a library
slide-20
SLIDE 20

Data model - The interfaces

slide-21
SLIDE 21

Data model - The default class

slide-22
SLIDE 22

Data model - Traits

slide-23
SLIDE 23

Data model - Collections

slide-24
SLIDE 24

Data model - Repository

slide-25
SLIDE 25

Services

slide-26
SLIDE 26

Tests (PHPUnit)

slide-27
SLIDE 27

Tips & Tricks

slide-28
SLIDE 28

Translatable strings

slide-29
SLIDE 29

Pluggable implementations

slide-30
SLIDE 30

Know when to stop

slide-31
SLIDE 31

Drupal integration

slide-32
SLIDE 32

Composer

slide-33
SLIDE 33

Composer, part II

https://bojanz.wordpress.com/2015/09/18/d8-composer-definitive-intro/

slide-34
SLIDE 34

Entity types

slide-35
SLIDE 35

Library ideas

Which problems to tackle

slide-36
SLIDE 36

Hard problems

slide-37
SLIDE 37

Boring problems

slide-38
SLIDE 38

“Nobody cares about your CartInterface"

– Me

Are you saving me time?

slide-39
SLIDE 39

Spreading the drop

slide-40
SLIDE 40

Questions?

slide-41
SLIDE 41

Sprint: Friday

https://www.flickr.com/photos/amazeelabs/ 9965814443/in/faves-38914559@N03/

Sprint with the Community on Friday. We have tasks for every skillset. Mentors are available for new contributors. An optional Friday morning workshop for first- time sprinters will help you get set up. Follow @drupalmentoring.

slide-42
SLIDE 42