Уровень 0 · материалов: 4
В кластер входят документы о высокоуровневых архитектурных принципах и паттернах проектирования классов, но не входят документы о локальной структуре функций и правилах использования операторов возврата.
Общие признаки: принципы SOLID, паттерн Singleton, поддерживаемость и тестируемость кода, борьба со сложностью архитектуры
Группа выше: Паттерны проектирования: обзор и применение
Смысл: The main idea is that developers should avoid 'class-itis'—the tendency to wrap everything in a class—and instead prefer the simplest possible implementation, often using functions and standard data structures, to improve code maintainability and readability.
Avoid creating classes that only serve as wrappers for a single function; prioritize simplicity and functional patterns over excessive object-oriented hierarchies.
Смысл: The main idea is that over-applying SOLID principles leads to unnecessary complexity and opaque code; instead, developers should strive to eliminate dependencies entirely using Value Objects and functional patterns to achieve simplicity and testability.
Strict adherence to SOLID often creates overly complex and unreadable code, so the author advocates for minimizing dependencies and prioritizing Value Objects and the Single Responsibility Principle.
Смысл: The main idea is that adhering to the Single Responsibility Principle is crucial for maintainable and testable code, and developers should be wary of Singletons, architectural layer bleeding, and global notification centers as they are primary drivers of code complexity and fragility.
The author identifies Singletons, blurred architectural boundaries (like business logic in models), and over-reliance on NSNotificationCenter as the primary causes of Single Responsibility Principle violations in software development.
Смысл: The main idea is that the Singleton pattern should be avoided because it introduces global state, tight coupling, and testability issues, acting more as an anti-pattern than a helpful design tool in modern software development.
The Singleton pattern is an anti-pattern that causes tight coupling, hinders unit testing, and creates global state, making it harmful to modern software architecture.