oop - back to basic

Download OOP - Back to Basic

If you can't read please download the document

Post on 27-May-2015

795 views

Category:

Documents

2 download

Embed Size (px)

TRANSCRIPT

  • 1. OOP Back to Basic! Gran Hansen Seniorkonsulent, Capgemini http://blog.goeran.no [email_address] Twitter.com/goeran

2. 3. 4. 5. 6.

  • Vi kanunng spagettikodeved bry oss omkvaliteten p koden vi skriver !

7.

  • What does these have in common?

.NET VB.NET C# Ruby Python Silverlight Flash Java ASP.NET MVC Ruby on Rails WPF Azure 8. 9.

  • Object Orientation!

10.

  • Encapsulation, Inheritance, Polymorphism

11.

  • Loose Coupling

12. 13. 14.

  • Cohesion

15. 16. 17.

  • Design Principles

18.

  • Single Responsibility Principle SRP There should never be more thanone reasonfor the classto change Tom DeMarco
  • http://www.objectmentor.com/resources/articles/srp.pdf

19.

  • Dependency Inversion Principle DIP High level modules should not depend upon low level modules. Bothshould depend upon asbtractions
  • Abstractions should not depend upon details.Details should depend upon abstractions
  • - Robert C. Martin (Unclebobmartin)
  • http://www.objectmentor.com/resources/articles/dip.pdf

20.

  • Open-Closed Principle OCP
  • Should beopen for extensionsbutclosed for modification Bertand Meyer (1988)
  • http://www.objectmentor.com/resources/articles/ocp.pdf

21.

  • SRP
  • DIP
  • OCP

22.

  • S . O .L.I. D

23.

  • Vi kanunng spagettikodeved bry oss omkvaliteten p koden vi skriver !

24. 25.

  • Recommended reading

26.

  • http://www.objectmentor.com/resources/publishedArticles.html
  • http://msdn.microsoft.com/en-us/magazine/cc546578.aspx
  • http://blog.objectmentor.com/
  • http://codebetter.com/blogs/jeremy.miller/

27. OOP Back to Basic! Gran Hansen Seniorkonsulent, Capgemini http://blog.goeran.no [email_address] Twitter.com/goeran