SOLID -Clean Code For Mere Mortals

1,089 views

Published on

Published in: Self Improvement
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,089
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SOLID -Clean Code For Mere Mortals

  1. 1. SOLIDClean code formere mortals
  2. 2. { What is software development? ‹ Software development is not (only) programming ‹ Agile Software Development: Principles, Patterns, and Practices ‹ The Pragmatic Programmer ‹ Manifesto for Software Craftsmanship
  3. 3. { Software requirements ‹ Notoriously fluid ‹ Changes in scope ‹ Changes in functionalities ‹ Changes in environments ‹ The only constant is change ‹ We should embrace change!
  4. 4. { Software Rot ‹ Occurs to any software that survives the first version ‹ Rigidity ‹ Fragility ‹ Immobility ‹ Viscosity
  5. 5. { SOLID Principles ‹ Introduced by Robert C. Martin (Uncle Bob) ‹ An acronym of acronyms ‹ Not a piece of code ‹ Tool for “code smell” detection
  6. 6. { SOLID Principles ‹ Single Responsibility Principle ‹ Open Closed Principle ‹ Liskov Substitution Principle ‹ Interface Segregation Principle ‹ Dependency Inversion Principle
  7. 7. { SOLID ‹ Single Responsibility Principle ‹ Single Level of abstraction ‹ Just one reason to change ‹ Antithesis of the “God” object
  8. 8. SRP IN ACTION
  9. 9. { SOLID ‹ Open Closed Principle ‹ Inspired from work on Eiffel ‹ Open for extensions ‹ Closed for modification ‹ Use polymorphic behaviours
  10. 10. OCP IN ACTION
  11. 11. { 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
  12. 12. LSP IN ACTION
  13. 13. { 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
  14. 14. ISP IN ACTION
  15. 15. { 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
  16. 16. DIP IN ACTION
  17. 17. { 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
  18. 18. 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…

×