Principles - bradyclifford/sdlc GitHub Wiki
Software Development Principles
-
https://enterprisecraftsmanship.com/2015/10/12/most-valuable-software-development-principles/
-
Make sure you don’t expose the internals of your code base and properly encapsulate your entities.
-
Try to achieve low coupling and high cohesion in your code base on each level. Don’t fall into the trap of destructive decoupling, though. In most cases, it is as harmful as Big Ball of Mud.
-
Don’t repeat yourself, but at the same time, don’t confuse the DRY principle with code duplication. Remember, this principle is about domain knowledge, not the text on the screen.
-
Let your application fail fast. Always strive to shorten the feedback loop even if it means your software will feel less stable. With this technique in hand, such a situation won’t last long anyway.
-
Try to always make your assumptions explicit in code. Agree upon conventions clearly, don’t allow misunderstanding affect your performance.
High cohesion and low coupling
The difference here is that while high cohesion does imply code have similar responsibilities, it doesn’t necessarily mean the code should have only one. I would say SRP is more restrictive in that sense.
Interface overload
While .NET interfaces do represent API, i.e. something you can code against, it is incorrect to attribute the term “Interface” exclusively to them. Every class has its own interface that is defined as a set of public methods.
Always depend upon abstractions, not implementations.
Relationship between .NET interfaces, classes, API and implementation details:
Related: Interfaces are not Abstractions