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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hiraq Citra M
May 27, 2015
Programming
1.1k
0
Share
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
200
Laravel 5 - Event & Queue
hiraq
0
3.6k
Golang The Hardway
hiraq
0
710
Development Tools In Scala
hiraq
1
79
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
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
130
安いハードウェアでVulkan
fadis
1
870
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
210
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
1.2k
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
740
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
1.2k
おれのAgentic Coding 2026/03
tsukasagr
1
120
KagglerがMixSeekを触ってみた
morim
0
360
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
530
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
110
「速くなった気がする」をデータで疑う
senleaf24
0
120
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
750
Featured
See All Featured
Tell your own story through comics
letsgokoyo
1
880
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
450
We Have a Design System, Now What?
morganepeng
55
8.1k
Between Models and Reality
mayunak
2
250
Believing is Seeing
oripsolob
1
100
New Earth Scene 8
popppiees
2
2k
Practical Orchestrator
shlominoach
191
11k
Test your architecture with Archunit
thirion
1
2.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
470
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!