SlideShare a Scribd company logo
1 of 37
Download to read offline
Codemotion ROME
@bit_shark
Andrea Giuliano
Think horizontallydo not use lighters to open beers
Giulio De Donato
andreagiuliano.it welcometothebundle.com
@liuggio
11-12 april 2014
Think
horizontally
@bit_shark @liuggio#codemotion
hint
We won't use technicisms and acronyms.
Please see the references, we have had a lot of inspiration
thinking ideal
@bit_shark @liuggio#codemotion
Given an application with certain requirements
which is the technology that fit the application requirements?
thinking real
@bit_shark @liuggio#codemotion
Given an application with certain requirements,
I’m guru on Java I’ll use Java.
think too much…
… at the same technology
@bit_shark @liuggio#codemotion
What’s wrong here?
I’m developing a tech-centric application
I’m fitting business requirements with technical boundaries
rethink to
the origin
@bit_shark @liuggio#codemotion
But what about our preferred technology?
Was it the coolest? The most requested for working? Or trivially the simplest?
think about
laziness
@bit_shark @liuggio#codemotion
A developer should choose
not the simplest tech
The developer laziness drive the
developer to reuse its code!
different thoughts
@bit_shark @liuggio#codemotion
A language can lack on some structural characteristic
(polymorphism, strong typing)
think with ease
@bit_shark @liuggio#codemotion
The success of a language is it’s distributability
(cheap, easy, zero-conf)?
a thought for thought
@bit_shark @liuggio#codemotion
There are successful application written in lacking languages
The success of the business make the success of the application
thinking relational
@bit_shark @liuggio#codemotion
EAV
thousand of libraries choose the relational
model instead of schemaless
• simplicity to distribute and install
• even though some arguable tech detail
think to aim
the success
@bit_shark @liuggio#codemotion
nosql
Using the right technology in some
cases could lead to a wrong choice
Shaggio theorem
@bit_shark @liuggio#codemotion
Hypothesis: supposing a developer knows every technology
and make a good choice for a complex application
Thesis: whatever will be the choice could be the wrong choice
…we are thinking to the app
as a one big global ‘entity'
think modular
@bit_shark @liuggio#codemotion
we want to split the application in as many
as possible modules choosing the “right”
technology for each module
think…
@bit_shark @liuggio#codemotion
• Split the business needs in subsets… a subset could be composed by services...
• Spit and conquer and Object Oriented Design
• If you have to implement a complex system, don’t implement a complex
system, implement a lot of simple systems
think procedural
@bit_shark @liuggio#codemotion
developing with procedural is misleading, at the beginning
you feel powerful, fast…
think WTF!
@bit_shark @liuggio#codemotion
• How many times you will modify the application, did you think about Maintenance costs?
• Procedural is when you create a fast program (at the beginning) but difficult to maintain.
“Tragically, the very same forces that make it so easy
to add new features to a brand new Rails
application are the ones that start to hold you back
as the number of features grows.” cit. Matt Wynne
think connected
Time
Feature
😊
😁
😰
🏃
@bit_shark @liuggio#codemotion
think connected
Time
Feature
😊
😁
😰
🏃
@bit_shark @liuggio#codemotion
• The procedural code is sick with a disease called "code connected”
• Object-oriented programming is not immune
• Time increases exponentially with the addition of new features.
think “Operation”
@bit_shark @liuggio#codemotion
All the programs are difficult to maintain, but decoupled software is easier
How to understand if my code is decoupled?
If you modify here and you don’t break over there.
Time
Feature
think maintainability
@bit_shark @liuggio#codemotion
TDD
Time
Feature
think maintainability
@bit_shark @liuggio#codemotion
TDD
• Modularity is the main concept of Object Oriented Design
• The trend has changed (90 years ago), now we have to focus on maintainability
• The overhead of testing before code is smaller than you think and the real adding
value is the way you develop better your application
Think back to ‘89
@bit_shark @liuggio#codemotion
responsability driven approach!
SOLID principles
• R. Wirfs-Brock, B. Wilkerson, “Object-Oriented Design: A Responsibility-Driven Approach”
• Single responsibility principle Uncle Bob
• Create a module coupling things that changes together?
• Modules that communicates, but how?
think tell don’t ask
Matt Wayne, Uncle Bob, Alec Sharp and Martin Fowler
@bit_shark @liuggio#codemotion
think behaviour
@bit_shark @liuggio#codemotion
dependency injection
• Modules that communicate via protocols
• Modules that exhibit a behavior not their data
• Data are the guts of the module, they must not be exposed
• All the public functions are API, let's take care and give them a meaning.
• Each module should have its own explicit dependencies
think and code
@bit_shark @liuggio#codemotion
1. An employee has always a name and a salary!
2. The salary is always greater than zero!
3. A company could add an employee
think and code
@bit_shark @liuggio#codemotion
1. An employee has always a name and a salary!
2. The salary is always greater than zero!
3. A company could add an employee
@bit_shark @liuggio#codemotion
think invariant
1. An employee has always a name and a salary!
2. The salary is always greater than zero!
3. A company could add an employee
@bit_shark @liuggio#codemotion
think consistent
1. An employee has always a name and a salary!
2. The salary is always greater than zero!
3. A company could add an employee
@bit_shark @liuggio#codemotion
think business language
3. A company could hire an employee
1. An employee has always a name and a salary!
2. The salary is always greater than zero!
3. A company could add an employee
think behaviour not data
@bit_shark @liuggio#codemotion
Bdd!
specification
think

