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
980
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
690
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
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.2k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
240
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
イベント駆動で成長して委員会
happymana
1
310
as(型アサーション)を書く前にできること
marokanatani
7
2.5k
JavaでLチカしたい! / JJUG CCC 2024 Fall LT
nhayato
0
140
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
470
CSC509 Lecture 12
javiergs
PRO
0
160
CSC509 Lecture 09
javiergs
PRO
0
140
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
470
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.3k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
327
21k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Done Done
chrislema
181
16k
Teambox: Starting and Learning
jrom
133
8.8k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building an army of robots
kneath
302
42k
BBQ
matthewcrist
85
9.3k
YesSQL, Process and Tooling at Scale
rocio
169
14k
The Cult of Friendly URLs
andyhume
78
6k
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!