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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
Grafana:建立系統全知視角的捷徑
blueswen
0
330
CSC307 Lecture 06
javiergs
PRO
0
690
Patterns of Patterns
denyspoltorak
0
1.4k
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
600
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
CSC307 Lecture 09
javiergs
PRO
1
840
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
200
Oxlint JS plugins
kazupon
1
980
並行開発のためのコードレビュー
miyukiw
0
290
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
200
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
A Soul's Torment
seathinner
5
2.3k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
HDC tutorial
michielstock
1
390
Making the Leap to Tech Lead
cromwellryan
135
9.7k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
The SEO Collaboration Effect
kristinabergwall1
0
350
A better future with KSS
kneath
240
18k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
56
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
590
The World Runs on Bad Software
bkeepers
PRO
72
12k
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!