JPA
Covenant Ko
Chapter 3
JPA
Entity Mapping / Hexagonal Architecture
- Name. Covenant Ko
- Company. 11번가
- Github 용감한친구들 Organization Founder & Maintainer. https://github.com/brave-people
- Github. https://github.com/KoEonYack
- Tech Blog. https://covenant.tistory.com/ (누적 방문 41만)
Q&A
https://www.javaguides.net/2018/12/jpa-entitymanager-interface-with-example.html
1. !
1. !
2. DB !
1. !
2. DB !
3. ORM !
1. !
2. DB !
3. ORM !
4. !
1. !
2. DB !
3. ORM !
4. !
5. !
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
7. !
1. !
2. DB !
3. ORM !
4. !
5. !
6. !
7. !
Week 1
Week 2
Week 2
Week 3
Clean Clean Architecture !
https://youtu.be/IHrZD3vxYB0
https://subscription.packtpub.com/book/programming/9781839211966/1
Clean Architecture
UI
Presenter
Use case
Entity
Repository
Data source
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
Clean Architecture
UI
Presenter
Use case
Entity
Repository
Data source
Data Flow
Clean Architecture
UI
Presenter
Use case
Entity
Repository
Data source
Dependency Role
1.
2.
https://ko.wikipedia.org/wiki/%EC%84%9C%EC%9A%B8%EC%8A%A4%ED%80%98%EC%96%B4
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Core
Clean Architecture
UI
Presenter
Use
case
Entity
Repository
Data
source
Presentation
Layer
Domain Layer Data Layer
Core
1. Domain (with business rules) is the most important Layer.
2. Shouldn’t have any dependencies with other layers.
3. Domain Layer does NOT depend on Data Layer.
Clean Architecture
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
Clean Architecture
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
View Presenter
Use case
Entity Repository
Clean Architecture
https://proandroiddev.com/clean-architecture-data-flow-dependency-rule-615ffdd79e29
View Presenter
Use case
Entity Repository
1. Single Responsibility Principle
2. Dependency Inversion Principle
View Presenter
Use case
Entity Repository
Hexagonal Architecture
Hexagonal Architecture
1. Core entity, use case
2.
3. 1:1
3. Core .
4. (
)
https://engineering.linecorp.com/ko/blog/port-and-adapter-architecture/
Hexagonal Architecture
RPC
HTTP API
Command Line
MySQL
Oracle
H2
1. Core entity, use case
2.
3. 1:1
3. Core .
4. (
)
Hexagonal Architecture
RPC
HTTP API
Command Line
MySQL
Oracle
H2
1. Core entity, use case
2.
3. 1:1
3. Core .
4. (
)
Spring Data JPA
Package by feature
Controller A
Data Access A Data Access B
Presentation layer
Business layer
Data Layer
Service A Service B
Controller B
Package by layer
https://engineering.linecorp.com/ko/blog/port-and-adapter-architecture/
.
.
Package by layer
https://engineering.linecorp.com/ko/blog/port-and-adapter-architecture/
1.
2.
Package by component
https://github.com/hyewonKim24/OntactOfficial
.
.
https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/#inversion-of-control
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
Hexagonal Architecture Package
Hexagonal Architecture Code
Ports are used by external components to call our application
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
Ports are used by external components to call our application
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
Service to tie all the pieces together and drive the execution
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
Service to tie all the pieces together and drive the execution
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Code
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Example Code
https://github.com/thombergs/buckpal
https://jivimberg.io/blog/2020/02/01/hexagonal-architecture-on-spring-boot/
Hexagonal Architecture Sample Code
https://blog.gaokx.de/2020/11/think-about-hexagonal-architecture-and.html
https://techblog.woowahan.com/5143/
Case Study
https://techblog.woowahan.com/5143/
Case Study
https://techblog.woowahan.com/5143/
Case Study
https://resources.experfy.com/bigdata-cloud/another-story-about-microservices-hexagonal-architecture/
Case Study
https://resources.experfy.com/bigdata-cloud/another-story-about-microservices-hexagonal-architecture/
Case Study
https://aws.amazon.com/ko/blogs/compute/developing-evolutionary-architecture-with-aws-lambda/
Case Study
Case Study
API Gateway
https://docs.microsoft.com/ko-kr/dotnet/architecture/microservices/architect-microservice-container-applications/direct-client-to-microservice-communication-versus-the-api-gateway-pattern
Case Study
API Gateway
https://docs.microsoft.com/ko-kr/dotnet/architecture/microservices/architect-microservice-container-applications/direct-client-to-microservice-communication-versus-the-api-gateway-pattern
https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-clean-cqrs-how-i-put-it-all-together/#inversion-of-control
Summary
JPA
Covenant Ko
Chapter 3
JPA
Entity Mapping / Hexagonal Architecture

JPA Week3 Entity Mapping / Hexagonal Architecture