Paradigms, Principles, Architectures and Patterns
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.
- 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.