SlideShare una empresa de Scribd logo
1 de 22
SOLID
Clean code for
mere mortals
{ What is software development?
 ‹ Software development is not (only)
   programming
 ‹ Agile Software Development:
   Principles, Patterns, and Practices
 ‹ The Pragmatic Programmer
 ‹ Manifesto for Software Craftsmanship
{ Software requirements
 ‹ Notoriously fluid
 ‹ Changes in scope
 ‹ Changes in functionalities
 ‹ Changes in environments
 ‹ The only constant is change
 ‹ We should embrace change!
{ Software Rot
 ‹ Occurs to any software that survives the
   first version
 ‹ Rigidity
 ‹ Fragility
 ‹ Immobility
 ‹ Viscosity
{ SOLID Principles
 ‹ Introduced by Robert C. Martin
   (Uncle Bob)
 ‹ An acronym of acronyms
 ‹ Not a piece of code
 ‹ Tool for “code smell” detection
{ SOLID Principles
 ‹ Single Responsibility Principle
 ‹ Open Closed Principle
 ‹ Liskov Substitution Principle
 ‹ Interface Segregation Principle
 ‹ Dependency Inversion Principle
{ SOLID
 ‹ Single Responsibility Principle
 ‹ Single Level of abstraction
 ‹ Just one reason to change
 ‹ Antithesis of the “God” object
SRP IN ACTION
{ SOLID
 ‹ Open Closed Principle
 ‹ Inspired from work on Eiffel
 ‹ Open for extensions
 ‹ Closed for modification
 ‹ Use polymorphic behaviours
OCP IN ACTION
{ SOLID
 ‹ Liskov Substitution Principle
 ‹ Named after Barbara Liskov
 ‹ Subclasses should be substitutable
   for their base classes.
 ‹ Design by Contract
 ‹ A Circle is not an Ellipse
LSP IN ACTION
{ SOLID
 ‹ Interface Segregation Principle
 ‹ It’s not always about the `interface`
   keyword
 ‹ An interface should have a single
   purpose
 ‹ An interface should define a client
ISP IN ACTION
{ SOLID
 ‹ Dependency Inversion
 ‹ Depend upon abstractions.
 ‹ Do not depend upon concretions.
 ‹ Object creation problems – use
   object factories.
 ‹ The principle behind Inversion-of-
   control and Dependency Injection
DIP IN ACTION
{ Bonus Principle: YAGNI
 ‹ You Ain’t Gonna Need It
 ‹ Just-in-time implementation
 ‹ Avoid architecture astronauts
 ‹ Simpler code is easier to refactor
 ‹ Keep it as simple as possible, but
   not simpler
Questions?
• Complete the electronic evaluation
  forms on the computers in the hall
  and enter to win!
   – Telerik Ultimate Collection
   – RedGate .NET Reflector VSPro
   – ComponentOne Enterprise Studio Suite
   – Pluralsight yearly subscriptions
   – CodeSmith Tools Generator Pro
     Personal
   – JetBrains ReSharper
   – Semos Education Training Voucher
   – and many more…
SOLID -Clean Code For Mere Mortals

Más contenido relacionado

Destacado

Servifone - IV Negocio Abierto Provincial CIT Marbella
Servifone - IV Negocio Abierto Provincial CIT MarbellaServifone - IV Negocio Abierto Provincial CIT Marbella
Servifone - IV Negocio Abierto Provincial CIT Marbella
CIT Marbella
 
La canica ingravida (recuperacion) camilo coral
La canica ingravida (recuperacion) camilo coralLa canica ingravida (recuperacion) camilo coral
La canica ingravida (recuperacion) camilo coral
camiloroblesc
 

Destacado (20)

Clean code with SOLID principles
Clean code with SOLID principlesClean code with SOLID principles
Clean code with SOLID principles
 
SOLID and Clean Code with life project example
SOLID and Clean Code with life project exampleSOLID and Clean Code with life project example
SOLID and Clean Code with life project example
 
Programming SOLID
Programming SOLIDProgramming SOLID
Programming SOLID
 
Don't Be STUPID, Grasp SOLID - ConFoo Edition
Don't Be STUPID, Grasp SOLID - ConFoo EditionDon't Be STUPID, Grasp SOLID - ConFoo Edition
Don't Be STUPID, Grasp SOLID - ConFoo Edition
 
Don't be STUPID, Grasp SOLID - North East PHP
Don't be STUPID, Grasp SOLID - North East PHPDon't be STUPID, Grasp SOLID - North East PHP
Don't be STUPID, Grasp SOLID - North East PHP
 
Yolimar
YolimarYolimar
Yolimar
 
Kato Mivule: COGNITIVE 2013 - An Overview of Data Privacy in Multi-Agent Lear...
Kato Mivule: COGNITIVE 2013 - An Overview of Data Privacy in Multi-Agent Lear...Kato Mivule: COGNITIVE 2013 - An Overview of Data Privacy in Multi-Agent Lear...
Kato Mivule: COGNITIVE 2013 - An Overview of Data Privacy in Multi-Agent Lear...
 
Programa de intercambio de estudiantes del consorcio para la colaboración en ...
Programa de intercambio de estudiantes del consorcio para la colaboración en ...Programa de intercambio de estudiantes del consorcio para la colaboración en ...
Programa de intercambio de estudiantes del consorcio para la colaboración en ...
 
Fax machine3
Fax machine3Fax machine3
Fax machine3
 
Sistemas de financiación y gestión presupuestaria
Sistemas de financiación y gestión presupuestariaSistemas de financiación y gestión presupuestaria
Sistemas de financiación y gestión presupuestaria
 
Musica & Mercado Revista #18
Musica & Mercado Revista #18Musica & Mercado Revista #18
Musica & Mercado Revista #18
 
Open source software to assist lower socio economic
Open source software to assist lower socio economicOpen source software to assist lower socio economic
Open source software to assist lower socio economic
 
Feliz navidad prospero_2014
Feliz navidad prospero_2014Feliz navidad prospero_2014
Feliz navidad prospero_2014
 
Cartel curso defensa policial contra arma blanca 2014
Cartel curso defensa policial contra arma blanca 2014Cartel curso defensa policial contra arma blanca 2014
Cartel curso defensa policial contra arma blanca 2014
 
Legio xiii vs panthers parma : american football teams -business communication
Legio xiii vs panthers parma : american football teams -business communicationLegio xiii vs panthers parma : american football teams -business communication
Legio xiii vs panthers parma : american football teams -business communication
 
Servifone - IV Negocio Abierto Provincial CIT Marbella
Servifone - IV Negocio Abierto Provincial CIT MarbellaServifone - IV Negocio Abierto Provincial CIT Marbella
Servifone - IV Negocio Abierto Provincial CIT Marbella
 
Catalogue Sản phẩm Cassida
Catalogue Sản phẩm CassidaCatalogue Sản phẩm Cassida
Catalogue Sản phẩm Cassida
 
Bulling
BullingBulling
Bulling
 
La canica ingravida (recuperacion) camilo coral
La canica ingravida (recuperacion) camilo coralLa canica ingravida (recuperacion) camilo coral
La canica ingravida (recuperacion) camilo coral
 
Sida(6)(A)
Sida(6)(A)Sida(6)(A)
Sida(6)(A)
 

Similar a SOLID -Clean Code For Mere Mortals

SOLID design principles in Ruby
SOLID design principles in RubySOLID design principles in Ruby
SOLID design principles in Ruby
Anil Wadghule
 

Similar a SOLID -Clean Code For Mere Mortals (20)

bGenius kennissessie_20120510
bGenius kennissessie_20120510bGenius kennissessie_20120510
bGenius kennissessie_20120510
 
SOLID Code
SOLID CodeSOLID Code
SOLID Code
 
Object Oriented Design Principles
Object Oriented Design PrinciplesObject Oriented Design Principles
Object Oriented Design Principles
 
Refactoring to SOLID Code
Refactoring to SOLID CodeRefactoring to SOLID Code
Refactoring to SOLID Code
 
Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo design
 
Solid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile developmentSolid OO & Clean Coding is essential to successful Agile development
Solid OO & Clean Coding is essential to successful Agile development
 
There is REST and then there is "REST"
There is REST and then there is "REST"There is REST and then there is "REST"
There is REST and then there is "REST"
 
The Architect Way
The Architect WayThe Architect Way
The Architect Way
 
SOLID design principles in Ruby
SOLID design principles in RubySOLID design principles in Ruby
SOLID design principles in Ruby
 
Principles of Object Oriented Design
Principles of Object Oriented DesignPrinciples of Object Oriented Design
Principles of Object Oriented Design
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)
 
Developer's QA Toolkit - 34th National IT Conference - Sri Lanka
Developer's QA Toolkit - 34th National IT Conference - Sri LankaDeveloper's QA Toolkit - 34th National IT Conference - Sri Lanka
Developer's QA Toolkit - 34th National IT Conference - Sri Lanka
 
SOLID Design principles
SOLID Design principlesSOLID Design principles
SOLID Design principles
 
Beyond The Rails Way
Beyond The Rails WayBeyond The Rails Way
Beyond The Rails Way
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
London SDET Meetup main presentation - How SDET can transform your organisati...
London SDET Meetup main presentation - How SDET can transform your organisati...London SDET Meetup main presentation - How SDET can transform your organisati...
London SDET Meetup main presentation - How SDET can transform your organisati...
 
Software design - Write solid software with the ideal chalk
Software design - Write solid software with the  ideal chalkSoftware design - Write solid software with the  ideal chalk
Software design - Write solid software with the ideal chalk
 
Pavlo Zhdanov "Mastering solid and base principles for software design"
Pavlo Zhdanov "Mastering solid and base principles for software design"Pavlo Zhdanov "Mastering solid and base principles for software design"
Pavlo Zhdanov "Mastering solid and base principles for software design"
 
Java interfaces design perspective
Java interfaces design perspectiveJava interfaces design perspective
Java interfaces design perspective
 

Más de Wekoslav Stefanovski

Más de Wekoslav Stefanovski (14)

Make you a Redux for fun and profit!
Make you a Redux for fun and profit!Make you a Redux for fun and profit!
Make you a Redux for fun and profit!
 
Blazor - C# for the web
Blazor - C# for the webBlazor - C# for the web
Blazor - C# for the web
 
Asynchrony on the web
Asynchrony on the webAsynchrony on the web
Asynchrony on the web
 
Servers? We don't need no stinking servers
Servers? We don't need no stinking serversServers? We don't need no stinking servers
Servers? We don't need no stinking servers
 
Typescript Decorators
Typescript DecoratorsTypescript Decorators
Typescript Decorators
 
Coding for the cloud - development of modern web applications
Coding for the cloud - development of modern web applicationsCoding for the cloud - development of modern web applications
Coding for the cloud - development of modern web applications
 
Through Meteor to the stars - Developing full-stack SPA's with meteor.js
Through Meteor to the stars - Developing full-stack SPA's with meteor.jsThrough Meteor to the stars - Developing full-stack SPA's with meteor.js
Through Meteor to the stars - Developing full-stack SPA's with meteor.js
 
TypeScript 1.6 - How I learned to Stop Worrying and Love JavaScript
TypeScript 1.6 - How I learned to Stop Worrying and Love JavaScriptTypeScript 1.6 - How I learned to Stop Worrying and Love JavaScript
TypeScript 1.6 - How I learned to Stop Worrying and Love JavaScript
 
How to write bad code using C#
How to write bad code using C#How to write bad code using C#
How to write bad code using C#
 
Garbage Collection .Net
Garbage Collection .NetGarbage Collection .Net
Garbage Collection .Net
 
Testing your Single Page Application
Testing your Single Page ApplicationTesting your Single Page Application
Testing your Single Page Application
 
Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#Smoke and Mirrors - Reflection in C#
Smoke and Mirrors - Reflection in C#
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done right
 
Entity Framework 5 - Code First
Entity Framework 5 - Code FirstEntity Framework 5 - Code First
Entity Framework 5 - Code First
 

Último

call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
vikas rana
 

Último (15)

9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
9892124323, Call Girls in mumbai, Vashi Call Girls , Kurla Call girls
 
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Tingre Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptx
 
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
$ Love Spells^ 💎 (310) 882-6330 in West Virginia, WV | Psychic Reading Best B...
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 

SOLID -Clean Code For Mere Mortals

  • 1.
  • 3.
  • 4.
  • 5. { What is software development? ‹ Software development is not (only) programming ‹ Agile Software Development: Principles, Patterns, and Practices ‹ The Pragmatic Programmer ‹ Manifesto for Software Craftsmanship
  • 6. { Software requirements ‹ Notoriously fluid ‹ Changes in scope ‹ Changes in functionalities ‹ Changes in environments ‹ The only constant is change ‹ We should embrace change!
  • 7. { Software Rot ‹ Occurs to any software that survives the first version ‹ Rigidity ‹ Fragility ‹ Immobility ‹ Viscosity
  • 8. { SOLID Principles ‹ Introduced by Robert C. Martin (Uncle Bob) ‹ An acronym of acronyms ‹ Not a piece of code ‹ Tool for “code smell” detection
  • 9. { SOLID Principles ‹ Single Responsibility Principle ‹ Open Closed Principle ‹ Liskov Substitution Principle ‹ Interface Segregation Principle ‹ Dependency Inversion Principle
  • 10. { SOLID ‹ Single Responsibility Principle ‹ Single Level of abstraction ‹ Just one reason to change ‹ Antithesis of the “God” object
  • 12. { SOLID ‹ Open Closed Principle ‹ Inspired from work on Eiffel ‹ Open for extensions ‹ Closed for modification ‹ Use polymorphic behaviours
  • 14. { SOLID ‹ Liskov Substitution Principle ‹ Named after Barbara Liskov ‹ Subclasses should be substitutable for their base classes. ‹ Design by Contract ‹ A Circle is not an Ellipse
  • 16. { SOLID ‹ Interface Segregation Principle ‹ It’s not always about the `interface` keyword ‹ An interface should have a single purpose ‹ An interface should define a client
  • 18. { SOLID ‹ Dependency Inversion ‹ Depend upon abstractions. ‹ Do not depend upon concretions. ‹ Object creation problems – use object factories. ‹ The principle behind Inversion-of- control and Dependency Injection
  • 20. { Bonus Principle: YAGNI ‹ You Ain’t Gonna Need It ‹ Just-in-time implementation ‹ Avoid architecture astronauts ‹ Simpler code is easier to refactor ‹ Keep it as simple as possible, but not simpler
  • 21. Questions? • Complete the electronic evaluation forms on the computers in the hall and enter to win! – Telerik Ultimate Collection – RedGate .NET Reflector VSPro – ComponentOne Enterprise Studio Suite – Pluralsight yearly subscriptions – CodeSmith Tools Generator Pro Personal – JetBrains ReSharper – Semos Education Training Voucher – and many more…