What is instantiation?

What is instantiation?

Today we demystify another esoteric term in the world of software engineering, this word is called "instantiation". Before we can talk about instantiation we need to talk about objects and classes. Simply put, we can call an object anything we can see, feel, touch, taste and smell. An object in software engineering is a concept derived from normal physical objects we interact with. A class is like an architect's blueprint, a class is just a declaration of the properties or features of an object.

In backend programming, OOP (Object Oriented Programming) is how we're able to solve real-life challenges by more of less recreating the physical environment and characteristics of those challenges. Let's imagine an object as a human being, a class is more of less some document that dictates that a human being has hands, legs, a head, eyes, noses and other things we can use to identify a human being.

Instantiation is when we create an example of an object or when we implement the features and/or properties of a class in creating an object. Simply put, when a person gives birth to a child, the mother has instantiated a new class of a human being. Remember that there are documents that dictate what a human being (who is more or less an object) should look like. Anytime a human being is born (that conforms to what a human being should look like) we've just created a new instance (instantiation) of the class of humans.

Let's try another example shall we? Let's use tables. A table is an object, The class of tables is the document that specifies the features of a table (flat surface, four legs etc.), instantiation is the creation of a new table (which must obey the specifications of the class for us to recognize it as a table). Now let's relate it to software development. Let's say we want to be able to create user accounts but to do that we need to get someone of their details. We will need a class to be able to specific what a user is, anyone who can provide those details (which responds to the demanded features of a user) is categorized as a user. A user will have a first name, last name, date of birth, email address etc. The object in this case is the user. When a user successfully inputs these details and clicks the register button, a new user will be created, in software engineering terms, the class of user has been instantiated by the creation of a new user.

I really hope these things begin to make more sense to you as you'll be involved in a lot of tutorials and conversation that uses these terms. Understanding it now will help you keep up.