+ All Categories
Home > Documents > OOP - Back to Basic

OOP - Back to Basic

Date post: 27-May-2015
Category:
Upload: goeran
View: 832 times
Download: 2 times
Share this document with a friend
Popular Tags:
of 27 /27
OOP – Back to Basic! Gøran Hansen Seniorkonsulent, Capgemini http://blog.goeran.no [email protected] Twitter.com/goeran
Transcript
Page 1: OOP - Back to Basic

OOP – Back to Basic!

Gøran HansenSeniorkonsulent, Capgeminihttp://[email protected]/goeran

Page 2: OOP - Back to Basic
Page 3: OOP - Back to Basic
Page 4: OOP - Back to Basic
Page 5: OOP - Back to Basic
Page 6: OOP - Back to Basic

”Vi kan unngå spagettikode ved å bry oss om kvaliteten på koden vi skriver!”

Page 7: OOP - Back to Basic

What does these have in common?

.NET

VB.NET

C# Ruby

Python

Silverlight

Flash

Java

ASP.NET MVC

Ruby on Rails

WPF

Azure

Page 8: OOP - Back to Basic
Page 9: OOP - Back to Basic

Object Orientation!

Page 10: OOP - Back to Basic

Encapsulation, Inheritance, Polymorphism

Page 11: OOP - Back to Basic

Loose Coupling

Page 12: OOP - Back to Basic
Page 13: OOP - Back to Basic
Page 14: OOP - Back to Basic

Cohesion

Page 15: OOP - Back to Basic
Page 16: OOP - Back to Basic
Page 17: OOP - Back to Basic

Design Principles

Page 18: OOP - Back to Basic

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

Page 19: OOP - Back to Basic

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

Page 20: OOP - Back to Basic

Open-Closed Principle – OCP

”Should be open for extensions but closed for modification” – Bertand Meyer (1988)

http://www.objectmentor.com/resources/articles/ocp.pdf

Page 21: OOP - Back to Basic

SRPDIPOCP

Page 22: OOP - Back to Basic

S.O.L.I.D

Page 23: OOP - Back to Basic

”Vi kan unngå spagettikode ved å bry oss om kvaliteten på koden vi skriver!”

Page 24: OOP - Back to Basic
Page 25: OOP - Back to Basic

Recommended reading

Page 26: OOP - Back to Basic

• 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/

Page 27: OOP - Back to Basic

OOP – Back to Basic!

Gøran HansenSeniorkonsulent, Capgeminihttp://[email protected]/goeran


Recommended