Portability (data-processing)

See also: Portability

The portability indicates for a Computer program its capacity to be functioned more or less easily in various environments of execution. The differences can relate to the material environment (processor) as on the software environment (Operating system). The difference in environment can also relate to a combination of the two elements. It is the case for example in the fields of the Onboard computing, the super calculators or the virtual machines.

The action to modify a program so that it can be carried out on another environment is called bearing.

Environment of execution

The concept of environment of execution indicates the unit (physical or software) which will carry out the instructions of the program. This environment can have various aspects according to the Computer programming language used where the type of program.

Thus, the environment of execution is:

  • the operating system for the compiled languages,
  • the interpreter for the interpreted languages,
  • the virtual Machine for languages which can be pseudo-compiled like the Java or the C#,
  • the navigator for the Web applications,
  • material architecture for the operating systems.

Lowest common denominator

See also: Abstraction

The level of portability of a program is measured with the fact that it uses lowest common denominator to several environments. Thus, if a software Bibliothèque is available on several environments and that this program does nothing but use the latter and noncertain functions specific to a particular environment, said that this program is portable everywhere where this library is available.

The software libraries most current those are delivered with the computer programming languages, which one calls libraries standards. Thus if a program uses the language C and only its standard library, it could be carried without difficulty, simply in the recompilant on all the environments having a compiler C (what is the case on the near total of the existing operating systems).

POSIX

See also: POSIX

The portability of a program is a good thing from the fact that it makes it possible this last to touch a broader audience. The disadvantage is that it is necessary to be limited to common libraries, which very often poor are compared with what is provided with a particular environment of execution. Thus, the libraries standards of C and the C++ do not know the network, the light Processus S or the graphical interfaces.

It is partly for that was created the standard POSIX, which defines several functionalities that a system UNIX must provide, like its basic commands and its Application program interface. POSIX makes it possible to make things much more advanced than by simply using the standard libraries of C and C++. Thus, POSIX knows the network, the processes light and has functionalities of Système real-time.

Qt, GTK+, wxWidgets, etc

See also: Qt, GTK+, WxWidgets

Although POSIX offers evolved/moved functionalities, it always misses of them one which is largely used nowadays, the graphical interface. For this reason libraries such as Qt, GTK+ or wxWidgets were born. But these last are not limited to the graphical interface and also offer an application program interface for the network, the access to the files or the handling of Character string.

Levels of portability

The portability of a program can be done on several levels. For the moment, the software libraries such as POSIX or Qt are limited to the portability on the level of the source code. But there exists of different levels, like that on the level of the Bytecode or, but rarer, on the level of the achievable one.

Source code

The portability on the level of the source code requires the availability of the application program interface on all the target environments of execution. From that, it is enough to recompiler the source code with the good libraries.

The portability on the level of the source code is also valid with the interpreted languages, where this time, it is the availability of the interpreter and his standard library which is necessary.

Bytecode

See also: Bytecode

The bytecode is a kind of code intermediate, which one can regard as “with half compiled” or “pseudo-compiled”. This code is not intended to be carried out directly by the operating system like any compiled program. It is a virtual Machine which is charged with that. Its goal is to be used as layer between the program and the operating system, making thus perfectly portable any program, provided that there exists a virtual machine on the target system.

Today, the principal representative is Java, whose virtual machine is available, on the principal operating systems (Windows, Linux, Mac OS, FreeBSD or Solaris).

The computer programming language of Microsoft, C# also has a virtual machine, but it is intended to function only on Windows. However, the project Mono aims to implement such a virtual machine and its software libraries.

The achievable one

This level of portability is in particular offered by the format of achievable Universal binaries of Apple, or of the applications are carried out indifferently on architecture PowerPC and X86, but only on Mac OS X

Operating system

As one saw, the concept of environment of execution for an operating system indicates the material architecture on which it is carried out. The level of portability of a system thus depends on its capacity to be abstracted from specificities from the material by having a minimum from code depend on the material. On this level, the great difficulty is to have a collection of pilot peripherals rather wide so that the use of the operating system is interesting.

Today, the most portable system is certainly NetBSD, available on more than fifty material architectures (energy of the Superordinateur to the Grill-pain).

Mobile telephony

In the field of mobile telephony, a version for mobiles of the language Java, J2ME - Midp, ensures the plays and applications a certain portability. It résoud not all problems specific to the hundreds of mobile phones available, with their characteristics, their firmwares and their bugs. The bearing, i.e. the rewriting of the application for each different telephone, remains necessary because of this heterogeneity.

Note

Random links:Gordon E. Moore | Macallan | Syd Saylor | Yves Nadeau | Darius II (video game) | Kabaddi