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
170
Laravel 5 - Event & Queue
hiraq
0
3.6k
Golang The Hardway
hiraq
0
700
Development Tools In Scala
hiraq
1
72
Git WorkFlow & Best Practice
hiraq
2
120
API - WEB SERVICE - BASIC
hiraq
2
110
TDD - Think First, Code Later, PHP Way
hiraq
5
170
Apache Solr & PHP - Introduction
hiraq
2
170
Other Decks in Programming
See All in Programming
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.4k
functionalなアプローチで動的要素を排除する
ryopeko
1
580
ASP.NET Core の OpenAPIサポート
h455h1
0
140
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
6
1.9k
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
400
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
220
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
9
1.4k
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
130
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
610
各クラウドサービスにおける.NETの対応と見解
ymd65536
0
250
為你自己學 Python
eddie
0
530
GitHub CopilotでTypeScriptの コード生成するワザップ
starfish719
27
6k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Six Lessons from altMBA
skipperchong
27
3.6k
A designer walks into a library…
pauljervisheath
205
24k
Designing Experiences People Love
moore
139
23k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
Designing for Performance
lara
604
68k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
RailsConf 2023
tenderlove
29
980
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Typedesign – Prime Four
hannesfritz
40
2.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
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!