Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .idea/2021-Java-Study.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions CQRS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 자바 기초
## CQRS
> CQRS는 Command and Query Responsibility Segregation(명령과 조회의 책임 분리)을 나타낸다. 이름처럼 시스템에서 명령을 처리하는 책임과 조회를 처리하는 책임을 분리하는 것이 CQRS의 핵심이다.

<img src = "https://blog.nebrass.fr/wp-content/uploads/cqrs-simple-diagram-886x1024.png" height="500">

- 명령(Command) : 시스템의 상태를 변경하는 작업
- ex) 주문 취소, 배송 완료
- 쿼리(Query) : 시스템의 상태를 반환하는 작업
- ex) 주문 목록
- 책임(Responsibility) : 구성 요소의 역할
- 구성 요소 : 클래스, 함수, 모듈/패키지, 웹서버/DB

- 분리(Segregation) : 역할에 따라 구성 요소 나누기

### 명령과 조회에 단일 모델을 사용한다면?
🔍 명령과 쿼리가 다루는 데이터가 다르기 때문에 이도 저도 아닌 잡탕이 된다.
- 코드 역할/책임 모호
- 의미/가독성 등 나빠짐
- 유지보수성이 떨어짐
- 명령과 쿼리는 코드 변경 빈도/사용자가 다르기 때문
- 기능마다 요구하는 성능이 다르기 때문



Binary file not shown.
Binary file not shown.
Binary file added racingcar/.gradle/6.7/fileChanges/last-build.bin
Binary file not shown.
Binary file not shown.
Binary file added racingcar/.gradle/6.7/fileHashes/fileHashes.lock
Binary file not shown.
Empty file.
Binary file added racingcar/.gradle/6.7/javaCompile/javaCompile.lock
Binary file not shown.
Binary file added racingcar/.gradle/6.7/javaCompile/taskHistory.bin
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions racingcar/.gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Mon Apr 12 17:58:13 KST 2021
gradle.version=6.7
Binary file not shown.
Binary file added racingcar/.gradle/checksums/checksums.lock
Binary file not shown.
Empty file.
Empty file.
8 changes: 8 additions & 0 deletions racingcar/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions racingcar/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions racingcar/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions racingcar/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions racingcar/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions racingcar/.idea/modules/racingcar.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions racingcar/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id 'java'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

test {
useJUnitPlatform()
}
Binary file added racingcar/build/classes/java/main/Application.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
16 changes: 16 additions & 0 deletions racingcar/build/tmp/compileJava/source-classes-mapping.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
racingcar/Winner.java
racingcar.Winner
racingcar/Game.java
racingcar.Game
view/ResultView.java
view.ResultView
Application.java
Application
view/InputView.java
view.InputView
racingcar/Car.java
racingcar.Car
racingcar/Cars.java
racingcar.Cars
utils/RandomUtils.java
utils.RandomUtils
Binary file added racingcar/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions racingcar/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading