Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Specing interactors con BDD PHPSpec2 y YOLO fra...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
cordoval
October 04, 2013
Technology
6.1k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Specing interactors con BDD PHPSpec2 y YOLO framework
DDD inside :)
cordoval
October 04, 2013
More Decks by cordoval
See All by cordoval
Symfony Components in the Wild Drupal Jungle
cordoval
1
2.4k
Other Decks in Technology
See All in Technology
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.3k
QA4AI 2026-Oct 生成AI時代の品質保証
tokuty
1
880
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
120
WasmをRustにする
sansantech
PRO
0
260
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
480
夫婦で子育てするための育児標準化
codmoninc
PRO
0
410
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
350
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1.2k
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
160
Running Kotlin + Quarkus with Lambda
nealle
1
3.8k
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
300
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Visualization
eitanlees
153
17k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
The Invisible Side of Design
smashingmag
301
52k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Building an army of robots
kneath
307
47k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
We Are The Robots
honzajavorek
0
400
The World Runs on Bad Software
bkeepers
PRO
72
12k
Transcript
Specking Interactors with PHPSpec and YOLO Toward the scorners he
is scornful, but to the humble he gives favor. ~ Proverbs 3:34 Friday, October 4, 13
Take control of your project and live a simpler life
Toward the scorners he is scornful, but to the humble he gives favor. ~ Proverbs 3:34 Friday, October 4, 13
Framework != Domain Friday, October 4, 13
Test First Friday, October 4, 13
Domain Domain Friday, October 4, 13
Implementations are Details Friday, October 4, 13
http://www.austinchronicle.com/binary/d294/SS.Hook._leftsideonly_.jpg Friday, October 4, 13
http://www.collider.com/wp-content/uploads/Inception-movie-poster-2.jpg Friday, October 4, 13
http://static.guim.co.uk/sys-images/Film/Pix/pictures/2008/06/06/matrix460.jpg Friday, October 4, 13
Signs of Inception Friday, October 4, 13
Our Framework The Best Friday, October 4, 13
Our Practices The Best Friday, October 4, 13
Our Community never makes mistakes Friday, October 4, 13
Framework is convenient Friday, October 4, 13
But we are not solving The Problem Friday, October 4,
13
Friday, October 4, 13
Friday, October 4, 13
Friday, October 4, 13
Friday, October 4, 13
Domain Friday, October 4, 13
Domain Expert Friday, October 4, 13
BDD Friday, October 4, 13
BDD Tools Behat, PhpSpec Friday, October 4, 13
but DDD is for Large Systems ... Friday, October 4,
13
Friday, October 4, 13
show me how... Friday, October 4, 13
Friday, October 4, 13
Problem: some don’t want to pay for certification exams, so
let’s build a community site for those exams. Friday, October 4, 13
Before we jump into the sauce: Find a qualified examiner,
could be a real educator if not then try to become one Friday, October 4, 13
Spec First ↝ BDD + DDD Feature: student can take
an exam Scenario: student takes an exam Given student starts an exam And student is presented with a question When student answers to question ... Then student ends exam and gets graded Friday, October 4, 13
Modeling feature DSL BDD Scenario Learning Process Friday, October 4,
13
Modeling feature DSL entity service repository interactor (use case) port
value object BDD Scenario Support BDD Learning Process Friday, October 4, 13
Modeling feature DSL entity service repository interactor (use case) port
value object Exam Repository Attempt Repository Attempt Question Exam Grader Converter ShowAll Exams Grade Attempt BDD Scenario BDD Spec Support BDD Learning Process Friday, October 4, 13
Modeling feature DSL entity service repository interactor (use case) port
value object Exam Repository Attempt Repository Attempt Question Exam Grader Converter ShowAll Exams Grade Attempt BDD Scenario BDD Spec Support BDD DDD Breaking and Fixing Specs Learning Process Friday, October 4, 13
Modeling feature DSL entity service repository interactor (use case) port
value object Exam Repository Attempt Repository Attempt Question Exam Grader Converter ShowAll Exams Grade Attempt BDD Scenario BDD Spec Support BDD DDD Refactoring Behavior DDD Breaking and Fixing Specs Learning Process Friday, October 4, 13
Learning Process Friday, October 4, 13
Folder Structure To convey: - inversion of dependencies - make
dependencies explicit - domain and infrastructure separation - bounded context separation Friday, October 4, 13
~ tree -L 6 !"" features # !"" student_takes_exam.feature #
$"" teacher_builds_exam.feature !"" spec # $"" Simulator # !"" Domain # # !"" Model # # # $"" Exam # # # !"" AttemptSpec.php # # # !"" ExamSpec.php # # # !"" OptionSpec.php # # # $"" QuestionSpec.php # # !"" Port # # # !"" AnswerSpec.php # # # !"" ExamSpec.php Notice these are specs! Friday, October 4, 13
~ tree -L 6 !"" features # !"" student_takes_exam.feature #
$"" teacher_builds_exam.feature !"" spec # $"" Simulator # !"" Domain # # !"" Model # # # $"" Exam # # # !"" AttemptSpec.php # # # !"" ExamSpec.php # # # !"" OptionSpec.php # # # $"" QuestionSpec.php # # !"" Port # # # !"" AnswerSpec.php # # # !"" ExamSpec.php Friday, October 4, 13
~ tree -L 6 !"" features # !"" student_takes_exam.feature #
$"" teacher_builds_exam.feature !"" spec # $"" Simulator # !"" Domain # # !"" Model # # # $"" Exam # # # !"" AttemptSpec.php # # # !"" ExamSpec.php # # # !"" OptionSpec.php # # # $"" QuestionSpec.php # # !"" Port # # # !"" AnswerSpec.php # # # !"" ExamSpec.php Friday, October 4, 13
~ tree -L 6 ... # # !"" Port #
# # !"" AnswerSpec.php # # # !"" ExamSpec.php # # # $"" ExamsSpec.php # # !"" Services # # # !"" ExamsConverterSpec.php # # # !"" GraderSpec.php # # # $"" PrototypeManagerSpec.php # # !"" Support # # # $"" StudentHelperSpec.php # # $"" UseCase # # !"" GradesAttemptSpec.php Friday, October 4, 13
~ tree -L 6 ... # # !"" Port #
# # !"" AnswerSpec.php # # # !"" ExamSpec.php # # # $"" ExamsSpec.php # # !"" Services # # # !"" ExamsConverterSpec.php # # # !"" GraderSpec.php # # # $"" PrototypeManagerSpec.php # # !"" Support # # # $"" StudentHelperSpec.php # # $"" UseCase # # !"" GradesAttemptSpec.php Friday, October 4, 13
~ tree -L 6 ... # # !"" Port #
# # !"" AnswerSpec.php # # # !"" ExamSpec.php # # # $"" ExamsSpec.php # # !"" Services # # # !"" ExamsConverterSpec.php # # # !"" GraderSpec.php # # # $"" PrototypeManagerSpec.php # # !"" Support # # # $"" StudentHelperSpec.php # # $"" UseCase # # !"" GradesAttemptSpec.php Friday, October 4, 13
~ tree -L 6 ... # $"" Infrastructure # !""
Cilex # # !"" Command # # # $"" ShowAllExamsCommand.php # # !"" Console # # # $"" Runner.php # # !"" Provider # # # $"" SimulatorServiceProvider.php # # $"" config.yml Friday, October 4, 13
~ tree -L 6 ... # $"" Infrastructure | ...
# !"" Persistence # # !"" Doctrine # # # $"" OrmExamRepository.php # # !"" InMemoryAttemptRepository.php # # !"" InMemoryExamRepository.php # # $"" PDO # # $"" PdoExamRepository.php # !"" Symfony # # $"" Bundle # # $"" SimulatorBundle # $"" Yolo # $"" Controller # $"" ExamController.php Friday, October 4, 13
~ tree -L 6 ... # $"" Infrastructure | ...
# !"" Persistence # # !"" Doctrine # # # $"" OrmExamRepository.php # # !"" InMemoryAttemptRepository.php # # !"" InMemoryExamRepository.php # # $"" PDO # # $"" PdoExamRepository.php # !"" Symfony # # $"" Bundle # # $"" SimulatorBundle # $"" Yolo # $"" Controller # $"" ExamController.php Friday, October 4, 13
~ tree -L 6 ... # $"" Infrastructure | ...
# !"" Persistence # # !"" Doctrine # # # $"" OrmExamRepository.php # # !"" InMemoryAttemptRepository.php # # !"" InMemoryExamRepository.php # # $"" PDO # # $"" PdoExamRepository.php # !"" Symfony # # $"" Bundle # # $"" SimulatorBundle # $"" Yolo # $"" Controller # $"" ExamController.php Friday, October 4, 13
What if I ask you which classes implement the features?
Friday, October 4, 13
Folder Structure ~ tree -L 6 ... # # !""
Port # # # !"" AnswerSpec.php # # # !"" ExamSpec.php # # # $"" ExamsSpec.php # # !"" Services # # # !"" ExamsConverterSpec.php # # # !"" GraderSpec.php # # # $"" PrototypeManagerSpec.php # # !"" Support # # # $"" StudentHelperSpec.php # # $"" UseCase # # !"" GradesAttemptSpec.php This bring us back to interactors/use cases Friday, October 4, 13
Friday, October 4, 13
Friday, October 4, 13
Domain ↝ Domain - intention - expressive - explicit Friday,
October 4, 13
Domain ↝ Domain Friday, October 4, 13
Domain ↝ Domain Friday, October 4, 13
Show what you did :) Friday, October 4, 13
"repositories": [ { "type": "vcs", "url": "
[email protected]
:cordoval/ExamSimulator" } ], "require":
{ "igorw/yolo": "dev-master", "cordoval/exam-simulator": "dev-master" }, Friday, October 4, 13
~ php bin/console exams:show - yolo - part I -
yolo - part II All exams displayed Friday, October 4, 13
http:// craftitonline.com END Friday, October 4, 13