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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
78
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
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Oxlint JS plugins
kazupon
1
980
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
250
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
Data-Centric Kaggle
isax1015
2
780
Grafana:建立系統全知視角的捷徑
blueswen
0
330
並行開発のためのコードレビュー
miyukiw
0
290
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
740
Architectural Extensions
denyspoltorak
0
290
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
140
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
9
36k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
440
The Mindset for Success: Future Career Progression
greggifford
PRO
0
240
The agentic SEO stack - context over prompts
schlessera
0
640
How to Ace a Technical Interview
jacobian
281
24k
Bash Introduction
62gerente
615
210k
Unsuck your backbone
ammeep
671
58k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
A better future with KSS
kneath
240
18k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
130
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!