You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
비지니스 규칙은 UI, 데이터베이스, 웹 서버, 기타 외부 요인 없이 테스트 가능하여야 한다.
UI 독립성
시스템의 나머지 부분을 변경할 필요 없이 UI를 쉽게 변경할 수 있다.
예를들면, 비즈니스 규칙 변경 없이 웹 UI는 콘솔 UI와 치환되는 것.
데이터베이스 독립성
오라클 또는 SQL Server를 몽고, 빅테이블, 카우치 DB 등으로 바꿀 수 있다.
비즈니스 규칙은 데이터베이스에 얽매이지 않는다.
외부 기능 독립성
실제로 비즈니스 규칙은 외부 세계에 대해 아무것도 모른다.
의존 규칙
대개, 원의 바깥쪽으로 향할수록 고수준의 소프트웨어가 된다.
소스코드의 의존성을 안쪽을 향하게끔 설계
안쪽의 원은 바깥쪽의 원을 모르는 상태
안쪽의 원은 어떠한 것도 바깥 원에 어떠한 것도 참조 하고 있으면 안됨
(함수, 클래스, 변수 등 이름이 붙은 소프트웨어의 엔티티 모든 것)
바깥쪽의 원은 메커니즘(Mechanism)이고 안쪽의 원은 정책(Policy)이다.
Entity
Entity (=Enterprise Business Rules): 사용자가 필요로 하는 데이터 모델을 의미
특정 '도메인'에서 사용되는 struct모델
ex) Actor가 필요로하는 Movie와 MoviesPage에 관한 Entity
structMovie:Equatable,Identifiable{typealiasIdentifier=StringenumGenre{case adventure
case scienceFiction
}letid:Identifierlettitle:String?letgenre:Genre?letposterPath:String?letoverview:String?letreleaseDate:Date?}structMoviesPage:Equatable{letpage:IntlettotalPages:Intletmovies:[Movie]}
Use Case
Use case (= Application Business Rules)
사용자가 Entity를 원하는데, 이 값은 계산되거나 특정 로직에 의해서 얻어지므로 Actor가 원하는 Entity를 얻어내고 있는 '로직'을 의미
엉클 아저씨가 소개한 Clean Architecture의 5가지 목적 ⭐️
프레임워크 독립성
테스트 가능
UI 독립성
데이터베이스 독립성
외부 기능 독립성
의존 규칙
Entity
Use Case
Presenter
External Interfaces
The text was updated successfully, but these errors were encountered: