4 Design Principles by Kent Beck Damien Cassou, Stphane Ducasse and - - PowerPoint PPT Presentation

4 design principles
SMART_READER_LITE
LIVE PREVIEW

4 Design Principles by Kent Beck Damien Cassou, Stphane Ducasse and - - PowerPoint PPT Presentation

4 Design Principles by Kent Beck Damien Cassou, Stphane Ducasse and Luc Fabresse WXSYY http://www.pharo.org "Dady" Kent Beck Extreme Programming Agile Manifesto Test-Driven Development WXSYY 2 / 9 The 4 Design


slide-1
SLIDE 1

4 Design Principles

by Kent Beck

Damien Cassou, Stéphane Ducasse and Luc Fabresse

WXSYY

http://www.pharo.org

slide-2
SLIDE 2

"Dady" Kent Beck

Extreme Programming Agile Manifesto Test-Driven Development WXSYY 2 / 9

slide-3
SLIDE 3

The 4 Design Principles

  • 1. Passes the tests
  • 2. Reveals intention
  • 3. No duplication
  • 4. Fewest elements

WXSYY 3 / 9

slide-4
SLIDE 4
  • I. Passes the Tests

your code must work as intended the tests make sure that’s always true WXSYY 4 / 9

slide-5
SLIDE 5
  • II. Reveals Intention

the code must be easy to understand always remember that:

  • you spend most of your time reading/browsing code
  • if you can’t understand, you can’t modify

WXSYY 5 / 9

slide-6
SLIDE 6
  • III. No duplication (”aka.” D.R.Y.)

Don’t Repeat Yourself say things "Once and only once" create abstractions WXSYY 6 / 9

slide-7
SLIDE 7
  • IV. Fewest Elements (”aka.” no over-engineering)

don’t design future requirements you don’t know what you will need tomorrow, don’t design

for it today

this only makes code harder to change WXSYY 7 / 9

slide-8
SLIDE 8

The 4 Design Principles

  • 1. Passes the tests
  • 2. Reveals intention
  • 3. No duplication
  • 4. Fewest elements

WXSYY 8 / 9

slide-9
SLIDE 9

A course by and in collaboration with

Inria 2016 Except where otherwise noted, this work is licensed under CC BY-NC-ND 3.0 France https://creativecommons.org/licenses/by-nc-nd/3.0/fr/