Jump to content

Object model: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Tags: Visual edit Mobile edit Mobile web edit
→‎Literature: Date mismatch
 
(19 intermediate revisions by 13 users not shown)
Line 1: Line 1:
{{Short description|Term in computing}}
{{No footnotes|date=March 2010}}
{{No footnotes|date=March 2010}}
In computing, '''object model''' has two related but distinct meanings:
In [[computing]], '''object model''' has two related but distinct meanings:


# The properties of objects in general in a specific computer programming language, technology, notation or methodology that uses them. Examples are the object models of ''Java'', the ''Component Object Model (COM)'', or ''Object-Modeling Technique (OMT)''. Such object models are usually defined using concepts such as class, generic function, message, inheritance, polymorphism, and encapsulation. There is an extensive literature on formalized object models as a subset of the formal semantics of programming languages.
# The properties of [[object (computer science)|objects]] in general in a specific computer [[programming language]], technology, notation or [[methodology]] that uses them. Examples are the object models of ''[[Java (programming language)|Java]]'', the ''[[Component Object Model]] (COM)'', or ''[[object-modeling technique|Object-Modeling Technique]] (OMT)''. Such object models are usually defined using concepts such as [[class (computer science)|class]], [[generic function]], [[message (computer science)|message]], [[inheritance (object-oriented programming)|inheritance]], [[polymorphism in object-oriented programming|polymorphism]], and [[information hiding|encapsulation]]. There is an extensive literature on formalized object models as a subset of the [[formal semantics of programming languages]].
# A collection of objects or classes through which a program can examine and manipulate some specific parts of its world. In other words, the object-oriented interface to some service or system. Such an interface is said to be the ''object model of'' the represented service or system. For example, the Document Object Model (DOM) is a collection of objects that represent a page in a web browser, used by script programs to examine and dynamically change the page. There is a Microsoft Excel object model for controlling Microsoft Excel from another program, and the ASCOM Telescope Driver is an object model for controlling an astronomical telescope.
# A collection of objects or classes through which a [[Computer program|program]] can examine and manipulate some specific parts of its world. In other words, the object-oriented [[interface (computer science)|interface]] to some service or system. Such an interface is said to be the ''object model of'' the represented service or system. For example, the [[Document Object Model]] (DOM) is a collection of objects that represent a [[web page|page]] in a [[web browser]], used by [[scripting language|script]] programs to examine and dynamically change the page. There is a [[Microsoft Excel]] object model [http://msdn2.microsoft.com/en-us/library/wss56bz7.aspx] for controlling Microsoft Excel from another program, and the [[ASCOM (standard)|ASCOM]] Telescope Driver is an object model for controlling an astronomical telescope.


An object model consists of the following important features:
An object model consists of the following important features:


;Object Reference: Objects can be accessed via object references. To invoke a method in an object, the object reference and method name are given, together with any arguments.
;Object reference: Objects can be accessed via object references. To invoke a method in an object, the object reference and method name are given, together with any arguments.


;Interfaces:An interface provides a definition of the signature of a set of methods without specifying their implementation. An object will provide a particular interface if its class contains code that implement the method of that interface. An interface also defines types that can be used to declare the type of variables or parameters and return values of methods.
;Interfaces: An interface provides a definition of the signature of a set of methods without specifying their implementation. An object will provide a particular interface if its class contains code that implement the method of that interface. An interface also defines types that can be used to declare the type of variables or parameters and [[return value]]s of methods.


;Actions:An action in object-oriented programming (OOP) is initiated by an object invoking a method in another object. An invocation can include additional information needed to carry out the method. The receiver executes the appropriate method and then returns control to the invoking object, sometimes supplying a result.
;Actions: An action in [[object-oriented programming]] (OOP) is initiated by an object invoking a method in another object. An invocation can include additional information needed to carry out the method. The receiver executes the appropriate method and then returns control to the invoking object, sometimes supplying a result.


;Exceptions: Programs can encounter various errors and unexpected conditions of varying seriousness. During the execution of the method many different problems may be discovered. Exceptions provide a clean way to deal with error conditions without complicating the code. A block of code may be defined to throw an exception whenever particular unexpected conditions or errors arise. This means that control passes to another block of code that catches the exception.
;Exceptions: Programs can encounter various errors and unexpected conditions of varying seriousness. During the execution of the method many different problems may be discovered. [[Exception handling|Exceptions]] provide a clean way to deal with error conditions without complicating the code. A block of code may be defined to throw an exception whenever particular unexpected conditions or errors arise. This means that control passes to another block of code that catches the exception.


==See also==
==See also==
Line 24: Line 25:


