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
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
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
170
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
2
430
仕様駆動開発の消費期限
watany
20
8.9k
Dockerfile CMD for Node.js
grazie1999
0
120
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
200
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
180
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
460
Building a Meta Ray-Ban display app
akkeylab
0
180
React本体のコードリーディング
high_g_engineer
1
150
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
160
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1k
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
550
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
480
Thoughts on Productivity
jonyablonski
76
5.3k
Mobile First: as difficult as doing things right
swwweet
225
10k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
310
Abbi's Birthday
coloredviolet
3
9.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
250
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
440
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
380
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
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!