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
920
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
150
Laravel 5 - Event & Queue
hiraq
0
3.6k
Golang The Hardway
hiraq
0
690
Development Tools In Scala
hiraq
1
67
Git WorkFlow & Best Practice
hiraq
2
120
API - WEB SERVICE - BASIC
hiraq
2
99
TDD - Think First, Code Later, PHP Way
hiraq
5
150
Apache Solr & PHP - Introduction
hiraq
2
170
Other Decks in Programming
See All in Programming
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
130
HUIT新歓2024「競技プログラミング、やってみませんか?」
slephy2784
1
260
Build with AI 2024 Seoul - 제로부터 시작하는 Flutter with Gemini 생활 - 박제창
itsmedreamwalker
0
200
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
810
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
160
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
660
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
5
870
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
210
Semantic search with Django and pgvector
pauloxnet
0
240
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
エンターテイメント業界で利用されるAWS
demuyan
0
210
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
A designer walks into a library…
pauljervisheath
199
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
Agile that works and the tools we love
rasmusluckow
324
20k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
The Mythical Team-Month
searls
215
42k
Building Better People: How to give real-time feedback that sticks.
wjessup
354
18k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
The Art of Programming - Codeland 2020
erikaheidi
41
12k
Infographics Made Easy
chrislema
238
18k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Unsuck your backbone
ammeep
663
57k
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!