==Literature==
==Literature==
* {{cite book|first=Matt|last=Weisfeld|title=The Object-Oriented Thought Process (2nd Edition)
* {{cite book|first=Matt|last=Weisfeld|title=The Object-Oriented Thought Process |edition=2nd
|publisher=Sams|year=2003|isbn=0-672-32611-6}}
|publisher=Sams|year=2003|isbn=0-672-32611-6}}
* {{cite book | first=Martin|last=Fowler|title=Analysis Patterns: Reusable Object Models
* {{cite book | first=Martin|last=Fowler|title=Analysis Patterns: Reusable Object Models
|publisher=Addison-Wesley|year=1996|isbn=0-201-89542-0}}
|publisher=Addison-Wesley|year=1996|isbn=0-201-89542-0}}
* {{Cite book |first1=K. |last1=Fisher |first2=F. |last2=Honsell |first3=J.C. |last3=Mitchell |title=[1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science |chapter=A lambda calculus of objects and method specialization |date=1994 |journal=Nordic Journal of Computing|volume=1|pages=3–37|chapter-url=https://pdfs.semanticscholar.org/5cf7/1e3120c48c23f9cecdbe5f904b884e0e1a2d.pdf |archive-url=https://web.archive.org/web/20180703075724/https://pdfs.semanticscholar.org/5cf7/1e3120c48c23f9cecdbe5f904b884e0e1a2d.pdf |url-status=dead |archive-date=2018-07-03 |doi=10.1109/LICS.1993.287603|isbn=0-8186-3140-6 |s2cid=19578302 }}
* {{Cite journal |author1=K. Fisher |author2=F. Honsell |author3=J.C. Mitchell |last-author-amp=yes |
title=A Lambda Calculus of Objects and Method Specialization|
journal=Nordic Journal of Computing|
year=1994|
volume=1|
pages=3–37|
url=https://pdfs.semanticscholar.org/5cf7/1e3120c48c23f9cecdbe5f904b884e0e1a2d.pdf}}
* {{cite book | first=Joe|last=Marini|title=Document Object Model: Processing Structured Documents|year=2002
* {{cite book | first=Joe|last=Marini|title=Document Object Model: Processing Structured Documents|year=2002
|publisher=Osborne/McGray-Hill|isbn=0-07-222436-3}}
|publisher=Osborne/McGray-Hill|isbn=0-07-222436-3}}
* {{cite book | first=Stanley | last=Lippman | authorlink= Stanley B. Lippman | year=1996 |title=Inside the C++ Object Model|publisher=Addison-Wesley Professional
* {{cite book | first=Stanley | last=Lippman | author-link= Stanley B. Lippman | year=1996 |title=Inside the C++ Object Model|publisher=Addison-Wesley
|isbn=0-201-83454-5}}
|isbn=0-201-83454-5}}


==External links==
==External links==
* Document Object Model (DOM) The official W3C definition of the DOM.
* [http://www.w3.org/DOM/ Document Object Model (DOM)] The official [[W3C]] definition of the DOM.
* "The Java Object Model"
* [http://www.cs.usfca.edu/~parrt/doc/java/JavaObjectModel-notes.pdf "The Java Object Model"]
* The Ruby Object Model: Data Structure in Detail
* [http://www.atalon.cz/rb-om/ruby-object-model The Ruby Object Model: Data Structure in Detail]
* Object Membership: The core structure of object-oriented programming
* [http://www.atalon.cz/om/object-membership/ Object Membership: The core structure of object-oriented programming]
* Object Model Features Matrix A "representative sample of the design space of object models" (sense 1).
* [http://www.objs.com/x3h7/fmindex.htm Object Model Features Matrix] A "representative sample of the design space of object models" (sense 1).
* ASCOM Standards web site
* [https://web.archive.org/web/20010201145500/http://ascom-standards.org/ ASCOM Standards] web site


{{Software engineering}}
{{Software engineering}}
Line 52: Line 47:
{{DEFAULTSORT:Object Model}}
{{DEFAULTSORT:Object Model}}
[[Category:Object-oriented programming]]
[[Category:Object-oriented programming]]


{{software-eng-stub}}

Latest revision as of 13:45, 4 August 2023

In computing, object model has two related but distinct meanings:

  1. The properties of objects in general in a specific computer programming language, technology, notation or methodology that uses them. Examples are the object models of Java, the Component Object Model (COM), or Object-Modeling Technique (OMT). Such object models are usually defined using concepts such as class, generic function, message, inheritance, polymorphism, and encapsulation. There is an extensive literature on formalized object models as a subset of the formal semantics of programming languages.
  2. A collection of objects or classes through which a program can examine and manipulate some specific parts of its world. In other words, the object-oriented interface to some service or system. Such an interface is said to be the object model of the represented service or system. For example, the Document Object Model (DOM) is a collection of objects that represent a page in a web browser, used by script programs to examine and dynamically change the page. There is a Microsoft Excel object model [1] for controlling Microsoft Excel from another program, and the ASCOM Telescope Driver is an object model for controlling an astronomical telescope.

An object model consists of the following important features:

Object reference
Objects can be accessed via object references. To invoke a method in an object, the object reference and method name are given, together with any arguments.
Interfaces
An interface provides a definition of the signature of a set of methods without specifying their implementation. An object will provide a particular interface if its class contains code that implement the method of that interface. An interface also defines types that can be used to declare the type of variables or parameters and return values of methods.
Actions
An action in object-oriented programming (OOP) is initiated by an object invoking a method in another object. An invocation can include additional information needed to carry out the method. The receiver executes the appropriate method and then returns control to the invoking object, sometimes supplying a result.
Exceptions
Programs can encounter various errors and unexpected conditions of varying seriousness. During the execution of the method many different problems may be discovered. Exceptions provide a clean way to deal with error conditions without complicating the code. A block of code may be defined to throw an exception whenever particular unexpected conditions or errors arise. This means that control passes to another block of code that catches the exception.

See also[edit]

Literature[edit]

  • Weisfeld, Matt (2003). The Object-Oriented Thought Process (2nd ed.). Sams. ISBN 0-672-32611-6.
  • Fowler, Martin (1996). Analysis Patterns: Reusable Object Models. Addison-Wesley. ISBN 0-201-89542-0.
  • Fisher, K.; Honsell, F.; Mitchell, J.C. (1994). "A lambda calculus of objects and method specialization" (PDF). [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science. Vol. 1. pp. 3–37. doi:10.1109/LICS.1993.287603. ISBN 0-8186-3140-6. S2CID 19578302. Archived from the original (PDF) on 2018-07-03. {{cite book}}: |journal= ignored (help)
  • Marini, Joe (2002). Document Object Model: Processing Structured Documents. Osborne/McGray-Hill. ISBN 0-07-222436-3.
  • Lippman, Stanley (1996). Inside the C++ Object Model. Addison-Wesley. ISBN 0-201-83454-5.

External links[edit]