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
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
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
ロボットのための工場に灯りは要らない
watany
10
2.8k
ふつうの Rubyist、ちいさなデバイス、大きな一年
bash0c7
0
920
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
540
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
180
TipKitTips
ktcryomm
0
170
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1k
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.3k
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.3k
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
710
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
570
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
540
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
350
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Become a Pro
speakerdeck
PRO
31
5.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Side Projects
sachag
455
43k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
Done Done
chrislema
186
16k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
100
A Modern Web Designer's Workflow
chriscoyier
698
190k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
640
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
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!