What are good books to learn object-oriented programming?

Quora Feeds

Active Member
Marcel Molina

Keep in mind that becoming expert in OO programming is largely achieved through writing and reading a lot of code. Over time, when you sit down to solve the next problem, you'll naturally try to figure out how to avoid the stuff from the last code you wrote that was tedious, error prone and complicated.

If you write and read a lot of code, these books will mostly just give names, context and depth to things you've already observed and experienced.

Beginner (i.e. you have never even done OO or totally don't get it)

Programming Ruby by Dave Thomas:
main-qimg-4964ff01abd0852163147f901a3e900f-c

http://www.amazon.com/Programmin...

If you really need total basics on OO you can learn that in any programming language reference if the language supports OO. Programming Ruby is a reasonable place to start as, unlike e.g. Python and PHP or even Java, the language is 100% object oriented at its core. It was designed to be OO from day one, rather than having it bolted on later, as was the case in some languages. It also requires very little ceremony to use its OO features, unlike in Java which requires that you up front specify all kinds of things that a beginner would neither understand nor care about (though eventually they are useful and important). This book will teach you the very basic fundamentals of OO, such as behavior and state and the tools that provide that, i.e. classes, objects, methods and instance variables. If you are unfamiliar with even that, rest assured there isn't much to it at all even if it seems mystifying at first.

Intermediate (i.e. you know the basics but not really how to use them)

Refactoring by Martin Fowler:
main-qimg-064ace32552a7c627e6c11832218f868-c


http://www.amazon.com/Refactorin...

Though quite a few of the suggestions presented in this book will seem obvious or old hat to more seasoned OO developers, it's useful to conjure all these approaches up into the foreground to consider them as a whole and to give a name to each to use as a frame of reference with thinking and speaking about them. For a novice, it will show how many little changes can have a huge impact on clarity and maintainability.

Advanced (i.e. you want to learn all there is to know)

Domain Driven Design by Eric Evans:
main-qimg-7e260eba45b21a0709f438d0e9477fee-c

http://www.amazon.com/Domain-Dri...

At first it seems like this is a 500 page book about what you should name your classes, but don't get the wrong idea. This book will teach you how to make very complex systems tractable with boundaries and layering. It will teach you to think clearly and succinctly about your designs. It is one of the most valuable and yet relatively lesser known books on software development.

Smalltalk Best Practice Patterns by Kent Beck:
main-qimg-6021f85b788af64bec6ef4237011dcc9-c

http://www.amazon.com/Smalltalk-...

Don't worry that it's tailored for Smalltalk. The concepts are applicable to any OO language and the code snippets, for those unfamiliar with Smalltalk, are easy enough to comprehend with some minor research.

Structure and Interpretation of Computer Programs by Abelson and Sussman:
main-qimg-f72200743129819063938c24b4af1925-c

http://www.amazon.com/Structure-...

I'm serious. This book is, in a sense, about functional programming, but much of it is about universal concepts of how to design a complex problem in a way that makes it tractable. It provides a clear and systematic look at the real essentials of programming. Though there are parts of this book that are to some extent anti-OO when it comes to pointing out the evils of side effects and etc, it's likely going to make you a much better OO programmer and programmer in general than most books directly targeted at OO.

Patterns of Enterprise Application Architecture by Martin Fowler:
main-qimg-5e2b9987b1ff58c00c1e5c8331f87df6-c

http://www.amazon.com/Patterns-E...

Whether you ever plan to work on "enterprise applications" or not, familiarizing yourself with the techniques used in these very large and complex systems provides "macro-economic" insights into the types of design decisions you'll make while coding in the small on a day to day level. It explores some of the same universal OO design concepts at a larger scale. You may not need to use many of these patterns and indeed doing so would often be unnecessarily complex but the spirit of these approaches are useful in your day to day. This book is in fact one of the main inspirations behind the design of the popular framework Ruby on Rails which popularized many of these techniques in a simpler more practical way for most purposes.

Object Oriented Software Construction by Bertrand Meyer:
main-qimg-afcc77831c9597308898a75b6d964506-c

http://www.amazon.com/Object-Ori...

Written by the author of the largely obsolete Eiffel programming language, this turns out in parts to be an idiosyncratic apologia for various of Eiffel's design decisions, but it also contains a lot of succinct, systematic OO concepts like encapsulation and modularity.

Design Patterns by the "Gang of Four":
main-qimg-892e731d535389fe02f0d87b4ec47056-c


http://www.amazon.com/Design-Pat...

I would probably read this last though many might list this first. Depending on the language you primarily work in you'll likely only use half or fewer of the patterns in this book, but it's pretty much your cultural responsibility to be familiar with it all.

See Questions On Quora

Continue reading...
 
Top