Jump to content

Paradigms, Principles, Architectures and Patterns: Difference between revisions

From Knowledge Base
No edit summary
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a collection of relevant Principles, Architectures and Patterns regarding my 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.
== Paradigms, Principles, Patterns and Code Smells ==
== 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, 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'''. 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:
{{#mermaid: graph TD
{{#mermaid: graph TD
   Paradigms[Paradigms] --> Architecture[Architecture]
   Paradigms[Paradigms] --> Architectures[Architectures]
   Architecture --> Principles[Principles]
   Architectures --> Principles[Principles]
   Principles --> Patterns[Patterns]
   Principles --> Patterns[Patterns]
   Patterns --> CodeSmells[CodeSmells]
   Patterns --> CodeSmells[CodeSmells]
Line 13: Line 14:
=== Paradigms ===
=== 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.  
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.  
* [[Guides/Paradigms,_Principles,_Architectures_and_Patterns\Paradigms|More about Paradigms]]
* [[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 ===
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.
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.
* [[Guides/Paradigms,_Principles,_Architectures_and_Patterns\Principles|More about Principles]]
* [[Clean Code]]
* [[SOLID]]
* [[Separation of Concerns]]
* [[Anticipation of Change]]
* [[Coupling and Cohesion]]
* [[Law of Demeter]]


=== Patterns ===
=== 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.
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.
* [[Guides/Paradigms,_Principles,_Architectures_and_Patterns\Patterns|More about Patterns]]
* [[Adapter]]
* [[Decorator]]
* [[Factory Method and Abstract Factory]]
* [[Mediator]]
* [[Prototype]]
* [[Singleton]]


=== Architecture ===
=== Code Smells ===
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.
Code smells indicate common issues or anti-patterns in codebases, signaling areas that may need refactoring to improve code quality and maintainability.
* [[Guides/Paradigms,_Principles,_Architectures_and_Patterns\Architectures|More about Architectures]]
* [[Code Smells]]


=== Idiomes ===
=== Idiomes ===
There are also idioms, which are specific to a particular programming language and represent common conventions and practices within that language.
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.
* [[Guides/Paradigms,_Principles,_Architectures_and_Patterns\Idioms|More about Idioms]]
* [[Async Await]]
* [[Conditional Cases in Switch Statements]]
* [[Extension Methods]]
* [[Implicitly Typed Variables]]
* [[Null-Conditional-Operator]]
* [[Record Type]]
* [[using Statement for Resource Management]]
 


=== Code Smells ===
Code smells indicate common issues or anti-patterns in codebases, signaling areas that may need refactoring to improve code quality and maintainability.
* [[Guides/Paradigms,_Principles,_Architectures_and_Patterns\Code_Smells|More about Code_Smells]]


In summary:
In summary:
Line 42: Line 67:
* '''Code Smells''': Indicators of potential issues in the codebase, applicable across languages, suggesting the need for refactoring.
* '''Code Smells''': Indicators of potential issues in the codebase, applicable across languages, suggesting the need for refactoring.
* '''Idioms''': Language-specific conventions and practices.
* '''Idioms''': Language-specific conventions and practices.
[[File:Complicated.png|frameless|center]]
[[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