일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- UITextView
- collectionview
- map
- 스위프트
- 리펙터링
- 애니메이션
- SWIFT
- 리팩토링
- tableView
- Observable
- Human interface guide
- 리펙토링
- ios
- Clean Code
- uitableview
- Refactoring
- clean architecture
- rxswift
- combine
- ribs
- swiftUI
- Xcode
- 클린 코드
- HIG
- Protocol
- UICollectionView
- MVVM
- uiscrollview
- swift documentation
- RxCocoa
- Today
- Total
목록Architecture (swift) (34)
김종권의 iOS 앱 개발 알아가기

Mixin, Traits 패턴 Mixin, Traits 패턴: 특정 클래스에서 어떤 기능이 필요할 때, 이 기능을 interface로 정의하여 이 interface만 준수하면 바로 기능을 사용할 수 있도록 설계된 패턴 상속이 아닌 포함 코드 재사용성을 높이고 다중상속으로 인해 발생할 상속의 모호성 문제 제거 SingleTon 대신에 Traits 패턴을 사용하면 scope 관리가 용이 (SingleTon은 어디서든 접근 가능하지만 Traits는 해당 프로토콜을 준수한 곳에서만 사용 가능하므로) 상속이 깊어질수록 복잡도가 증가하므로, Mixin 패턴을 통해 flatten the inheritance hierarchy을 위함 (사진 출처 - https://machinethink.net/blog/mixins-a..

1. ReactorKit - 개념 2. ReactorKit - 테스트 방법 (Storyboard 사용, IBOutlet 테스트 방법) 3. ReactorKit - `TaskList 구현`, 템플릿 (template), 비동기 처리 transform(mutation:) 4. ReactorKit - `TaskEdit 구현`, 화면전환, 데이터 전달 * ReactorKit과 RxDataSources 사용 방법은 이곳 참고 ReactorKit 구현 방향 View, Reactor 생성 View의 storyboard에 UI 생성, IBOutlet 입력 Reactor의 Action 정의, Action에 해당하는 Mutation, State 정의 Reactor에서 필요한 service 정의 Reactor의 mutate..

1. ReactorKit - 개념 2. ReactorKit - 테스트 방법 (Storyboard 사용, IBOutlet 테스트 방법) 3. ReactorKit - `TaskList 구현`, 템플릿 (template), 비동기 처리 transform(mutation:) 4. ReactorKit - `TaskEdit 구현`, 화면전환, 데이터 전달 ReactorKit 구현 방향 View, Reactor 생성 View의 storyboard에 UI 생성, IBOutlet 입력 Reactor의 Action 정의, Action에 해당하는 Mutation, State 정의 Reactor에서 필요한 service 정의 Reactor의 mutate, reduce 정의 ReactorKit 템플릿 구현 방법은 이곳 참고: ..

1. ReactorKit - 개념 2. ReactorKit - 테스트 방법 (Storyboard 사용, IBOutlet 테스트 방법) 3. ReactorKit - `TaskList 구현`, 템플릿 (template), 비동기 처리 transform(mutation:) 4. ReactorKit - `TaskEdit 구현`, 화면전환, 데이터 전달 * 해당 코드는 ReactorKit git repository 코드를 참고하였습니다. * Unit Test가 중요한 이유, 클린 코드: https://ios-development.tistory.com/770 * Counter 예제 코드: https://github.com/JK0369/ExReactorKit/tree/BaseComponent ReactorKit 테스..

1. ReactorKit - 개념 2. ReactorKit - 테스트 방법 (Storyboard 사용, IBOutlet 테스트 방법) 3. ReactorKit - `TaskList 구현`, 템플릿 (template), 비동기 처리 transform(mutation:) 4. ReactorKit - `TaskEdit 구현`, 화면전환, 데이터 전달 * 해당 코드는 ReactorKit git repository 코드를 참고하였습니다. ReactorKit 개념 RxSwift의 강점인 비동기 처리에 편리한 코드 API를 통해 앱에서 연속적인 페이지 로드할 때 이전 페이지를 기록해놓아야 하듯이, 이전 페이지를 기록하는 `상태`컴포넌트가 따로 관리되게끔 설계된 구조 `상태`라는 컴포넌트 추상화 개념이 적용되어 있고,..

AppDelegate에서 첫 화면으로 AppDelegate는 앱 첫 시작화면으로 이동하는 AppFlowCoordinator를 소유 Coordinator를 통해 첫 시작화면으로 이동 Coordinator에서는 AppFlowDIContainer를 통해 이동하려는 화면에 해당하는 DIContainer 생성 > 이동하려는 화면의 Coordinator를 획득 > 이동하려는 화면의 coordinator에 정의되어 있는 start()함수를 통해 화면 전환 Coordinator 사용 방법 Coordinator를 사용하는 이유: ViewModel간 의존관계를 Coordinator로 끊은 상태 > ViewModel이 서로 의존하고 있지 않으므로 특정 ViewModel을 수정하면 Coordinator만 변경하면 되므로 상..

DTO DTO(Data Transfer Object): JSON의 response를 Entity로 변환 Data 하위에 존재 API로 부터 받은 response는 그대로 받고, response를 completion handler에서 domain 모델로 변환하는 식으로 사용 받은 response는 그대로 표출 > API의 response 모델을 알아보기 용이 사용하는 쪽에서 domain모델을 사용하도록 변환

Actor가 Entity를 받기까지 View는 ViewModel의 메소드를 호출 viewModel은 useCase 실행 > useCase는 Repository(DB or Network)에 데이터 요청 Repository에서 cache에 데이터가 있으면 바로 획득, 없으면 memory cache, disk cache로 기록 Respository로 부터 받은 데이터는 completion의 인수로 받을수 있어서 ViewModel이 이 데이터 획득 ViewModel은 자신의 Output 프로퍼티에 emit > 이 프로퍼티를 observe하고있던 View에서 Entity를 UI에 표출 예제 - Actor가 MovieList Entity를 요구 View는 ViewModel의 메소드를 호출 viewModel은 use..