Cross-platform

Cross-platform

In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms.[1] Cross-platform software may be divided into two types; one requires individual building or compilation for each platform that it supports, and the other one can be directly run on any platform without special preparation, e.g., software written in an interpreted language or pre-compiled portable bytecode for which the interpreters or run-time packages are common or standard components of all platforms. [2]

For example, a cross-platform application may run on Microsoft Windows on the x86 architecture, Linux on the x86 architecture and Mac OS X on either the PowerPC or x86 based Apple Macintosh systems. A cross-platform application may run on as many as all existing platforms, or on as few as two platforms.

Platforms

A platform is a combination of hardware and software used to run software applications. A platform can be described simply as an operating system or computer architecture, or it could be the combination of both. Probably the most familiar platform is Microsoft Windows running on the x86 architecture. Other well-known desktop computer platforms include Linux/Unix and Mac OS X (both of which are themselves cross-platform). There are, however, many devices such as cellular telephones that are also effectively computer platforms but less commonly thought about in that way. Application software can be written to depend on the features of a particular platform—either the hardware, operating system, or virtual machine it runs on. The Java platform is a virtual machine platform which runs on many operating systems and hardware types, and is a common platform for software to be written for.

Hardware platforms

A hardware platform can refer to a computer’s architecture or processor architecture. For example, the x86 and x86-64 CPUs make up one of the most common computer architectures in use in general-purpose home computers today[citation needed]. These machines often run one version of Microsoft Windows[3], though they can run other operating systems as well, including Linux, OpenBSD, NetBSD, Mac OS X and FreeBSD.

An ARM architecture is common on smartphones and tablet computers, which run Android, IOS and other mobile operating systems.

Software platforms

Software platforms can either be an operating system or programming environment, though more commonly it is a combination of both. A notable exception to this is Java, which uses an operating system independent virtual machine for its compiled code, known in the world of Java as bytecode. Examples of software platforms include:

Java platform

As previously noted, the Java platform is an exception to the general rule that an operating system is a software platform. The Java language requires a virtual machine, or a “virtual CPU” which runs all of the code that is written for the language. This enables the same executable binary to run on all systems, supporting the Java software, through the use of a Java Virtual Machine. Java executables do not run natively on the operating system; that is, neither MSWindows nor Linux execute Java programs directly.

Even though Java code does not run natively, the JVM is fully capable of providing OS related services, like disk I/O and network access, if the appropriate privileges are granted. The JVM allows users to decide the appropriate protection level, depending on an ACL. For example, disk and network access is usually enabled for desktop applications, but not for browser based Applets.

JNI can also be used to enable access to Operating System specific functions. Currently, Java programs can run on the Microsoft Windows, Mac OS X, Linux, and Solaris operating systems. For mobile applications, browser plugins are used for Windows and Mac based devices, and Android has built-in support for Java.

Cross-platform software

In order for software to be considered cross-platform, it must be able to function on more than one computer architecture or operating system. This can be a time-consuming task given that different operating systems have different application programming interfaces or APIs (for example, Linux uses a different API for application software than Windows does).

Just because a particular operating system may run on different computer architectures, that does not mean that the software written for that operating system will automatically work on all architectures that the operating system supports. One example as of August, 2006 was OpenOffice.org, which did not natively run on the AMD64 or Intel 64 lines of processors implementing the x86-64 64-bit standards for computers; this has since been changed, and the OpenOffice.org suite of software is “mostly” ported to these 64-bit systems [1]. This also means that just because a program is written in a popular programming language such as C or C++, it does not mean it will run on all operating systems that support that programming language—or even on the same operating system on a different architecture.

Web applications

Web applications are typically described as cross-platform because, ideally, they are accessible from any of various web browsers within different operating systems. Such applications generally employ a client–server system architecture, and vary widely in complexity and functionality. This wide variability significantly complicates the goal of cross-platform capability, which is routinely at odds with the goal of advanced functionality.

Basic applications

