‫-: Hi.
‫Within this section,
‫we are going to learn about
‫objected oriented programming.
‫So, this is a very important concept,
‫and we are going to deep dive into it.
‫First of all,
‫we are going to start with classes.
‫Classes are so important,
‫and we have seen that before, right?
‫So, we have worked with classes
‫in our view controller,
‫we have a class,
‫and, basically, we write everything in our class.
‫Right?
‫So, classes actually have functions,
‫have variables, have events inside of them,
‫and we are going to see what are those
‫in this lecture,
‫and we are going to see what
‫is an objected oriented programming.
‫So, first of all,
‫what are some elements inside of classes?
‫We have properties,
‫we have some variables,
‫like age, like name,
‫so we can call this attributes
‫or properties,
‫and this defines some attributes,
‫some options that are classes can have.
‫Like we can have a musician class,
‫and we are going to have this in a few lecture,
‫and we will have some properties
‫inside of that musician class.
‫So, if we can create an
‫object from that class,
‫we can call this an object,
‫or an instance.
‫Okay?
‫And, this instance, or this object,
‫can have properties.
‫So, this object,
‫for example, a musician can have an age,
‫can have a name.
‫So, we can actually create more than one object,
‫and we can assign different ages,
‫different names to these each object.
‫So, this is not different than
‫creating a string object,
‫or an integer object.
‫Okay?
‫But, this time,
‫we are going to create our own classes,
‫in which we define own properties, own values.
‫So, properties are basically
‫variables that we set.
‫So, this is easy.
‫And, also, we can have actions
‫inside of classes, as well.
‫So, we can have a function to make our
‫musician sing, for example.
‫So, classes are to be grouped apart.
‫Okay?
‫So, classes are this biggest part,
‫actually, making up a whole project,
‫so this is kind of a blue print of our projects.
‫And, in this blue print,
‫we can have actions.
‫So, we can make our singers sing,
‫we can make whatever we want.
‫And, we can have events, as well.
‫For example, defining what will happen
‫if you resume this,
‫or defining some other events, as well.
‫And, we're going to see a lot of
‫examples of classes,
‫and if you have heard something like
‫model, in programming,
‫basically that is what we are going to do
‫in this section.
‫We are going to create a model,
‫and we are going to create some instances
‫of that model,
‫and they will have properties, actions.
‫So, let me tell you what
‫objected oriented programming is
‫in an analogy, so you will understand it better.
‫Okay?
‫So, what was the first programming language
‫that has ever come out?
‫It was C.
‫And C, was not an object oriented
‫programming language.
‫So, it was kind of a
‫procedural programming language, okay?
‫So, what is the difference between
‫procedural and object oriented programming?
‫Suppose that you have an agency software company,
‫okay, this is our company,
‫and inside of this software company,
‫we have some workers, we have some employees.
‫So, in the procedural programming,
‫we have this kind of a structure.
‫First, we tell our employee to do the design,
‫create some design for our app,
‫build some user interfaces,
‫and then we go to the same employee,
‫and say that, okay, now write the code,
‫code our app, and implement the design
‫that you have created before,
‫and then later on, we go on
‫and say that please do the marketing,
‫and business arrangements, as well.
‫So, find some investors,
‫do some extra optimization,
‫so that our app will be visible
‫throughout the app store,
‫and take care of everything from
‫bottom, to the top.
‫So, this will be a procedural program.
‫Rather, in the object oriented programming,
‫we have different employees,
‫we have different classes,
‫different objects.
‫So, first, we tell take care of the design,
‫okay?
‫And we go to another employee,
‫another class,
‫and we say, please do the coding for us,
‫and then finally,
‫we say that,
‫yeah, the app is ready,
‫please go find us some investors,
‫and take care of marketing.
‫As you might imagine,
‫this three classes,
‫three people, can talk with each other,
‫communicate with each other,
‫but they have no idea
‫what the other person is doing in the real life.
‫So, designer will not know
‫what the programming people are doing,
‫our programming people, coders,
‫will not know what marketing people are doing.
‫So, this is kind of synchronized
‫between each other,
‫but they are focusing on their jobs.
‫So, this is an example of
‫object oriented programming.
‫So, as you might imagine,
‫this way is much more efficient,
‫than saying,
‫please take care of everything
‫in one person, we have some different classes,
‫talking with each other,
‫working with each other,
‫synchronically,
‫but they are only focusing on their job.
‫So, this is an analogy for understanding
‫object oriented programming,
‫and of course,
‫we are not going to stop here,
‫we are just going to continue,
‫and we will see how to build our own classes,
‫how to create our own object,
‫and how to implement all of this information,
‫into real apps, as well.
‫So, that's what we are going to do
‫within this section.
‫So, let's stop here,
‫and continue with the next lecture.