DELAPARRA
Index
Color
NL
Category: Programming paradigms

Object (Instance)

Explained by Updated

What is Object (Instance)?

Object (Instance): A single instance created from a class. If User is the class, the user Alice (with her specific email and name) is an object. An object is one specific instance created from a class. If Customer is the class, then the customer "Bakkerij Jansen" with its own address and order history is an object.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Object (Instance)

How is Object (Instance) used in practice?

All objects of a class share the same structure and methods, but each holds its own data. Changing one customer's address does not affect any other customer.

What should you keep in mind with Object (Instance)?

In frameworks like Laravel, each database row usually becomes an object, such as an Eloquent model, with methods to work with its data. Objects are most useful when they protect their own rules. An Order object that refuses to be shipped before it is paid is safer than one where any code can set any property. Keeping behaviour together with the data it concerns is the core idea of object-oriented design.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with O

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.