Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 462 Bytes

06.-encapsulation.md

File metadata and controls

10 lines (6 loc) · 462 Bytes

06. Encapsulation

6.1 Prefer Interfaces to Classes

  • Use interfaces instead of classes where reasonable. This helps reduce implementation dependencies and allows users to provide implementations that can be used by the framework.

6.2 Prefer Private Access and Restrict Scope

  • Class members should be 'private' in most cases.
  • Class and module methods should be scoped as restrictively as possible - <internal> or <private> where appropriate.