Jump to content

Paradigms, Principles, Architectures and Patterns: Difference between revisions

From Knowledge Base
No edit summary
No edit summary
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a collection of relevant Principles, Architectures and Patterns regarding our central ideas of development and code-bases.
This is a collection of Principles, Architectures, Patterns, etc. regarding my central ideas of development and code-bases.
== Overview ==
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'''. Code smells indicate common issues in codebases. There are also '''architectures''' and '''idioms''', idioms always apply to one certain programming language. 


#a123
From most abstract to most concrete:
##b23
{{#mermaid: graph TD
###n3123
  Paradigms[Paradigms] --> Architectures[Architectures]
#w2
  Architectures --> Principles[Principles]
#r3
  Principles --> Patterns[Patterns]
#t4
  Patterns --> CodeSmells[CodeSmells]
  CodeSmells --> Idiomes[Idiomes]
}}
 
=== 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.
* [[Imperative and Delclarative]]
* [[OOP, DDD, AOP and EDP]]
* [[Domain Driven Design]]
* [[Functional Programming]]
 
=== Architectures ===
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.
* [[Layered]]
* [[Hexagonal]]
* [[MVVM]]
* [[Pipeline]]
 
=== 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.
* [[Clean Code]]
* [[SOLID]]
* [[Separation of Concerns]]
* [[Anticipation of Change]]
* [[Coupling and Cohesion]]
* [[Law of Demeter]]
 
=== 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.
* [[Adapter]]
* [[Decorator]]
* [[Factory Method and Abstract Factory]]
* [[Mediator]]
* [[Prototype]]
* [[Singleton]]
 
=== Code Smells ===
Code smells indicate common issues or anti-patterns in codebases, signaling areas that may need refactoring to improve code quality and maintainability.
* [[Code Smells]]
 
=== Idiomes ===
There are also idioms, which are specific to a particular programming language and represent common conventions and practices within that language. Since my "work horse" is currently .NET/C#, I focus on that language.
* [[Async Await]]
* [[Conditional Cases in Switch Statements]]
* [[Extension Methods]]
* [[Implicitly Typed Variables]]
* [[Null-Conditional-Operator]]
* [[Record Type]]
* [[using Statement for Resource Management]]
 
 
 
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.
[[File:Complicated.png|center]]

Latest revision as of 05:55, 21 January 2025

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

Overview

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. Code smells indicate common issues in codebases. There are also architectures and idioms, idioms always apply to one certain programming language.

From most abstract to most concrete:

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.

Architectures

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.

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.

Code Smells

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

Idiomes

There are also idioms, which are specific to a particular programming language and represent common conventions and practices within that language. Since my "work horse" is currently .NET/C#, I focus on that language.


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.
Error creating thumbnail: Unable to save thumbnail to destination