Behaviour
Driven
Development
@bit_shark @liuggio#codemotion
That's why with BDD (stories and specs) you
are more forced not to test the application
but you focus on describe the behaviors.
With BDD you tend to describes the behavior
before coding, you specify what a function
should do.
think behaviour
defer implementation
@bit_shark @liuggio#codemotion
think onion
@bit_shark @liuggio#codemotion
hexagonal
Database as implementation detail
Framework as implementation detail
think to clean the Architecture
Application goal: separation of concerns
Easy substitution of obsolete elements without affecting others components of the architecture
Andrea Giuliano
@bit_shark
andreagiuliano.it
Giulio De Donato
@liuggio
welcometothebundle.com
T h i n k y o u !
Thank
References
https://farm3.staticflickr.com/2491/4193434786_306120fe90_b.jpg
https://farm8.staticflickr.com/7185/13732796883_58bb40fae9_b.jpg
https://farm8.staticflickr.com/7290/12859759305_51e8685d43_b.jpg
https://www.flickr.com/photos/lovezonero/5304831965/sizes/l/
http://i.imgur.com/xl9v1on.jpg
https://farm4.staticflickr.com/3404/3633209399_467123a6ca_o.jpg
https://farm1.staticflickr.com/188/391815999_2725ca688c_b.jpg
https://farm2.staticflickr.com/1116/1486403962_d055d8b1f9_o.jpg
https://farm4.staticflickr.com/3055/2852526965_bee2642e0f_o.jpg
- Growing Object-Oriented Software by Guided by Tests, Steve Freeman, Nat Pryce
- Implementing Domain-Driven Design by Vaughn Vernon
- Unbreakable Domain Models by Mathias Verraes
- Uncle Bob the clean Architecture http://blog.8thlight.com/uncle-bob/2012/08/13/
the-clean-architecture.html
- DDD community
- Matt Wayne GoRuCo 2012 Hexagonal Rails by Matt Wynne
- Implementing Domain-Driven Design with Spring and vFabric Wes Williams, Vaughn
Vernon
- The RSpec Book Behaviour-Driven Development with RSpec, Cucumber, and Friends
by David Chelimsky, Dave Astels, Zach Dennis, Aslak Hellesøy, Bryan Helmkamp,
Dan North
- Alberto Brandolini http://www.slideshare.net/ziobrando/
https://farm6.staticflickr.com/5134/5449083311_9a856145fa_b.jpg
https://farm3.staticflickr.com/2583/3752448573_4cc6a2698a_b.jpg
https://farm4.staticflickr.com/3325/3420223723_2805816861_b.jpg
https://farm1.staticflickr.com/118/313590022_25c580474c_b.jpg
https://farm4.staticflickr.com/3274/2886945884_8dfa5d849f_b.jpg
https://farm5.staticflickr.com/4013/4290367973_c58749d73f_b.jpg
https://farm9.staticflickr.com/8327/8091221482_dce187e288_b.jpg
https://farm1.staticflickr.com/48/108484055_b07800b7c7_b.jpg
https://farm8.staticflickr.com/7115/7445550970_32ac507395_b.jpg
Assets

More Related Content

Similar to Think horizontally ood, ddd and bdd

Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013
Nick Galbreath
 
1430 jeff gothelf - the ladders case study - sll-conf_2011_gothelf
1430   jeff gothelf - the ladders case study - sll-conf_2011_gothelf1430   jeff gothelf - the ladders case study - sll-conf_2011_gothelf
1430 jeff gothelf - the ladders case study - sll-conf_2011_gothelf
Eric Ries
 
6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices
Dynatrace
 
Protection and Verification of Security Design Flaws
Protection and Verification of Security Design FlawsProtection and Verification of Security Design Flaws
Protection and Verification of Security Design Flaws
Hdiv Security
 

Similar to Think horizontally ood, ddd and bdd (20)

DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps StoryDOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
DOES16 London - Jonathan Fletcher - Re-imagining Hiscox IT: A DevOps Story
 
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
Best Practices for API Adoption - WIP Factory presentation for AnyPresence we...
 
Managing Responsive Design Projects
Managing Responsive Design ProjectsManaging Responsive Design Projects
Managing Responsive Design Projects
 
Managing Responsive Design Projects
Managing Responsive Design ProjectsManaging Responsive Design Projects
Managing Responsive Design Projects
 
