분류 전체보기
-
[항해 99 CS study] CPU와 메모리네트워크/CS Study 2023. 7. 7. 16:09
CPU의 구성 1. 산술 / 논리 연산장치 CPU 내부에서 계산기 역할을 수행하는 장치 산술 연산: 덧셈 뺄셈 등등 사칙연산이다.논리 연산 : 0과 1을 이용한 연산이다. 2. 제어장치 처리할 명령어를 해석하고 명령 수행에 필요한 제어신호를 생성해서 모듈에게 보내는 역할을 한다.CPU상태 신호, 클릭을 입력으로 받는다. 3. 레지스터 연산에 사용되는 데이터와 CPU의 상태를 저장하는 임시 저장공간이다.가시레지스터와 불가시레지스터가 있으며 각각의 구성은 다음과 같다.연산 중에 필요한 상태를 보관하고 간단한 연산은 직접 수행함으로써 산술/논리연산장치를 거치지 않아 계산이 빠른것이 특징이고 대표적으로 쉬프트, 로테이트의 경우에 레지스터가 직접 연산을 수행한다. 4. 버스 정보들이 지나다니는 통로데이터버스 : ..
-
[항해 99 주특기] 심화강의 Thunk개발일지/항해 99 2023. 7. 4. 00:18
미들웨어란 서버와의 통신에 사용하는 것이 대부분이다. 리덕스에서 가장 많이 사용되는 미들웨어는 청크와 사가가 있고 리액트 쿼리도 비슷한 역할을 한다. 청크는 디스팰치안에 객체를 넣었었는데 함수를 디스패치할 수 있게 해줌으로써 어떠한 동작을 실행 할 ㅅ ㅜ있게 해주는 특징이 있다. 미들웨어가 없을 때는 컴포넌트에서 변화가 일어날때 액션이 리듀서로 전달되고 이게 스토어에 값에 변화를 일으킨다. 디스패치되자마자 액션이 리듀서로 보내져서 새로운 state를 반환하기에 중간에 끼어들 틈이 없었다 미들웨어를 사용하면 이 과정사이에 우리가 하고싶은 작업을 할 수있다. ex) conter에서 1더하기를 눌렀을 때 3초있다가 1을 더하고 싶을 때 사용하는데 대부분의 사용되는 경우는 서버와의 통신을 위해 사용하는 것이기에..
-
[React] useCallback VS React.Memo VS useEffect프로그래밍/React 2023. 7. 3. 17:02
지극히 개인적인 사견임을 밝힙니다. 아닌부분은 공부할수록 바뀔 수 있습니다. 먼저 이 Hooks가 사용되는 경우는 최적화라고 보고 있다. React.Momo의 경우 component가 export 될때 또는 함수 자체에 덮어씌듯이 씌어놓으면 부모컴포넌트의 리랜더링에도 부모가 내려주는 props가 변하지 않는다면 랜더링되지 않아서 내가(자식컴포넌트) 가진 함수 및 기타 data들이 리랜더링되지 않아 메모이제이션 과정에서 차지하는 메모리를 제외하고는 cost가 없다는게 가장 큰 장점이다. useCallback의 경우 첫번째 인자로는 callback 함수 두번째 인자는 배열로 deps라고도 불리고 deps의 변경에만 반응하여 함수를 다시 생성을 한다(리랜더링시에) 그렇기에 deps의 변화가 없다면 내가 리랜더..
-
[항해 99 주특기] 심화강의 통신개발일지/항해 99 2023. 7. 3. 16:02
Json-sever BackEnd에서 아직 준비가 덜 될을 때 테스트를 해야하는 상황이 있을텐데 이때 테스트용으로 사용하는 서버가 json sever이다(패키지) 사용법 1. 설치 yarn add json-server 이후 src 밖에서 db.json file을 만들고 데이터를 입력해 넣으면 된다 (객체형태) 궁금증 1) 이게 JSON방식인가? JSON 방식이란게 정확히 뭘까?? 2. 실행 yarn json-server --watch db.json --port 3001 이후 접근할 떄는 /post 이런식으로 url에 적어서 접근하면 됨 HTTP 프로토콜 웹통신 클라이언트와 서버가 서로 데이터를 주고 받는 것이다. 이때 우리는 어떤방식으로 주고받을지에 대해서 약속을 해서 그 방식으로만 데이터를 주고 받는데..