An interface in computer science Computer science or computing science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems. It is frequently described as the systematic study of algorithmic processes that create, describe, and transform information. Computer science refers to a set of named operations that can be invoked by clients. Interface generally refers to an abstraction The concept originated by analogy with abstraction in mathematics. The mathematical technique of abstraction begins with mathematical definitions; this has the fortunate effect of finessing some of the vexing philosophical issues of abstraction. For example, in both computing and in mathematics, numbers are concepts in the programming languages, that an entity provides of itself to the outside. This separates the methods of external communication from internal operation (for example two different functions written in C language have the same interface if they have the same arrangements of arguments and the same type of return value, but the function body may be implemented in different way), and allows it to be internally modified without affecting the way outside entities interact with it, as well as provide multiple abstractions Subtype polymorphism, almost universally called just polymorphism in the context of object-oriented programming, is the ability of one type, A, to appear as and be used like another type, B. This article is an accessible introduction to the topic, which restricts attention to the object-oriented paradigm. The purpose of polymorphism is to of itself. It may also provide a means of translation between entities which do not speak the same language, such as between a human and a computer. Because interfaces are a form of indirection In computer programming, indirection is the ability to reference something using a name, reference, or container instead of the value itself. The most common form of indirection is the act of manipulating a value through its memory address. For example, accessing a variable through the use of a pointer. A stored pointer that exists to provide a, some additional overhead is incurred versus direct communication.

The interface between a human and a computer is called a user interface In the industrial design field of human-machine interaction, the user interface is where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the machine which aids the operator in making operational decisions. Interfaces between hardware components are physical interfaces. This article deals with software interfaces, which exist between separate software components Component-based software engineering (also known as component-based development (CBD)) is a branch of software engineering, the priority of which is the separation of concerns in respect of the wide-ranging functionality available throughout a given software system. This practice brings about an equally wide-ranging degree of benefits in both the and provide a programmatic mechanism by which these components can communicate.

Contents

Interfaces in practice

A piece of software provides access to computer resources (such as memory, CPU, storage, etc.) by its underlying computer system; the availability of these resources to other software can have major ramifications—sometimes disastrous ones—for its functionality and stability. A key principle of design is to prohibit access to all resources by default, allowing access only through well-defined entry points, i.e. interfaces.[citation needed]

The types of access that interfaces provide between software components can include: constants In computer programming, a constant is a special kind of variable whose value cannot normally be altered during program execution. Many programming languages make an explicit syntactic distinction between constant and variable symbols, data types A data type In programming, a classification identifying one of various types of data, as floating-point, integer, or Boolean, stating the possible values for that type, the operations that can be done on that type, and the way the values of that type are stored, types of procedures A procedure is a specified series of actions or operations[disambiguation needed] which have to be executed in the same manner in order to always obtain the same result under the same circumstances . Less precisely speaking, this word can indicate a sequence of tasks, steps, decisions, calculations and processes, that when undertaken in the, exception Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution specifications and method signatures In computer programming, especially object-oriented programming, a method is commonly identified by its unique method signature. This usually includes the method name, and the number, types and order of its parameters. A method signature is the smallest type of a method. In some instances, it may be useful to define public variables In computer programming, a variable is a facility for storing data. The current value of the variable is the data actually stored in the variable. Depending on the programming language in question, the data stored in the variable can be intentionally altered during the program run, thus causing its value to change, or vary, hence the name. The as part of the interface. It often also specifies the functionality of those procedures and methods, either by comments In computer programming, a comment is a programming language construct used to embed programmer-readable annotations in the source code of a computer program. Those annotations are potentially significant to programmers but typically ignorable to compilers and interpreters. Comments are usually added with the purpose of making the source code or (in some experimental languages) by formal logical assertions and preconditions.

The interface of a software module A is deliberately kept separate from the implementation of that module. The latter contains the actual code of the procedures and methods described in the interface, as well as other "private" variables, procedures, etc.. Any other software module B (which can be referred to as a client to A) that interacts with A is forced to do so only through the interface. One practical advantage of this arrangement is that replacing the implementation of A by another one that meets the same specifications of the interface should not cause B to fail—as long as its use of A complies with the specifications of the interface (see also Liskov substitution principle In object-oriented programming, the Liskov substitution principle is a particular definition of a subtyping relation, called (strong) behavioral subtyping, that was initially introduced by Barbara Liskov in a 1987 conference keynote address entitled Data abstraction and hierarchy. It is a semantic rather than merely syntactic relation because it).

Interfaces in object oriented languages

In object-oriented Object-oriented programming is a programming paradigm that uses "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction, encapsulation, modularity, polymorphism, and languages the term interface is often used to define an abstract type In computing, an abstract data type or abstract data structure is a mathematical model for a certain class of data structures that have similar behavior; or for certain data types of one or more programming languages that have similar semantics. An abstract data type is defined indirectly, only by the operations that may be performed on it and by that contains no data, but exposes behaviors defined as methods.

A class In object-oriented programming, a class is a construct that is used as a blueprint to create objects of that class. This blueprint describes the state and behavior that the objects of the class all share. An object of a given class is called an instance of the class. The class that contains (and was used to create) that instance can be considered having all the methods corresponding to that interface is said to implement that interface. (Furthermore a class can implement multiple interfaces, and hence can be of different types at the same time.)

