Create your own interfaces



Create your own interfaces

0 0


create-your-own-interfaces


On Github jordelver / create-your-own-interfaces

Create your own interfaces

Created by Jordan Elver / @jordelver

Why?

  • Protects you from 3rd parties
  • Models your domain
  • Allows / promotes change
  • Testing

Protects you from 3rd parties

  • 3rd party changing their API
  • Change / update in one place

Models your domain

  • Uses your domain language
  • Encapsulates your logic

Allows / promotes change

  • The consuming code doesn't have to change
  • Designate a public interface
  • Keep the same interface

Testing

  • Test in isolation (No slow I/O required)
  • We can substitute a test double
  • It's faster and behaviour is also tested
  • Integration tests are a must have

Thanks

:-)