Basic web applications perform all or most processing from a stateless web server, and pass the result to the client web browser. All user interaction with the application consists of simple exchanges of data requests and server responses. These types of applications were the norm in the early phases of World Wide Web application development. Such applications follow a simple transaction model, identical to that of serving static web pages. Today, they are still relatively common, especially where cross-platform compatibility and simplicity are deemed more critical than advanced functionalities. hence this is basic application

Advanced applications

Prominent examples of advanced web applications include the Web interface to Gmail, A9.com, and the maps.live.com website, part of the Live Search service from Microsoft. Such advanced applications routinely depend on additional features found only in the more recent versions of popular web browsers. These dependencies include Ajax, JavaScript, “Dynamic” HTML, SVG, and other components of rich internet applications. Older versions of popular browsers tend to lack support for certain features.

Design strategies

Because of the competing interests of cross-platform compatibility and advanced functionality, numerous alternative web application design strategies have emerged.

Such strategies include:

Graceful degradation

Graceful degradation attempts to provide the same or similar functionality to all users and platforms, while diminishing that functionality to a ‘least common denominator’ for more limited client browsers. For example, a user attempting to use a limited-feature browser to access Gmail may notice that Gmail switches to “Basic Mode,” with reduced functionality. Some view this strategy as a lesser form of cross-platform capability.

Separation of functionality

Separation of functionality attempts to simply omit those subsets of functionality that are not capable from within certain client browsers or operating systems, while still delivering a ‘complete’ application to the user. (see also Separation of concerns).

Multiple codebase

Multiple codebase applications present different versions of an application depending on the specific client in use. This strategy is arguably the most complicated and expensive way to fulfill cross-platform capability, since even different versions of the same client browser (within the same operating system) can differ dramatically between each other. This is further complicated by the support for “plugins” which may or may not be present for any given installation of a particular browser version.

Third party libraries

Third party libraries attempt to simplify cross-platform capability by ‘hiding’ the complexities of client differentiation behind a single, unified API.

Testing strategies

One complicated aspect of cross-platform web application design is the need for software testing. In addition to the complications mentioned previously, there is the additional restriction that some browsers prohibit installation of different versions of the same browser on the same operating system. Techniques such as full virtualization are sometimes used as a workaround for this problem.

Traditional applications

Although web applications are becoming increasingly popular, many computer users still use traditional application software which does not rely on a client/web-server architecture. The distinction between “traditional” and “web” applications is not always unambiguous, however, because applications have many different features, installation methods and architectures; and some of these can overlap and occur in ways that blur the distinction. Nevertheless, this simplifying distinction is a common and useful generalization.

Binary software

Traditionally in modern computing, application software has been distributed to end-users as binary images, which are stored in executables, a specific type of binary file. Such executables only support the operating system and computer architecture that they were built for—which means that making a “cross-platform executable” would be something of a massive task, and is generally not done.

For software that is distributed as a binary executable, such as software written in C or C++, the programmer must build the software for each different operating system and computer architecture. For example, Mozilla Firefox, an open-source web browser, is available on Microsoft Windows, Mac OS X (both PowerPC and x86 through something Apple calls a Universal binary), and Linux on multiple computer architectures. The three platforms (in this case, Windows, Mac OS X, and Linux) are separate executable distributions, although they come from the same source code.

In the context of binary software, cross-platform programs are written in the source code and then “translated” to each system that it runs on through compiling it on different platforms. Also, software can be ported to a new computer architecture or operating system so that the program becomes more cross-platform than it already is. For example, a program such as Firefox, which already runs on Windows on the x86 family, can be modified and re-built to run on Linux on the x86 (and potentially other architectures) as well.

As an alternative to porting, cross-platform virtualization allows applications compiled for one CPU and operating system to run on a system with a different CPU and/or operating system, without modification to the source code or binaries. As an example, Apple's Rosetta software, which is built into Intel-based Apple Macintosh computers, runs applications compiled for the previous generation of Macs that used PowerPC CPUs. Another example is IBM PowerVM Lx86, which allows Linux/x86 applications to run unmodified on the Linux/Power operating system.

Scripts and interpreted languages

