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
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
82
Git WorkFlow & Best Practice
hiraq
2
140
API - WEB SERVICE - BASIC
hiraq
2
120
TDD - Think First, Code Later, PHP Way
hiraq
5
180
Apache Solr & PHP - Introduction
hiraq
2
180
Other Decks in Programming
See All in Programming
仕様駆動開発の消費期限
watany
20
8.9k
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
Dockerfile CMD for Node.js
grazie1999
0
120
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
170
React本体のコードリーディング
high_g_engineer
1
150
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
540
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.7k
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
240
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
160
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
180
Press start. Python's next generation.
willingc
PRO
2
110
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
220
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Design in an AI World
tapps
1
290
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
810
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
390
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Ace a Technical Interview
jacobian
281
24k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How to Talk to Developers About Accessibility
jct
2
520
Ruling the World: When Life Gets Gamed
codingconduct
0
310
Become a Pro
speakerdeck
PRO
31
6.2k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
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!