Jump to content

Paradigms, Principles, Architectures and Patterns: Difference between revisions

From Knowledge Base
No edit summary
No edit summary
Line 2: Line 2:
== Paradigms, Principles, Patterns and Code Smells ==
== Paradigms, Principles, Patterns and Code Smells ==
In programming and computer science, paradigms are '''high-level guidelines''', principles apply '''within specific paradigms''' (e.g. OOP) and patterns are solutions to '''recurring problems''', often aligned with principles. Paradigms are the most abstract, followed by principles, patterns and code smells, which focus on practical problems. There are also idiomes, which always apply to '''one certain programming language'''. Code smells indicate '''common issues''' in codebases.  
In programming and computer science, paradigms are '''high-level guidelines''', principles apply '''within specific paradigms''' (e.g. OOP) and patterns are solutions to '''recurring problems''', often aligned with principles. Paradigms are the most abstract, followed by principles, patterns and code smells, which focus on practical problems. There are also idiomes, which always apply to '''one certain programming language'''. Code smells indicate '''common issues''' in codebases.  
{{#mermaid:graph LR
    A[Start] --> B[Process 1]
    subgraph Subprocess
    C[Step 1] --> D[Step 2] --> E[Step 3]
    end
    B --> C
    E --> F[Process 2]
    F --> G[End]
}}


{{#mermaid: graph TD
{{#mermaid: graph TD
Line 20: Line 10:
   CodeSmells --> Idiomes[Idiomes]
   CodeSmells --> Idiomes[Idiomes]
}}
}}
{{#mermaid: subgraph
  Abstraction Level
    Paradigms[Paradigms]
    Architecture[Architecture]
    Principles[Principles]
    Patterns[Patterns]
    CodeSmells[CodeSmells]
    Idiomes[Idiomes]
  end 
  Paradigms --> Architecture
  Architecture --> Principles
  Principles --> Patterns
  Patterns --> CodeSmells
  CodeSmells --> Idiomes
}}
{{#mermaid:gantt
    title A Simple Gantt Diagram
    dateFormat  YYYY-MM-DD
    axisFormat %m-%d
    section Planning
    Research      :a1, 2023-01-01, 5d
    Design        :a2, 2023-01-06, 4d
    section Development
    Coding        :a3, 2023-01-10, 7d
    Testing      :a4, 2023-01-17, 3d
}}


=== Paradigms ===
=== Paradigms ===

Revision as of 21:45, 16 January 2025

This is a collection of relevant Principles, Architectures and Patterns regarding my central ideas of development and code-bases.

Paradigms, Principles, Patterns and Code Smells

In programming and computer science, paradigms are high-level guidelines, principles apply within specific paradigms (e.g. OOP) and patterns are solutions to recurring problems, often aligned with principles. Paradigms are the most abstract, followed by principles, patterns and code smells, which focus on practical problems. There are also idiomes, which always apply to one certain programming language. Code smells indicate common issues in codebases.

Paradigms

Paradigms are high-level guidelines that define the overall approach to programming, such as object-oriented programming (OOP), functional programming, or procedural programming. Principles apply within specific paradigms; for example, OOP principles include encapsulation, inheritance, and polymorphism.

Principles

Principles are foundational concepts that guide the design and structure of software systems within a given paradigm. They define the best practices and guidelines for creating clean, efficient, and maintainable code. For example, principles like SOLID apply to object-oriented programming, ensuring that systems are modular, scalable, and easy to maintain. Principles help developers make informed decisions when designing software and ensure that the system is both functional and flexible.

Patterns

Patterns are solutions to recurring problems that often align with principles. They provide reusable templates for addressing common issues within a specific architectural context. For instance, the Singleton pattern ensures a class has only one instance.

Architecture

Architecture serves as a bridge between paradigms and the practical application of principles and patterns. Architectural styles, such as Model-View-Controller (MVC), MVVM, layered architecture, or microservices, provide a structural framework that guides the organization and interaction of components within a system. This framework influences how paradigms are implemented in a project and how principles are applied to solve specific problems.

Idiomes

There are also idioms, which are specific to a particular programming language and represent common conventions and practices within that language.

Code Smells

Code smells indicate common issues or anti-patterns in codebases, signaling areas that may need refactoring to improve code quality and maintainability.

In summary:

  • Paradigms: High-level approaches to programming (e.g., OOP, functional programming).
  • Architecture: Structural frameworks that guide the organization of systems (e.g., MVC, layered architecture).
  • Principles: Guidelines within paradigms that shape design decisions (e.g., encapsulation in OOP).
  • Patterns: Reusable solutions to recurring problems that follow principles (e.g., Singleton, Observer).
  • Code Smells: Indicators of potential issues in the codebase, applicable across languages, suggesting the need for refactoring.
  • Idioms: Language-specific conventions and practices.