A script can be considered to be cross-platform if the scripting language is available on multiple platforms and the script only uses the facilities provided by the language. That is, a script written in Python for a Unix-like system will likely run with little or no modification on Windows, because Python also runs on Windows; there is also more than one implementation of Python that will run the same scripts (e.g., IronPython for .NET). The same goes for many of the open source programming languages that are available and are scripting languages.

Unlike binary executables, the same script can be used on all computers that have software to interpret the script. This is because the script is generally stored in plain text in a text file. There may be some issues, however, such as the type of new line character that sits between the lines. Generally, however, little or no work has to be done to make a script written for one system, run on another.

Some quite popular cross-platform scripting or interpreted languages are:

  • bash—A Unix shell commonly run on Linux and other modern Unix-like systems, as well as on Windows via the Cygwin POSIX compatibility layer.
  • Perl—A scripting language first released in 1987. Used for CGI WWW programming, small system administration tasks, and more.
  • PHP—A scripting language most popular in use on the WWW for web applications.
  • Python—A modern scripting language where the focus is on rapid application development and ease-of-writing, instead of program run-time efficiency.
  • Ruby—A scripting language whose purpose is to be object-oriented and easy to read. Can also be used on the web through Ruby on Rails.
  • Tcl - A dynamic programming language, suitable for a wide range of uses, including web and desktop applications, networking, administration, testing and many more.

Video games

Cross-platform is a term that can also apply to video games released on a range of video game consoles, specialized computers dedicated to the task of playing games. Examples of cross-platform games include:

Each has been released across a variety of gaming platforms, such as the Nintendo Wii, PlayStation 3, Xbox 360, personal computers (PCs), and mobile devices.

The characteristics of a particular system may lengthen the time taken to implement a video game across multiple platforms. So, a video game may initially be released on a few platforms and then later released on remaining platforms. Typically, this situation occurs when a new gaming system is released, because video game developers need to acquaint themselves with the hardware and software associated with the new console.

Some games may not become cross-platform because of licensing agreements between developers and video game console manufacturers that limit development of a game to one particular console. As an example, Disney could create a game with the intention of release on the latest Nintendo and Sony game consoles. Should Disney license the game with Sony first, Disney may in exchange be required to release the game solely on Sony’s console for a short time or indefinitely — effectively prohibiting a cross-platform release for the duration.

Several developers have implemented means to play games online while using different platforms. Epic Games, Microsoft, and Valve Software all possess technology that allows Xbox 360 and PlayStation 3 gamers to play with PC gamers, leaving the decision of which platform to use to consumers. The first game to allow this level of interactivity between PC and console games was Quake 3.[citation needed]

Games that feature cross-platform online play include:

Platform-independent software

Software that is platform independent does not rely on any special features of any single platform, or, if it does, handles those special features such that it can deal with multiple platforms.[citation needed]

Cross-platform programming

Cross-platform programming is the practice of actively writing software that will work on more than one platform.

Approaches to cross-platform programming

There are different ways of approaching the problem of writing a cross-platform application program. One such approach is simply to create multiple versions of the same program in different source trees—in other words, the Windows version of a program might have one set of source code files and the Macintosh version might have another, while a FOSS *nix system might have another. While this is a straightforward approach to the problem, it has the potential to be considerably more expensive in development cost, development time, or both, especially for the corporate entities. The idea behind this is to create more than two different programs that have the ability to behave similarly to each other. It is also possible that this means of developing a cross-platform application will result in more problems with bug tracking and fixing, because the two different source trees would have different programmers, and thus different defects in each version. The smaller the programming team, the quicker the bug fixes tend to be.

Another approach that is used is to depend on pre-existing software that hides the differences between the platforms—called abstraction of the platform—such that the program itself is unaware of the platform it is running on. It could be said that such programs are platform agnostic. Programs that run on the Java Virtual Machine (JVM) are built in this fashion.

Some applications mix various methods of cross-platform programming to create the final application. An example of this is the Firefox web browser, which uses abstraction to build some of the lower-level components, separate source subtrees for implementing platform-specific features (like the GUI), and the implementation of more than one scripting language to help facilitate ease of portability. Firefox implements XUL, CSS and JavaScript for extending the browser, in addition to classic Netscape-style browser plugins. Much of the browser itself is written in XUL, CSS, and JavaScript, as well.

