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
210
Laravel 5 - Event & Queue
hiraq
0
3.6k
Golang The Hardway
hiraq
0
720
Development Tools In Scala
hiraq
1
81
Git WorkFlow & Best Practice
hiraq
2
140
API - WEB SERVICE - BASIC
hiraq
2
120
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
TAKTでAI駆動開発の品質を設計する
j5ik2o
4
280
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
460
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
230
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
150
LLM Plugin for Node-REDの利用方法と開発について
404background
0
150
net-httpのHTTP/2対応について
naruse
0
420
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
160
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.3k
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
440
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
7
1.3k
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
1.3k
New "Type" system on PicoRuby
pocke
1
430
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
560
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
930
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
840
The Mindset for Success: Future Career Progression
greggifford
PRO
0
350
How to make the Groovebox
asonas
2
2.2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
200
Typedesign – Prime Four
hannesfritz
42
3.1k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
200
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!