Slide 1

Slide 1 text

So you want to write a framework? Accidental lessons from a successful project Dr Russell Keith-Magee PyCon PH 2014

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

I've got fingerprints elsewhere.

Slide 6

Slide 6 text

This isn't about Python.

Slide 7

Slide 7 text

This isn't about web frameworks.

Slide 8

Slide 8 text

Best of Breed vs Batteries Included

Slide 9

Slide 9 text

"Batteries Included" Frameworks "Everything comes in the box" One package to download/install Minimal dependencies No decisions to make Documentation on the parts

Slide 10

Slide 10 text

"Best of Breed" Frameworks Pick from existing selection of libraries Glue logic to tie them together Many dependencies Multiple decisions may be required Documentation on integration

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Hybrids are possible.

Slide 13

Slide 13 text

Why pick one over the other?

Slide 14

Slide 14 text

History matters.

Slide 15

Slide 15 text

It's hard to be best of breed when the breed doesn't exist yet.

Slide 16

Slide 16 text

Ian Bicking and SQLObject http://bit.ly/bicking-goodbye

Slide 17

Slide 17 text

Picking "best of breed" early can be detrimental.

Slide 18

Slide 18 text

History matters.

Slide 19

Slide 19 text

Backwards compatibility

Slide 20

Slide 20 text

Time is relative.

Slide 21

Slide 21 text

“ A rule of thumb that has worked for me is that if I'm excited to play around with something it probably doesn't belong in production ” Maciej Ceglowski (Pinboard)

Slide 22

Slide 22 text

Backwards compatibility has a price.

Slide 23

Slide 23 text

Batteries Included can still be backwards incompatible.

Slide 24

Slide 24 text

Best of breed encourages you to pick and choose.

Slide 25

Slide 25 text

Is a choice of batteries really what is required?

Slide 26

Slide 26 text

"Batteries included" doesn't mean "Can't use other batteries".

Slide 27

Slide 27 text

Messaging matters.

Slide 28

Slide 28 text

Timing matters.

Slide 29

Slide 29 text

The 90% framework.

Slide 30

Slide 30 text

Out of the box experience matters.

Slide 31

Slide 31 text

http://goo.gl/Epzms

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

Implicit documentation

Slide 34

Slide 34 text

Models and Forms class MyUser(models.Model): name = models.CharField(max_length=100) age = models.IntegerField() date_of_birth = models.DateField() class MyForm(forms.Form): name = forms.CharField(max_length=100) age = forms.IntegerField() date_of_birth = forms.DateField()

Slide 35

Slide 35 text

Tools vs ecosystems

Slide 36

Slide 36 text

Jacob's Tractor

Slide 37

Slide 37 text

Tools vs ecosystems

Slide 38

Slide 38 text

Metcalfe's Law: The utility of a network increases with the square of it's participants.

Slide 39

Slide 39 text

Ecosystems

Slide 40

Slide 40 text

Microframeworks

Slide 41

Slide 41 text

Remember to share with the other children.

Slide 42

Slide 42 text

Sending the wrong signals.

Slide 43

Slide 43 text

Packaging systems matter.

Slide 44

Slide 44 text

Community matters.

Slide 45

Slide 45 text

Outreach is important.

Slide 46

Slide 46 text

Absent friends

Slide 47

Slide 47 text

http://bit.ly/malcolm-monkey-hat

Slide 48

Slide 48 text

http://bit.ly/malcolm-plays-spassky

Slide 49

Slide 49 text

Requiem in pace

Slide 50

Slide 50 text

“ A society grows great when old men plant trees whose shade they know they shall never sit in. ” Greek proverb

Slide 51

Slide 51 text

Kid, you can move mountains. (98 and ¾ percent guaranteed)

Slide 52

Slide 52 text

He's not the messiah....

Slide 53

Slide 53 text

Thanks! [email protected] @freakboy3742 cecinestpasun.com djangoproject.com