How I ended up contributing to Magento core
How I ended up contributing to Magento coreHow I ended up contributing to Magento core
How I ended up contributing to Magento core
 
Optimizing developer onboarding
Optimizing developer onboardingOptimizing developer onboarding
Optimizing developer onboarding
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
really really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfacesreally really really awesome php application with bdd behat and iterfaces
really really really awesome php application with bdd behat and iterfaces
 
Technical Debt.pptx
Technical Debt.pptxTechnical Debt.pptx
Technical Debt.pptx
 
Designing a secure software development process with DevOps
Designing a secure software development process with DevOpsDesigning a secure software development process with DevOps
Designing a secure software development process with DevOps
 
Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013Faster Secure Software Development with Continuous Deployment - PH Days 2013
Faster Secure Software Development with Continuous Deployment - PH Days 2013
 
1430 jeff gothelf - the ladders case study - sll-conf_2011_gothelf
1430   jeff gothelf - the ladders case study - sll-conf_2011_gothelf1430   jeff gothelf - the ladders case study - sll-conf_2011_gothelf
1430 jeff gothelf - the ladders case study - sll-conf_2011_gothelf
 
Why do mobile projects (still) fail - September 2014 edition
Why do mobile projects (still) fail - September 2014 editionWhy do mobile projects (still) fail - September 2014 edition
Why do mobile projects (still) fail - September 2014 edition
 
6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices6 ways DevOps helped PrepSportswear move from monolith to microservices
6 ways DevOps helped PrepSportswear move from monolith to microservices
 
Four Laws of Tech Product Economics - Rich Mironov
Four Laws of Tech Product Economics - Rich MironovFour Laws of Tech Product Economics - Rich Mironov
Four Laws of Tech Product Economics - Rich Mironov
 
Protection and Verification of Security Design Flaws
Protection and Verification of Security Design FlawsProtection and Verification of Security Design Flaws
Protection and Verification of Security Design Flaws
 
Neil Perlin - We're Going Mobile! Great! Are We Ready?
Neil Perlin - We're Going Mobile! Great! Are We Ready?Neil Perlin - We're Going Mobile! Great! Are We Ready?
Neil Perlin - We're Going Mobile! Great! Are We Ready?
 
Introduction to Serverless. Oracle Fn Project.
Introduction to Serverless. Oracle Fn Project.Introduction to Serverless. Oracle Fn Project.
Introduction to Serverless. Oracle Fn Project.
 
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
Losing Sight of DevOps in an Automation Forest - devopsdays Atlanta 2013
 
How to Create an Agile Content Factory
How to Create an Agile Content FactoryHow to Create an Agile Content Factory
How to Create an Agile Content Factory
 

More from Giulio De Donato

Leaphly fight monolothic today
Leaphly fight monolothic todayLeaphly fight monolothic today
Leaphly fight monolothic today
Giulio De Donato
 

More from Giulio De Donato (11)

Docker italia fatti un container tutto tuo
Docker italia fatti un container tutto tuoDocker italia fatti un container tutto tuo
Docker italia fatti un container tutto tuo
 
Lets isolate a process with no container like docker
Lets isolate a process with no container like dockerLets isolate a process with no container like docker
Lets isolate a process with no container like docker
 
More developers on DevOps with Docker orchestration
More developers on DevOps with Docker orchestrationMore developers on DevOps with Docker orchestration
More developers on DevOps with Docker orchestration
 
Json web token api authorization
Json web token api authorizationJson web token api authorization
Json web token api authorization
 
I came i saw i go - golang it meetup codemotion rome 2014
I came i saw i go - golang it meetup codemotion rome 2014I came i saw i go - golang it meetup codemotion rome 2014
I came i saw i go - golang it meetup codemotion rome 2014
 
Benchmark Profile and Boost your Symfony application
Benchmark Profile and Boost your Symfony applicationBenchmark Profile and Boost your Symfony application
Benchmark Profile and Boost your Symfony application
 
Leaphly fight monolothic today
Leaphly fight monolothic todayLeaphly fight monolothic today
Leaphly fight monolothic today
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
 
Design pattern in Symfony2 - Nanos gigantium humeris insidentes
Design pattern in Symfony2 - Nanos gigantium humeris insidentesDesign pattern in Symfony2 - Nanos gigantium humeris insidentes
Design pattern in Symfony2 - Nanos gigantium humeris insidentes
 
Caching and data analysis will move your Symfony2 application to the next level
Caching and data analysis will move your Symfony2 application to the next levelCaching and data analysis will move your Symfony2 application to the next level
Caching and data analysis will move your Symfony2 application to the next level
 
Rationally boost your symfony2 application with caching tips and monitoring
Rationally boost your symfony2 application with caching tips and monitoringRationally boost your symfony2 application with caching tips and monitoring
Rationally boost your symfony2 application with caching tips and monitoring
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

Think horizontally ood, ddd and bdd