# Mapping Between Layers

> Mapping Between Layers in the Mobile Action Pro course.

- URL: https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/06-clean-architecture/lesson-11-mapping-layers
- Course: [Mobile Action Pro](https://dantech.academy/en/courses/kotlin-accelerator.md)
- Module: Clean Architecture in Depth
- Duration: 25 min
- Difficulty: intermediate
- Access: Enrolled students
- Tiếng Việt: https://dantech.academy/courses/kotlin-accelerator/engineer-builder/06-clean-architecture/lesson-11-mapping-layers.md

## Objectives

- Explain why there are separate row/DTO, domain model and UI state types
- Write pure mappers at the right boundary: data to domain, domain to UI
- Recognize mappers that protect real money and stored data, and pin them with tests

## In this lesson

1. Lesson Goal
2. Part 1: Three Kinds Of Models, Three Reasons To Change
3. Part 2: Data To Domain, The Leaderboard
4. Part 3: Domain To UI, The Leaderboard And The Game Screen
5. Part 4: A Mapper That Protects Real Money
6. Part 5: A Storage DTO Is A Contract
7. Practice Exercise
8. Code Reading Path
9. Signs To Avoid
10. References
11. Key Points

## Study with an AI agent

The full lesson is for students of this course. Students open the lesson on the web and press **Markdown** to copy all of it, then paste it into Claude, ChatGPT, Cursor or whichever agent you use. Faster: mint a token at `/profile/ai-agents` and your agent reads lessons over MCP.

- [Join the course](https://dantech.academy/en/kotlin-accelerator/checkout)

---

- Previous lesson: [Data Flow Patterns](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/06-clean-architecture/lesson-08-data-flow-patterns.md)
- Next lesson: [Best Practices And Anti-Patterns](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/06-clean-architecture/lesson-12-best-practices.md)
