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
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
77
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
これならできる!個人開発のすゝめ
tinykitten
PRO
0
140
Grafana:建立系統全知視角的捷徑
blueswen
0
260
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
ゆくKotlin くるRust
exoego
1
180
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
tparseでgo testの出力を見やすくする
utgwkk
2
330
TestingOsaka6_Ozono
o3
0
240
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
220
ゲームの物理 剛体編
fadis
0
390
CSC307 Lecture 01
javiergs
PRO
0
640
Vibe codingでおすすめの言語と開発手法
uyuki234
0
150
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
420
Featured
See All Featured
Believing is Seeing
oripsolob
0
18
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
1
330
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
58
41k
The Invisible Side of Design
smashingmag
302
51k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
370
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
0
34
Being A Developer After 40
akosma
91
590k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Language of Interfaces
destraynor
162
26k
How STYLIGHT went responsive
nonsquared
100
6k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
79
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
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!