Slide 1

Slide 1 text

Damian Dziaduch @ Printify Framework agnostic is not rocket science

Slide 2

Slide 2 text

• public speaker • software engineer @Printify • before • @GetResponse • @ATG.auto • enjoying • TDD • architecture Who am I

Slide 3

Slide 3 text

Agenda • What is a framework agnostic approach? • Why you should do it? • What it gives you? • How are we doing it?

Slide 4

Slide 4 text

What is it?

Slide 5

Slide 5 text

A framework-agnostic approach refers to developing software in a way that minimises dependencies on a specific framework

Slide 6

Slide 6 text

Simply: Framework separation

Slide 7

Slide 7 text

Why you should do it?

Slide 8

Slide 8 text

https://github.com/ddziaduch/penalty-points/tree/why

Slide 9

Slide 9 text

What it gives you?

Slide 10

Slide 10 text

Ability to change the framework!

Slide 11

Slide 11 text

Well, yes, but also...

Slide 12

Slide 12 text

• Separation of concerns, domain is separated from storage, presentation etc • Tests that are fast and easy to write • Services (use cases) reusability The benefits

Slide 13

Slide 13 text

How are we doing it?

Slide 14

Slide 14 text

• Drivers penalty points system in Poland (simpli fi ed) • 20 penalty points limit for fresh drivers (exam passed less than 1 year ago) • 24 penalty points limit for rest • Penalty is valid 2 years - this period is counted from the date of the payment • Driver can pay on the spot or later • You go to jail if last penalty exceeds the limit The domain

Slide 15

Slide 15 text

The users

Slide 16

Slide 16 text

“It aims at creating loosely coupled application components that can be easily connected to their software environment by means of ports and adapters. This makes components exchangeable at any level and facilitates test automation.” Ports and Adapters architecture

Slide 17

Slide 17 text

*Disclaimer This is our approach to framework agnostic, and it is not the only one 🙂

Slide 18

Slide 18 text

The big perspective

Slide 19

Slide 19 text

Domain https://github.com/ddziaduch/penalty-points/tree/domain

Slide 20

Slide 20 text

GetDriverFile StoreDriverFile Domain Application https://github.com/ddziaduch/penalty-points/tree/application

Slide 21

Slide 21 text

GetDriverFile StoreDriverFile In memory adapter Mock adapter Mock adapter Domain Application In memory adapter https://github.com/ddziaduch/penalty-points/tree/application

Slide 22

Slide 22 text

PayPenalty GetDriverFile StoreDriverFile Im posePenalty In memory adapter Mock adapter Mock adapter Domain Application In memory adapter https://github.com/ddziaduch/penalty-points/tree/application

Slide 23

Slide 23 text

PayPenalty GetDriverFile StoreDriverFile Im posePenalty Test adapter HTTP adapter Test adapter CLI adapter HTTP adapter In memory adapter Mock adapter Mock adapter Domain Application In memory adapter https://github.com/ddziaduch/penalty-points/tree/adapters

Slide 24

Slide 24 text

The code

Slide 25

Slide 25 text

Summary • A framework-agnostic approach refers to developing software in a way that minimises dependencies on a speci fi c framework • Separation of concerns, domain is separated from storage, presentation etc • Tests that are fast and easy to write • Services (use cases) reusability • We are doing it via Ports and Adapters

Slide 26

Slide 26 text

PRINTIFY • CI/CD, distributed systems • Learning budget & time • Paid holidays, vacations and sickness • MacBooks • Salary in EURO • Stock options WE ARE HIRING!

Slide 27

Slide 27 text

• Rate my talk • https://github.com/ddziaduch/penalty- points • @ddziaduch • https://damian.dziaduch.pl • https://speakerdeck.com/ddziaduch Thank you!