Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Introduction Repository, DDD And Unit Test
Search
Hiraq Citra M
May 27, 2015
Programming
0
1k
Introduction Repository, DDD And Unit Test
case study on laravel 5, implement repository patter, a little about ddd and unit tests
Hiraq Citra M
May 27, 2015
Tweet
Share
More Decks by Hiraq Citra M
See All by Hiraq Citra M
Functional Programming & Team Development
hiraq
0
200
Laravel 5 - Event & Queue
hiraq
0
3.6k
Golang The Hardway
hiraq
0
710
Development Tools In Scala
hiraq
1
77
Git WorkFlow & Best Practice
hiraq
2
130
API - WEB SERVICE - BASIC
hiraq
2
110
TDD - Think First, Code Later, PHP Way
hiraq
5
170
Apache Solr & PHP - Introduction
hiraq
2
180
Other Decks in Programming
See All in Programming
ゆくKotlin くるRust
exoego
1
200
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
5.3k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
660
Python札幌 LT資料
t3tra
7
1.1k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
490
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.3k
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
720
ThorVG Viewer In VS Code
nors
0
670
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.2k
Cap'n Webについて
yusukebe
0
170
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
160
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
780
Featured
See All Featured
For a Future-Friendly Web
brad_frost
180
10k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
420
Designing Experiences People Love
moore
143
24k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
81
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
41
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
0
1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
140
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
110
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
130
Measuring & Analyzing Core Web Vitals
bluesmoon
9
730
Transcript
Introduction Repository, DDD & Unit Tests
Agenda - Repository - DDD - Unit Test Case Study
: Working on Laravel 5.0
Stories - I want to test the data logic but
i dont care the data engine (database) - I want to test the data engine (database) but i dont care the data logic automated tests...
In Reality
Problem? “ the power of united data logic and database,
called ORM “
Real problem? As programmer we have to make sure every
single unit should be working properly.. the keyword is -> every single unit of our code
Repository
Benefit? - We can test logic without engine - We
can test engine without logic - We can test the repository it self easy to mocking… separation of concerns...
DDD Solve complex needs by modelling the domain
DDD Things - Entity. Unique object - ValueObject. Immutable object
Example Users data that contain their credentials like email, username
and password. In DDD: User is an entity, password can be a ValueObject.
Unit Test 1 class 1 responsibility We should can test
each of 1 class without thinking the dependency complexity (replace all dependency with mock)
Enough! SHOW ME THE CODES!