Preface – This post is part of the Object Oriented Thinking series.
“In my 20 years in this industry, I have never seen a revolution as profound as this.”
— Steve Jobs, on object-oriented programming
So what is object-oriented programming (OOP) and why was Steve Jobs so passionate about it?
I’ll tell you, but to be honest, the late Steve Jobs said it best:
Here’s an example: If I’m your laundry object, you can give me your dirty clothes and send me a message that says, “Can you get my clothes laundered, please.” I happen to know where the best laundry place in San Francisco is. And I speak English, and I have dollars in my pockets. So I go out and hail a taxicab and tell the driver to take me to this place in San Francisco. I go get your clothes laundered, I jump back in the cab, I get back here. I give you your clean clothes and say, “Here are your clean clothes.”
You have no idea how I did that. You have no knowledge of the laundry place. Maybe you speak French, and you can’t even hail a taxi. You can’t pay for one, you don’t have dollars in your pocket. Yet I knew how to do all of that. And you didn’t have to know any of it. All that complexity was hidden inside of me, and we were able to interact at a very high level of abstraction. That’s what objects are. They encapsulate complexity, and the interfaces to that complexity are high level.”
Steve somehow knew that object-oriented programming would revolutionize coding, long before the world realized this. What a brilliant man!
Don’t worry if the concept of OOP hasn’t sunk in your head yet – it takes time to understand it. But fear not students: we’re going to spend this entire chapter digging deeper into OOP, how it applies to Salesforce, and how it’ll help you to write bigger and better codebases.
Next post: What are objects and classes?