Sobes.tech
Middle

What development principles are you familiar with?

sobes.tech AI

Answer from AI

Main principles:

  • DRY (Don't Repeat Yourself): Avoid code duplication by extracting repeated logic into functions, classes, or modules.
  • KISS (Keep It Simple, Stupid): Strive for simplicity and clarity in code.
  • YAGNI (You Ain't Gonna Need It): Do not add functionality until it is necessary.
  • SOLID: A set of five principles of object-oriented design:
    • Single Responsibility Principle: A class should have only one reason to change.
    • Open/Closed Principle: Classes should be open for extension but closed for modification.
    • Liskov Substitution Principle: Subtypes must be substitutable for their base types.
    • Interface Segregation Principle: Clients should not depend on interfaces they do not use.
    • Dependency Inversion Principle: High-level modules should not depend on low-level modules; both should depend on abstractions.

Other principles:

  • Code Convention: Follow established coding standards (e.g., PSR-1, PSR-12 in PHP).
  • Test-Driven Development (TDD): Write tests before writing functional code.
  • Domain-Driven Design (DDD): Focus on the domain and create models reflecting business logic.
  • Clean Architecture/Hexagonal Architecture: Architectures aimed at separating business logic from infrastructure.

These principles help create maintainable, scalable, and robust code.

What development principles are you familiar with… - sobes.tech