Object (computer science): Difference between revisions

Content deleted Content added
Format info into a paragraph (a paragraph should start with a summary sentence)
Remove object-based section since was about other classifications and more importantly the content was mostly covered already; just moved prototype-based to paragraph about classification
Line 3:
In [[software development]], an '''object''' is an [[entity]] that has [[State (computer science)|state]], [[behavior]], and [[Identity (object-oriented programming)|identity]].<ref name="ooa">{{cite book|title=Object-Oriented Analysis and Design with Applications |edition=3 |date=April 30, 2007 |author1=Grady Booch |author2=Robert Maksimchuk |author3=Michael Engle |author4=Bobbi Young |author5=Jim Conallen |author6=Kelli Houston |isbn=020189551X |publisher= Addison-Wesley Professional}}</ref>{{rp|78}} An object can [[model]] some part of [[reality]] or can be an [[invention]] of the [[design process]] whose collaborations with other such objects serve as the mechanisms that provide some higher-level behavior. Put another way, an object represents an individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem ___domain.<ref name="ooa"></ref>{{rp|76}}
 
A [[programming language]] can be classified based on its support for objects. A language that provides an encapsulation construct for state, behavior, and identity is classified as [[object-based language|object-based]]. If the language also provides [[polymorphism (computer science)|polymorphism]] and [[inheritance (object-oriented programming)|inheritance]] it is classified as [[Object-oriented programming|object-oriented]]. A language that supports creating an object from a [[class (computer science)|class]] is classified as [[class-based programming|class-based]]. A language that supports object creation via a template object is classified as [[prototype-based programming|prototype-based]].
In the [[relational model]] of [[database]] management, aspects such as [[Table (database)|table]] and [[Column (database)|column]] may act as objects.<ref name=Oppel>{{cite book |first=Andy |last=Oppel |title=SQL Demystified |publisher=McGraw Hill |year=2005| page=7 |isbn=0-07-226224-9}}</ref>
 
[[Information systems]] can be modeled with objects representing their components and interfaces.<ref name="ooa"/>{{rp|39}}{{cn|date=September 2024}}
 
==Object-based languages==
{{main|Object-based languages}}
An important distinction in programming languages is the difference between an object-oriented language and an object-based language. A language is usually considered object-based if it includes the basic capabilities for an object: identity, properties, and attributes. A language is considered object-oriented if it is object-based and also has the capability of [[Polymorphism (computer science)|polymorphism]], [[Inheritance (object-oriented programming)|inheritance]], [[Encapsulation (computer programming)|encapsulation]], and, possibly, [[Object composition|composition]].<ref name="ooa"/>{{rp|41}}{{cn|date=September 2024}}
 
Not all object-based (or object-oriented) languages are class-based. One prominent alternative paradigm is [[prototype-based programming]], used by [[JavaScript]] and [[Lua (programming language)|Lua]], among others.
 
==Distributed objects==