Cross-platform programming toolkits and environments

There are a number of tools[5][6] which are available to help facilitate the process of cross-platform programming:

  • Cairo: A free software library used to provide a vector graphics-based, device-independent API. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is written in C and has bindings for many programming languages.
  • Eclipse: An open source cross platform development environment. Implemented in Java with a configurable architecture which supports many tools for software development. Add-ons are available for several languages, including Java and C++.
  • FLTK: Another open source cross platform toolkit, but more lightweight because it restricts itself to the GUI.
  • fpGUI: An open source widget toolkit that is completely implemented in Object Pascal. It currently supports Linux, Windows and a bit of Windows CE.
  • GTK+: An open source widget toolkit for Unix-like systems with X11 and Microsoft Windows.
  • haXe: An open source cross-platform language.
  • Juce: An application framework written in C++, used to write native software on numerous systems (Microsoft Windows, POSIX, Mac OS X), with no change to the code.
  • LiveCode: a RAD IDE developed by Runtime Revolution, compiles binaries to MacOS X, Windows, Linux, iOS, Android, and can be used as a server-side scripting language to produce web applications.
  • Mono (an open source version of Microsoft .NET): A cross-platform framework for applications and programming languages.
  • MonoCross is an open source Model-view-controller design pattern where the model and controller are shared cross-platform but the view is platform-specific.
  • MoSync is an open source SDK for mobile platform app development in the C++ family.
  • Mozilla: An open source platform for building Mac, Windows and Linux applications.
  • OpenGL: A cross-platform 3D graphics library.
  • Qt—An application framework and widget toolkit for Unix-like systems with X11, Microsoft Windows, Mac OS X, and other systems—available under both open source and proprietary licenses.
  • RealStudio: a RAD IDE developed by Real Software, uses an object-oriented dialect of the BASIC programming language, and produces compiled binaries for Macintosh, Windows and Linux, as wells as being able to produce cgi-based web applications.
  • Simple and Fast Multimedia Library—A multimedia C++ API that provides low and high level access to graphics, input, audio, etc.
  • Simple DirectMedia Layer—An open source cross-platform multimedia library written in C that creates an abstraction over various platforms’ graphics, sound, and input APIs. It runs on many operating systems including Linux, Windows and Mac OS X and is aimed at games and multimedia applications.
  • Smartface Platform: A cross platform tool for Windows used to create mobile applications for J2ME, Symbian S60, BlackBerry and Android, using drag-and-drop tools and action editing.
  • Tcl/Tk
  • wxWidgets: An open source widget toolkit that is also an application framework.[7] It runs on Unix-like systems with X11, Microsoft Windows and Mac OS X. It permits applications written to use it to run on all of the systems that it supports, if the application does not use any operating system-specific programming in addition to it.
  • XVT: A cross-platform toolkit for creating desktop applications in C/C++ on Windows, Linux and Unix (Solaris, HPUX, AIX), and Mac.
  • Ultimate++: is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of libraries (GUI, SQL, etc..), and an integrated development environment. It supports Windows and Unix-like OS-s. The U++ competes with popular scripting languages while preserving C/C++ runtime characteristics. It has its own integrated development environment, TheIDE, which features BLITZ-build technology to speedup C++ rebuilds up to 4 times.

Challenges to cross-platform development

