Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

3.1 Object Oriented Programming

In this lesson we will introduce the concept of OOP with respect to Swift, as the rest of this section is going to go into the generally accepted principles of OOP: Abstraction, Encapsulation, Inheritance, and Polymorphism.

3.1 Object Oriented Programming

In this section of the course, I'm going to take you through the concepts of object-oriented programming and how they relate to the Swift programming language. Now, an interesting fact about Swift is that it's still evolving, and it's still being defined, and it's still being refined by our friends at Apple in Cupertino. Now, an interesting concept that we're going to run into very shortly in the next couple of lessons is that the fundamental paradigms that are typically used with object-oriented programming are available in the language, but may not be fully implemented at this time. So that may sound a little strange and you may wonder what exactly I'm talking about, but we'll get there, don't worry about it. Before we get into that, though, let's take a brief moment to at least discuss, what exactly is object-oriented programming? Now, like most human beings and software developers in this world, if we ever have a question about such things, we head over to Wikipedia. So here's the Wikipedia page on object-oriented programming. And really, this is just going to describe to us that object-oriented programming is just a programming paradigm that's going to base a lot of the concepts about what we're trying to write, or the software we're trying to write, and relate them to objects, or data structures, that are going to contain data and functionality that we can use to model real world objects. And we're going to list a bunch of programming languages down here. But if we start to dig down a little bit deeper into the overview, you're gonna start to see a number of words show up over and over again. You're gonna see concepts such as abstraction, or abstract data type, and polymorphism, and inheritance, and encapsulation. Now, typically when you talk to different people about object-oriented programming, they'll either tell you that there are three or four primary principles of object-oriented programming. I'm not here to debate that either way, but there are typically going to be those four things, or three things, depending on how you look at it. Oftentimes, abstraction and encapsulation are kind of grouped together as similar things. Although they aren't necessarily the same things, they can be sometimes coupled together into just encapsulation. And then also polymorphism and inheritance. So over the next couple of lessons, we're going to discuss each one of these things with respect to the Swift programming language and see how we can accomplish these object-oriented programming principles through Swift.

Back to the top