Upgrade to Pro — share decks privately, control downloads, hide ads and more …

!Smelly code - The origins

!Smelly code - The origins

Some best practices we use to forget

Avatar for Alexandru Simonescu

Alexandru Simonescu

June 17, 2016
Tweet

More Decks by Alexandru Simonescu

Other Decks in Programming

Transcript

  1. High Cohesion - Methods of a class have much in

    common - Methods focus on same functionality
  2. High Cohesion - Methods of a class have much in

    common - Methods focus on same functionality - Higher cohesion between elements = better
  3. High Cohesion - Methods of a class have much in

    common - Methods focus on same functionality - Higher cohesion between elements = better - Lower cohesion can be disturbing; but not critical
  4. Reuse / release equivalence - Libraries - You are the

    consumer - You should not need to look at source code
  5. Reuse / release equivalence - Libraries - You are the

    consumer - You should not need to look at source code - Take care with semantic versioning
  6. Common reuse principle - Tells how to organize packages -

    The classes on a package are reused together
  7. Common reuse principle - Tells how to organize packages -

    The classes on a package are reused together - If you reuse one class from the package, you should reuse all
  8. MVC

  9. MVC

  10. MVP

  11. MVP