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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
Understanding Apache Lucene - More than just full-text search
spinscale
0
110
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
150
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
320
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
510
「抽象に依存せよ」が分からなかった新卒1年目の私が Goのインターフェースと和解するまで
kurogenki
0
110
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
200
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
130
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
440
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
260
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Practical Orchestrator
shlominoach
191
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
A designer walks into a library…
pauljervisheath
210
24k
It's Worth the Effort
3n
188
29k
Producing Creativity
orderedlist
PRO
348
40k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
190
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
200
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Documentation Writing (for coders)
carmenintech
77
5.3k
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!