There are certain issues associated with cross-platform development. Some of these include:

  • Testing cross-platform applications may be considerably more complicated, since different platforms can exhibit slightly different behaviors or subtle bugs. This problem has led some developers to deride cross-platform development as “Write Once, Debug Everywhere”, a take on Sun’s “Write Once, Run Anywhere” marketing slogan.
  • Developers are often restricted to using the lowest common denominator subset of features which are available on all platforms. This may hinder the application's performance or prohibit developers from using platforms’ most advanced features.
  • Different platforms often have different user interface conventions, which cross-platform applications do not always accommodate. For example, applications developed for Mac OS X and GNOME are supposed to place the most important button on the right-hand side of windows and dialogs, whereas Microsoft Windows and KDE have the opposite convention. Though many of these differences are subtle, a cross-platform application which does not conform appropriately to these conventions may feel clunky or alien to the user. When working quickly, such opposing conventions may even result in data loss, such as in a dialog box confirming whether the user wants to save or discard changes to a file.
  • Scripting languages and virtual machines must be translated into native executable code each time the application is executed, imposing a performance penalty. This performance hit can be alleviated using advanced techniques like just-in-time compilation; but even using such techniques, some performance overhead may be unavoidable.
  • Different platforms require the use of native package formats such as RPM and MSI. Multiplatform installers such as InstallBuilder and IzPack address this need.
  • Cross-platform execution environments may suffer cross-platform security flaws, creating a fertile environment for cross-platform malware.

See also

References

  1. ^ "Design Guidelines: Glossary". java.sun.com. http://java.sun.com/products/jlf/ed1/dg/higq.htm. Retrieved 2011-10-19. 
  2. ^ "Encyclopedia > cross platform". PC MAgazine Encyclopedia. http://www.pcmag.com/encyclopedia_term/0,2542,t=cross+platform&i=40495,00.asp#fbid=aHfb3ldkqPq. Retrieved 2011-10-19. 
  3. ^ On the Net Marketshare website, Windows (all variants) has ~ 89% market share as of March 2011
  4. ^ "Team Fortress 2 Now available on OS X". Valve Corporation. http://www.youtube.com/watch?v=CeKeLDfj-hE&feature=channel_video_title. 
  5. ^ The GUI Toolkit, Framework Page
  6. ^ Platform Independent FAQ
  7. ^ WxWidgets Description

Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • cross-platform — ˈcross ˌplatform adjective COMPUTING cross platform software, computer equipment etc is designed so that it can be used on different operating system S (= system in a computer that helps all the programs in it to work together ) : • Not all of… …   Financial and business terms

  • cross-platform — cross platˈform adjective (computing) Compatible with different types of computers or software • • • Main Entry: ↑cross * * * ˌcross ˈplatform 7 [cross platform] adjective (of a computer program or an electronic …   Useful english dictionary

  • Cross Platform —   [engl.], plattformübergreifend …   Universal-Lexikon

  • Cross-platform — Multiplate forme Un logiciel multiplate forme ou multiplateforme[1] est un logiciel conçu pour fonctionner sur plusieurs plates formes, c’est à dire le couple liant ordinateur et système d’exploitation. En anglais on parle souvent de « cross …   Wikipédia en Français

  • Cross-platform virtualization — is a form of computer virtualization that allows software compiled for a specific CPU and operating system to run unmodified on computers with different CPUs and/or operating systems, through a combination of dynamic binary translation and… …   Wikipedia

  • Cross platform promotion — or CPP refers to the effective utilization of all social media platforms, such as Twitter, Facebook and LinkedIn in an holistic manner sharing content across platforms to provide a cohesive[1][2] brand message. CPP defines the synergetic… …   Wikipedia

  • Cross Platform Component Object Model — (XPCOM) ist ein plattformunabhängiges Komponentenmodell von Mozilla. Es funktioniert ähnlich wie CORBA oder COM mit Hilfe von Schnittstellen. Es verfügt über verschiedene Sprachanbindungen und Schnittstellenbeschreibungen, so dass Programmierer… …   Deutsch Wikipedia

  • Cross-platform interchange — A diagram of a paired cross platform interchange The former and current tr …   Wikipedia

  • Cross-platform support middleware — A Cross Platform Support Middleware (CPSM) is a software abstraction layer that guarantees the existence, and correct implementation, of a set of services on top a set of platforms.[1] Contents 1 Formal Model 2 Trivial CPSM 3 Non trivia …   Wikipedia

  • Cross-platform Audio Creation Tool — Not to be confused with xACT, a GUI frontend for a collection of open source audio codecs, for the Mac. Cross platform Audio Creation Tool (XACT) is an audio programming library and engine released by Microsoft as part of the DirectX SDK. [1] It… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”