Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Object model

From Wikipedia, the free encyclopedia
Term in computing
This article includes alist of references,related reading, orexternal links,but its sources remain unclear because it lacksinline citations. Please helpimprove this article byintroducing more precise citations.(March 2010) (Learn how and when to remove this message)

Incomputing,object model has two related but distinct meanings:

  1. The properties ofobjects in general in a specific computerprogramming language, technology, notation ormethodology that uses them. Examples are the object models ofJava, theComponent Object Model (COM), orObject-Modeling Technique (OMT). Such object models are usually defined using concepts such asclass,generic function,message,inheritance,polymorphism, andencapsulation. There is an extensive literature on formalized object models as a subset of theformal semantics of programming languages.
  2. A collection of objects or classes through which aprogram can examine and manipulate some specific parts of its world. In other words, the object-orientedinterface to some service or system. Such an interface is said to be theobject model of the represented service or system. For example, theDocument Object Model (DOM) is a collection of objects that represent apage in aweb browser, used byscript programs to examine and dynamically change the page. There is aMicrosoft Excel object model[1] for controlling Microsoft Excel from another program, and theASCOM Telescope Driver is an object model for controlling an astronomical telescope.

Features

[edit]

An object model consists of the following important features:

Object reference

[edit]
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

[edit]
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 andreturn values of methods.

Actions

[edit]
An action inobject-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

[edit]
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]

External links

[edit]
Fields
Concepts
Orientations
Models
Developmental
Other
Languages
Related fields
Retrieved from "https://en.wikipedia.org/w/index.php?title=Object_model&oldid=1308232695"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp