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
220
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
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
190
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
230
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2.1k
JRuby: Past, Present, and Future
headius
0
220
FreeBSDでZabbixを動かす
kenkino
0
350
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
430
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
510
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
310
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
140
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
670
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
5.9k
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
510
Chasing Engaging Ingredients in Design
codingconduct
0
340
How to build a perfect <img>
jonoalderson
1
6.1k
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
A Soul's Torment
seathinner
8
3.7k
Music & Morning Musume
bryan
48
7.4k
Skip the Path - Find Your Career Trail
mkilby
1
240
エンジニアに許された特別な時間の終わり
watany
109
250k
The Invisible Side of Design
smashingmag
301
52k
Believing is Seeing
oripsolob
1
240
Building an army of robots
kneath
307
47k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
540
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!