I have been programming OO for a while. But now I feel I have reached a place where I need to understand principles and fundamentals of object oriented design and theory scientifically and deeply.
What resource, especially books can you suggest?
I have been programming OO for a while. But now I feel I have reached a place where I need to understand principles and fundamentals of object oriented design and theory scientifically and deeply.
What resource, especially books can you suggest?
Design Patterns: Elements of Reusable Object-Oriented Software - GoF
Actually now that I think of it...I think fowler's refactoring also gave me a great appreciation for object oriented design.
For the fundementals you really need to move beyond introductory books. And GoF really assumes an understanding of OO rather than digging into it.
Not looked at the (much newer) 3rd edition as I have the 2nd, but "Object Oriented Design with Applications" by Grady Booch et al was the standard.
It might be a basic book but I really liked Object Oriented Thought Process by Matt Weisfeld. New edition has examples in C# and references to all other excellent books on OOP.
I suggest you to consider this one: Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development.
This is the best book, about OOP, I ever read.
If you want a better understanding of the concepts used in object-oriented languages, I can recommend The Interpretation of Object-Oriented Programming Languages by Iain Craig.
Just check out its table of contents.
Another free online book is "Building Skills in OO Design," written by one of StackOverflow's top gurus, S. Lott.
Smalltalk Best Practice Patterns is the best book I know on OO design. Definitely not for Smalltalkers only. (Besides, Simula-67 may have invented objects, but Smalltalk-80 really put them to work. Most later designs, with the honorable exceptions of Self and its friends, are just footnotes to Smalltalk. I include C++ and Ruby in that group, for example.)
I like
I dont know about anyone else, but I would be wary of understanding Object Oriented Design Deeply.
It can even with the best of intentions lead to over engineered solutions :)
To understand pure object-orientation's goal of simulating the interaction of actors (objects), study SmallTalk and the Simula dialects.
Also check out non-mainstream implementations such as the Common Lisp Object System, including its Meta-Object Protocol.
It's also informative to read about modern languages that eschew many aspects of mainstream object-oriented programming, such as the JVM Lisp dialect Clojure (see also Object Oriented Programming section of the page on identity and state).
Two books by Robert Martin are a great starting point:
I'd also recommend
If you understand the following 4 principals, you probably have a good handle of OO design:
Encapsulation - The ability to take a problemspace and wrap it up into an object that can contain/maintain its own state and provide a public interface for usage.
Abstraction - The ability to generalize about a set of related objects. For instance, a Truck and a Car are both types of Automobile.
Reification - The ability to create concrete objects from abstractions (ie. the opposite of Abstraction). Think of sorting algorithms; the algorithms can be contained within objects (Bubblesort, Qsort, etc), and those objects can be interchanged within other objects that require sorting (e.g. A Spreadsheet could contain an abstract instance of a Sort object, which would be implemented by Bubblesort, Qsort, etc.).
Substitution - The ability to substitute one similar object for another.
As for books, I second the recommendation of Design Patterns by the Gang of Four (Gamma, Helm, Johnson, Vlissides). This book defines idioms that have evolved through the use of object oriented programming. The examples used are written primarily in C++, with some Smalltalk and other languages, but the concepts are also provided graphically. When reading this book, I suggest using the patterns to help solve a problem. Don't use it as a "cookbook" to start designing your software. Also, it is a fairly old book, so you won't find newer patterns in there.
I would suggest Martin Fowler's "UML Destilled" This books give you perspectives to think about the object oriented design.
For deeply understanding OO Design, the bible is Betrand Meyer's Object Oriented Software Construction 2nd Edition. It's a big but brilliant book.