Skip to content

Anshul619/LLD-OOPs-Design-Patterns

Repository files navigation

Programming && OOP Principles

Principle Description
OOP Design OOPs in Go
SOLID Principles
Design Patterns Sample design patterns implementation - Go, Java
DRY Principle The DRY (don't repeat yourself) principle is a best practice in software development that recommends software engineers to do something once, and only once.
- The goal of the DRY principle is to lower technical debt by eliminating redundancies in process and logic whenever possible.
- Abstraction is the process of removing characteristics until only the most essential characteristics remain.
Design By Contract Design by Contract (DbC) is an approach to software design that focuses on specifying contracts that define the interactions among components.
Testing Against Contract Contract testing is a methodology for ensuring that two separate systems (such as two microservices) are compatible and can communicate with one other.
Orthogonality (programming) In computer programming, orthogonality means that operations change just one thing without affecting others.
- Orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language.
Crash early and crash often for more reliable software Limit error handling to only errors that can actually happen during normal control flow. Crash otherwise.
- Liberally use assertions to document invariant state and crash if violated.
- Use single owner data semantics if at all possible to limit code complexity, and if doing this using C/C++, let the program crash if an ownership invariant is violated.
Minimize Coupling Between Modules Low coupling means that modules are independent and changes in one module have little impact on other modules.
Clean interface A clean interface is one that doesn't leak implementation details. It's easy to understand, doesn't expose its private parts, and doesn't result in excessive coupling between you and the code you're interfacing with.
Design for Concurrency
Design Using Services Service design practice is the specification and construction of processes which deliver valuable capacities for action to a particular user.
Refactor early, refactor often Refactoring early means the necessary changes are still fresh on my mind. Refactoring often means the changes tend to be smaller.
- Delaying refactoring only ends up making a big mess which further makes it harder to refactor.
- Cleaning up as soon as I notice the mess prevents it from building up and becoming a problem later.

OOP Design Problems

Reference

About

This repo contains OOPs design concepts, patterns and LLD problems.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages