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
80
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
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
まかせられるPM・まかせられないPM / DevTech GUILD Meetup
yusukemukoyama
0
110
20260320登壇資料
pharct
0
170
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
370
レガシーPHP転生 〜父がドメインエキスパートだったのでDDD+Claude Codeでチート開発します〜
panda_program
0
630
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
6.1k
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
870
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
5.6k
Vibe NLP for Applied NLP
inesmontani
PRO
0
210
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
190
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
「速くなった気がする」をデータで疑う
senleaf24
0
150
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
160
The agentic SEO stack - context over prompts
schlessera
0
740
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
430
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
Exploring anti-patterns in Rails
aemeredith
3
310
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
510
Producing Creativity
orderedlist
PRO
348
40k
RailsConf 2023
tenderlove
30
1.4k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
110
Agile that works and the tools we love
rasmusluckow
331
21k
Navigating Weather and Climate Data
rabernat
0
160
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!