An interface is hence a type A data type In programming, a classification identifying one of various types of data, as floating-point, integer, or Boolean, stating the possible values for that type, the operations that can be done on that type, and the way the values of that type are stored definition: anywhere an object can be exchanged (in a function or method call) the type of the object to be exchanged can be defined in terms of an interface instead of a specific class In object-oriented programming, a class is a construct that is used as a blueprint to create objects of that class. This blueprint describes the state and behavior that the objects of the class all share. An object of a given class is called an instance of the class. The class that contains (and was used to create) that instance can be considered.

This allow later to use the same function exchanging different object types: hence such code turns out to be more generic and reusable.

Usually a method of an interface cannot be used directly, but there must be a class implementing that object to be used for the method invocation.

For example, one can define a interface called Stack In computer science, a stack is a last in, first out abstract data type and data structure. A stack can have any abstract data type as an element, but is characterized by only two fundamental operations: push and pop. The push operation adds to the top of the list, hiding any items already on the stack, or initializing the stack if it is empty that has two methods push() and pop() and later implement it in two different versions say: FastStack and GenericStack. The first being faster but working with a stack of fixed size, and the second using a data structure that can be resized but at the cost of somewhat slower speed.

This approach can be pushed to the limit of defining interfaces with a single method: e.g. the Java language defines the interface Readable that has the single read() method and a collection of implementations to be used for different purposes, among others: BufferedReader, FileReader, InputStreamReader, PipedReader, and StringReader.

In its purest form an interface (like in the Java language Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run)) must include only method definitions and constant values that make up part of the static interface of a type. Some languages (like C# C# is a multi-paradigm programming language encompassing imperative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within the .NET initiative and later approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270). C# is one of the programming languages) also permit the definition to include properties owned by the object, which are treated as methods with syntactic sugar In computer science, syntactic sugar in a language is syntax designed to make things easier to read or to express, while alternative ways of expressing them exist. It makes the language "sweeter" for humans to use: things can be expressed more clearly, or more concisely, or in an alternative style that some may prefer.

Programming against interfaces

The use of interface allows to implement a programming style called programming against interfaces. The idea behind this is to base the logic one develops on the sole interface definition of the objects one uses and do not make the code depend on the internal details. This allows the programmer the ability to later change the behavior of the system by simply swapping the object used with another implementing the same interface.

Pushing this idea to the limit one can introduce the inversion of control which means leaving the context to inject the code with the specific implementations of the interface that will be used to perform the work.

See also

This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be and removed. (July 2008)

Categories: Object-oriented programming | Interfaces | Programming constructs Categories: Computer programming | Programming language design

 

The above information uses material from Wikipedia and is licensed under the GNU Free Documentation License The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a.
Some facts may not have been fully verified for accuracy. [Disclaimers Wikipedia is an online open-content collaborative encyclopedia, that is, a voluntary association of individuals and groups working to develop a common resource of human knowledge. The structure of the project allows anyone with an Internet connection to alter its content. Please be advised that nothing found here has necessarily been reviewed by]
This page was last archived by our server on Thu Jul 29 05:17:19 2010. [ refresh local cache ]
Displaying this page or its contents does not use any Wikimedia Foundation's resources.
The owners of this site proudly support the Wikimedia Foundation.


YouTube adds cloud-based video editor - CNET
news.cnet.com
YouTube adds cloud-based video editor - CNET
Wed, 16 Jun 2010 12:32:38 GMT+00:00
cnet given that you already can link to a segment that's a specific length of time through a YouTube video, the big innovation here is a user interface for ...
Google News Search: Interface (computer science),
Thu Jul 29 05:17:23 2010
logo vertical alesis computer interface png
bpmmusic.com
logo vertical alesis computer interface png
1200px x 165px | 92.50kB

[source page]



Yahoo Images Search: Interface (computer science),
Thu Jul 29 05:17:26 2010
iPhone SDK Development
virtualbooks4u.blogspot.com
iPhone SDK Development

(Engr. Salahuddin)

Wed, 07 Oct 2009 18:25:13 GM

Master the iPhone's unique user . interface. components, including tables, tab bars, navigation bars, and the multi-touch . interface. . * Connect your iPhone to the outside world with networking, exploit the power of a relational database ...

Google Blogs Search: Interface (computer science),
Thu Jul 29 05:17:27 2010
I want to use different OS (windows, linux or unix or mac) on 1 laptop. Which laptop should I buy?
Q. I had a macbook until recently, and I dint like it much. How are dell or hp? I am a computer science student, so I need a laptop for coding in C, C#, .NET, java etc. I mostly like windows' interface.the macbook keys were too much for me.
Asked by NYC GIRL - Sat Jul 12 02:45:35 2008 - - 9 Answers - 0 Comments

A. I've been through 2 HP laptops all of them work fine. 1 survived an accidental diet coke spill. It acts funky from time to time but it still works... I now have an HP desktop. As you can tell already I swear by HP haha. They're cheap and super reliable! My other laptop is an ancient Compaq, technically an HP because that was when CPQ got bought out by HP. It has passed its' 5th year and still is ticking along. I don't like Dell laptops. They're way too overpriced. HP's academic discount is also more generous and you really don't need to show proof that you're in college. Just sign up and tell them where you go and bam! discount.
Answered by HoHosareSICK - Sat Jul 12 02:49:01 2008

Yahoo Answers Search: Interface (computer science),
Thu Jul 29 05:17:27 2010