Software Design Patterns

Design patterns are well-tested solutions to common problems in software development. The primary goal of any designing pattern is to help you structure your code so it is flexible and resilient. When it comes to your designs, you have to first understand a pattern and then adapt it to your own code. They also allow... » read more

GRASP Principles of Software Engineering

General Responsibility Assignment Software Patterns. Creator Who is responsible for creating an object? Making it apparent which objects are responsible for creating other objects. Controller MVC. Should separate view from model (business logic). Use Controller to coordinate this. Pure Fabrication When the behavior does not belong anywhere else, create a new class. Information Expert A... » read more

General Software Development Principles

Don’t Repeat Yourself (DRY) Avoid duplication in code. There should be a single source of truth. There should be one place in our system that deals with the particular problem. You Ain’t Gonna Need It (YAGNI) Solve the problems that you know exist, don’t write speculative code. It’s very tempting for developers when writing code,... » read more

Singleton Pattern

The singleton pattern is a software design pattern that restricts the instantiation of a class to one “single” instance. This is useful when exactly one object is needed to coordinate actions across the system. In C#, you use the “static” declaration. The singleton design pattern solves problems like:[5] How can it be ensured that a... » read more

Unit Testing

Unit Testing is a level of software testing where individual units/ components of a software are tested. The purpose is to validate that each unit of the software performs as designed. A unit is the smallest testable part of any software. It usually has one or a few inputs and usually a single output. Unit Testing... » read more

Dependency Injection

Dependency injection¬†is a technique whereby one object (or static method) supplies the dependencies of another object. A dependency is an object that can be used (a¬†service). It Increases code reusability and improves code maintainability. It allows us to develop loosely coupled code and reduce tight coupling between software components. DI is providing an object what... » read more