際際滷

際際滷Share a Scribd company logo
OOP  Back to Basic! G淡ran Hansen Seniorkonsulent, Capgemini http://blog.goeran.no [email_address] Twitter.com/goeran
油
油
油
油
 Vi kan  unng奪 spagettikode  ved 奪 bry oss om  kvaliteten p奪 koden vi skriver !
What does these have in common? .NET VB.NET C# Ruby Python Silverlight Flash Java ASP.NET MVC Ruby on Rails WPF Azure
油
Object Orientation!
Encapsulation, Inheritance, Polymorphism
Loose Coupling
油
油
Cohesion
油
油
Design Principles
Single Responsibility Principle  SRP There should never be more than  one reason  for the class  to change   Tom DeMarco http://www.objectmentor.com/resources/articles/srp.pdf
Dependency Inversion Principle  DIP High level modules should not depend upon low level modules. Both  should 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
Open-Closed Principle  OCP  Should be  open for extensions  but  closed for modification   Bertand Meyer (1988) http://www.objectmentor.com/resources/articles/ocp.pdf
SRP DIP OCP
S . O .L.I. D
 Vi kan  unng奪 spagettikode  ved 奪 bry oss om  kvaliteten p奪 koden vi skriver !
油
Recommended reading
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/
OOP  Back to Basic! G淡ran Hansen Seniorkonsulent, Capgemini http://blog.goeran.no [email_address] Twitter.com/goeran

More Related Content

OOP - Back to Basic