Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Introduction Repository, DDD And Unit Test
Search
Hiraq Citra M
May 27, 2015
Programming
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Hiraq Citra M
See All by Hiraq Citra M
Functional Programming & Team Development
hiraq
0
210
Laravel 5 - Event & Queue
hiraq
0
3.6k
Golang The Hardway
hiraq
0
720
Development Tools In Scala
hiraq
1
82
Git WorkFlow & Best Practice
hiraq
2
140
API - WEB SERVICE - BASIC
hiraq
2
120
TDD - Think First, Code Later, PHP Way
hiraq
5
180
Apache Solr & PHP - Introduction
hiraq
2
180
Other Decks in Programming
See All in Programming
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
600
What We Talk About When We Talk About XP
m_seki
2
490
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
170
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
280
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
150
App Intentsのビルドプロセスを支える技術
kntkymt
0
230
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
220
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
650
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
300
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
450
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
1.1k
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
280
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
720
GitHub's CSS Performance
jonrohan
1033
470k
Evolving SEO for Evolving Search Engines
ryanjones
0
280
Skip the Path - Find Your Career Trail
mkilby
1
220
The SEO Collaboration Effect
kristinabergwall1
1
550
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
Exploring anti-patterns in Rails
aemeredith
3
500
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
New Earth Scene 8
popppiees
3
2.5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
520
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
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!