전체 글
-
데이터 모델 개념을 기초로 엔티티와 클래스 관계 알아보기Apple🍎/CoreData 2024. 1. 9. 00:53
Entity와 Attribute는 대응하는 Class와 Property가 생긴다. 보통 Core Data의 엔티티와 엔티티의 속성을 설정할 때는 Code Data Model Editor를 사용해왔다. 여기서 Entity를 설정하면 실제 코드로는 어떻게 구현되는 것일까? Generated Classes 데이터 모델안에서 엔티티와 속성이 어떻게 구성되는지 간단히 말하면 Editor에서 설정한 엔티티와 속성에 대응하는 클래스와 프로퍼티가 코드로 생성된다. How Is your Data Model Really Created. Core Data Editor를 사용하여 엔티티와 속성을 만들면 데이터 모델은 정적이고 (컴파일 타임에 이미 모두 정해지고) 런타임에는 더이상 건들지 못한다고 생각할 수 있지만 Core D..
-
Core Data 뜯어 보기Apple🍎/CoreData 2024. 1. 4. 15:06
Core Data가 뭔가? Core Data stack은 무엇이고 왜 stack이라고 부르는가? Core Data stack은 어떤 부분들로 구성되어있나? 어떻게 persistent container는 작업을 간단히 만들어주나? Xcode는 어떻게 CoreD Data를 위한 Stack을 만들고 이로부터 어떤걸 알 수 있는가? 그래서 Core Data가 뭔데? According to Apple Use Core Data to save your application’s permanent data for offline use, to cache temporary data, and to add undo functionality to your app on a single device. To sync data acro..
-
엔티티와 컨텍스트Apple🍎/CoreData 2024. 1. 2. 14:21
Tstory 나 Naver Blog같은 블로그 어플리케이션을 만든다 해보자.블로그의 주요 기능은블로그 운영자는 글을 작성해 ‘포스트’를 발행한다.블로그 방문자는 ‘포스트’를 읽고 해당 ‘포스트’에 ‘코멘트’를 단다.제일 중요한점은 사용주체(운영자, 방문자)의 활동결과(포스트,코멘트)가 어딘가에 저장되어야한다는 것이다. 이렇게 비즈니스(여기서는 블로그)에서 사용되는 객체들 중에서 ‘저장’ 할 필요가 있는 객체들을 엔티티라고 부른다. Entity 란?데이터베이스는 데이터를 체계화해서 저장할 수 있는 시스템으로 이곳에 저장될 때 제일 중요한점은 저장되는 데이터 간에 ‘구분’이 되어야한다는 것이다. 예를 들어 2번째 포스트를 불러와줘하고 요청을 받았는데 정작 데이터베이스가 저장되어 있는 포스트 중에 2번째 포스..
-
Router가 필요한 이유와 작동 과정 살펴보기CS💻/Network🛰️ 2023. 12. 22. 00:16
Layer 3계층과 Layer 2계층을 연결하기 위해 사용하는 프로토콜이다. 주로 IP 주소만 아는 경우 ARP Request를 통해 해당 IP 주소에 해당하는 기기의 MAC 주소를 알아온다. 이렇게 함으로써 Layer 2계층은 MAC 주소로 Layer 3계층은 IP 주소로 통신이 가능해진다. [ARP : IP 주소와 MAC 주소를 매핑해준다. 허브와 스위치의 작동방식 차이를 OSI 7 Layer 랑 같이 알아보자. 스위치는 기기들 사이에서 데이터의 전달을 중개해주는 기기이다. 서로 연결하고자하는 기기들에 아래와 같이 생긴 이더넷 케이 people-analysis.tistory.com](https://people-analysis.tistory.com/293) 라우터가 필요한 이유 이번에는 쿠루루가 본부와..
-
ARP : IP 주소와 MAC 주소를 매핑해준다.CS💻/Network🛰️ 2023. 12. 21. 14:55
허브와 스위치의 작동방식 차이를 OSI 7 Layer 랑 같이 알아보자. 스위치는 기기들 사이에서 데이터의 전달을 중개해주는 기기이다. 서로 연결하고자하는 기기들에 아래와 같이 생긴 이더넷 케이블을 이용해 한쪽은 기기, 한쪽은 스위치의 구멍(포트)에 꽂으면 people-analysis.tistory.com 이전 포스트에서 탐구해봤던 허브와 스위치의 차이를 OSI 7 layer와 관련지어 간단하게 다시 정리하면 허브는 Layer 1, 물리 계층에 속하는 기기이기 때문에 전기적 신호의 전달만 할 뿐 전달하고 있는 데이터의 목적지를 알 수가 없다. 따라서 허브를 이용해 기기간의 데이터를 전달하면 해당 허브에 연결되어 있는 모든 기기에게 데이터가 전달 된다. 스위치는 Layer2, 데이터 링크 계층에 속하는 기..
-
허브와 스위치의 작동방식 차이를 OSI 7 Layer 랑 같이 알아보자.CS💻/Network🛰️ 2023. 12. 17. 12:54
스위치는 기기들 사이에서 데이터의 전달을 중개해주는 기기이다. 서로 연결하고자하는 기기들에 아래와 같이 생긴 이더넷 케이블을 이용해 한쪽은 기기, 한쪽은 스위치의 구멍(포트)에 꽂으면 이제 스위치를 통해 연결된 기기들간의 통신이 가능해진다.스위치가 있기 전에는 기기간의 연결을 위해서는 허브라는 것을 사용했다. 허브는 스위치와 겉모습은 아주 비슷하게 생겼지만 작동방식은 아주 멍청한 녀석이다.지금부터 허브와 스위치가 각각 어떻게 기기들 사이에서 데이터를 전달하는지 작동방식의 차이에 대해서 알아보자. 허브와 스위치의 작동과정을 보기에 앞서 커맨드 프롬프트에 ping 명령어에 대해서 알아보자. ping 은 현재 네트워크에 통신하고자 하는 기기가 연결되어 있는지 확인하는 명령어로 ping + ip address(..
-
TDD가 뭔지 한번 해보기Apple🍎/Test 2023. 12. 15. 23:15
TDD 워크 플로우 - Red, Green, Refactor Red 요구사항에 대해 실패하는 테스트를 작성하는 것으로 시작 원하는 기능과 엣지 케이스 대해 아직 구현하지 않은 상태 돌려서 IDE에서 빨간불 확인하기 작성한 테스트가 처음에는 실패하는지 확인하는 것은 테스트가 정상적으로 작동하는지를 확인하는 중요한 절차이다. 항상 성공하는 의미없는 테스트거나 이미 원하는 기능이 구현되어 있지는 않은지 확인하는 절차. Green 테스트를 간신히 통과할 수 있을 정도로만 간단하게 코드를 작성. 이 단계에서는 코드의 퀄리티를 신경쓰지 않고 일단 기능 구현에만 집중. IDE에서 파란불 확인할 때까지 진행. 테스트 통과가 가능한 가장 간단한 코드를 작성함으로써 기능 구현을 위해 진짜 필요한 부분만 작성하게 된다. 읽..
-
IOS 단위 테스트 살짝 맛보기Apple🍎/Test 2023. 12. 13. 23:21
Unit test 예제 Xcode 실행 -> File | New | Project. iOS | Application | App 에서 Next ProductName : FirstDemo / Interface : Storyboard / Language : Swift Include Tests 체크 Next FirstDemoTests 폴더에서 FirstDemoTests.swift 선택해서 editor에 띄우기 가장 먼저 test framework와 test의 대상이 되는 target을 import 해주어야한다. 모든 test case는 XCTest 프레임 워크의 import가 필요하다. XCTest는 XCTestCase 클래스와 Assertion을 정의한다. Test의 대상이 되는 모듈인 FirstDemo를 i..