소프트웨어 아키텍처 패턴 vs 디자인 패턴
출처: https://walnut-dev.tistory.com/7
패턴이란?
A pattern is a regularity in the world, in human-made design, or in abstract ideas. As such, the elements of a pattern repeat in a predictable manner.
패턴은 세상이나 인간이 만든 디자인 또는 추상적인 아이디어에서 나타나는 규칙성입니다.
따라서 패턴과 그 요소들은 예측 가능한 방식으로 반복한다.
소프트웨어 아키텍처 패턴
Software architecture pattern is a reusable, proven solution to a specific, recurring problem focused on architectural design challenges, which can be applied within various architectural styles.
소프트웨어 구조를 설계할 때 자주 나타나는 문제점을 해결하는, 재사용 가능하고 검증된 해결책
규칙성 있는 구조로 빠르고 효율적인 개발을 가능하게 합니다. (검증된)
시스템의 유지 보수를 편리하게 합니다. (반복성 구조)
아키텍처 패턴의 적용으로 동료 개발자와 협업과 소통을 원활히 합니다. (규칙성)
아키텍처 패턴에는 아래와 같은 종류가 있습니다.
소프트웨어 디자인 패턴
그렇다면 소프트웨어 디자인 패턴은 무엇일까요?
In software engineering, a software design pattern or design pattern is a general, reusable solution to a commonly occurring problem in many contexts in software design.
소프트웨어 디자인 패턴은 소프트웨어 설계에서 자주 나타나는 문제에 대한, 일반적이고 재사용 가능한 해결책
A design is the concept of or proposal for an object, process, or system. (중략) A design is expected to have a purpose within a specific context, typically aiming to satisfy certain goals and constraints while taking into account aesthetic, functional and experiential considerations.
디자인은 어떤 객체, 프로세스, 또는 시스템에 대한 개념이나 목적을 의미
소프트웨어 디자인 패턴은 어떤 유형의 문제를 해결하느냐에 따라 여러 그룹으로 나누어집니다.
생성 패턴(Creational Patterns) : 객체를 생성합니다.
동시성 패턴(Concurrency Patterns) : 멀티 스레드 환경에서 데이터의 동시성을 보장합니다.
위, 두 패턴의 큰 차이점
그렇다면 아키텍처 패턴과 디자인 패턴은 정확히 어떤 부분에서 차이가 있을까요?
Software Design Patterns offer finer granularity compared to software architecture patterns and software architecture styles, as design patterns focus on solving detailed, low-level design problems within individual components or subsystems. Examples include Singleton, Factory Method, and Observer.
디자인 패턴은 개별 구성 요소 또는 하위 시스템 안에서, 세부적이고 낮은 수준의 문제를 해결하는 데 초점을 맞춥니다. 때문에 아키텍처 패턴에 비해 더 세세한, 작은 단위의 문제를 해결해줍니다.
Software Architecture Pattern refers to a reusable, proven solution to a recurring problem at the system level, addressing concerns related to the overall structure, component interactions, and quality attributes of the system. Software architecture patterns operate at a higher level of abstraction than design patterns, solving broader system-level challenges.
반면, 아키텍처 패턴은 시스템 레벨에서 자주 나타나는 문제를 해결해줍니다. 여기서 시스템 레벨에서의 문제란, 시스템 전반적인 구조, 구성 요소간의 상호작용, 시스템의 성능에 관련해 발생하는 문제입니다.
아키텍처 패턴은 시스템 전반적인 구조에서 나타나는 일반적인 문제점들을 해결해주고, 디자인 패턴은 시스템 내부의 구현 맥락에서 나타나는 일반적인 문제점들을 해결해 줍니다. 아키텍처 패턴이 디자인 패턴에 비해 더 넓은 범위에서 적용됩니다.
유의점: 객체 지향 프로그래밍 패러다임을 가진 언어에서 적용하는 디자인 패턴은 함수형 프로그래밍 패러다임에서 적용하기 어렵거나, 적용할 필요가 없을 수 있습니다.
핵심 차이 (간결화)
아키텍처 패턴과 디자인 패턴의 핵심 차이는 시스템 규모에 있습니다.
아키텍처 패턴은 시스템 전체 구조를 설계해 확장성·유지보수성을 해결. 디자인 패턴은 클래스/객체 내부 로직을 최적화. 아키텍처 패턴의 세부 구현 도구.
쉬운 예시: 건물 vs 방 인테리어
Flutter 실무 예시
예시
Clean Architecture
presentation/domain/data 3계층
Bloc
Stream + Event 상태 관리
적용 범위
앱 전체
특정 기능 (주문 상태 업데이트)
패러다임
언어 독립적
OOP 최적화 (Dart/Flutter)
실전 체크리스트
아키텍처 패턴 먼저 결정 (Clean/MVVM) → 시스템 뼈대
디자인 패턴 나중에 선택 (Bloc/Repository) → 세부 구현
Last updated