Product Code Database
Example Keywords: house -halo $18-129
   » » Wiki: Cross-platform Software
Tag Wiki 'Cross-platform Software'.
Tag

In , cross-platform software (also called multi-platform software, platform-agnostic software, or platform-independent software) is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable for which the interpreters or run-time packages are common or standard components of all supported platforms.

For example, a cross-platform application may run on Microsoft Windows, , and . Cross-platform software may run on many platforms, or as few as two. Some frameworks for cross-platform development are , Kivy, Qt, Flutter, , , , Ionic, and .


Platforms
Platform can refer to the type of processor (CPU) or other hardware on which an (OS) or application runs, the type of OS, or a combination of the two. An example of a common platform is the Microsoft Windows OS running on the x86 architecture. Other well-known desktop platforms are / and - both of which are themselves cross-platform. There are, however, many devices such as smartphones that are also platforms. Applications can be written to depend on the features of a particular platform—either the hardware, OS, or (VM) it runs on. For example, the Java platform is a common VM platform which runs on many OSs and hardware types.


Hardware
A hardware platform can refer to an instruction set architecture. For example: x86 architecture and its variants such as IA-32 and x86-64. These machines often run one version of Microsoft Windows, On the Net Marketshare website, which has around 89% market share as of March 2011 though they can run other OSs including Linux, , , macOS and .

The 32-bit ARM architectures (and newer 64-bit version) is common on smartphones and , which run Android, iOS and other mobile operating systems.


Software
A software platform can be either an OS or programming environment, though more commonly it is a combination of both. An exception is Java, which uses an OS-independent VM to execute . Examples of software platforms are:

  • BlackBerry 10
  • Android for smartphones and tablet computers (x86, ARM)
  • (ARM)
  • Microsoft Windows (x86, ARM)
    • Microsoft's Common Language Infrastructure (CLI), also known as .NET Framework
    • Cross-platform variant Mono (previously by and now by )
  • Java
  • Web browsers – more or less compatible with each other, running web-apps
  • (x86, PowerPC, ARM, and other architectures)
  • (x86, PowerPC (on 10.5 and below), and ARM (on Apple silicon or 11.0 and above))
  • Solaris (SPARC, x86)
  • PlayStation 4 (x86), PlayStation 3 (PowerPC) and (ARM)

Minor/historical


Java
The Java language is typically compiled to run on a VM that is part of the Java platform. The Java VM (JVM) is a CPU implemented in software, which runs all Java code. This enables the same code to run on all systems that implement a JVM. Java software can be executed by a hardware-based . This is used mostly in embedded systems.

Java code running in the JVM has access to OS-related services, like disk I/O and network access, if the appropriate privileges are granted. The JVM makes the system calls on behalf of the Java application. This lets 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 . The Java Native Interface (JNI) can also be used to access OS-specific functions, with a loss of portability.

Currently, Java Standard Edition software can run on Microsoft Windows, macOS, several Unix-like OSs, and several real-time operating systems for embedded devices. For mobile applications, browser plugins are used for Windows and Mac based devices, and Android has built-in support for Java. There are also subsets of Java, such as or Java Platform, Micro Edition, designed for resource-constrained devices.


Implementation
For software to be considered cross-platform, it must function on more than one computer architecture or OS. Developing such software can be a time-consuming task because different OSs have different application programming interfaces (API). For example, Linux uses a different API from Windows.

Software written for one OS may not automatically work on all architectures that OS supports. One example is OpenOffice.org, which in 2006 did not natively run on AMD64 or Intel 64 processors implementing the x86-64 standards; by 2012 it was "mostly" ported to these systems. Porting to x86-64 (AMD64, EM64T) – Apache OpenOffice Wiki. Wiki.services.openoffice.org (2012-06-22). Retrieved on 2013-07-17. Just because software is written in a popular programming language such as C or C++, it does not mean it will run on all OSs that support that language—or even on different versions of the same OS.


Web applications
are typically described as cross-platform because, ideally, they are accessible from any : the browser is the platform. Web applications generally employ a client–server model, but vary widely in complexity and functionality. It can be hard to reconcile the desire for features with the need for compatibility.

Basic web applications perform all or most processing from a , 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. This type of application was 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 functionality.

Prominent examples of advanced web applications include the Web interface to , A9.com, website, and the Live Search service (now Bing) from Microsoft. Such applications routinely depend on additional features found only in the more recent versions of popular web browsers. These features include Ajax, , , SVG, and other components of rich web applications. Older versions often lack these.


Design
Because of the competing interests of compatibility and functionality, numerous design strategies have emerged.

Many software systems use a layered architecture where platform-dependent code is restricted to the upper- and lowermost layers.


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 but still of use.


Multiple codebases
Some software is maintained in distinct codebases for different (hardware and OS) platforms, with equivalent functionality. This requires more effort to maintain the code, but can be worthwhile where the amount of platform-specific code is high.


Single codebase
This strategy relies on having one codebase that may be compiled to multiple platform-specific formats. One technique is conditional compilation. With this technique, code that is common to all platforms is not repeated. Blocks of code that are only relevant to certain platforms are made conditional, so that they are only interpreted or when needed. Another technique is separation of functionality, which disables functionality not supported by browsers or OSs, while still delivering a complete application to the user. (See also: Separation of concerns.) This technique is used in web development where interpreted code (as in scripting languages) can query the platform it is running on to execute different blocks conditionally.


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


Responsive web design
Responsive web design (RWD) is a Web design approach aimed at crafting the visual layout of sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices, from mobile phones to desktop computer monitors. Little or no platform-specific code is used with this technique.


Testing
Cross-platform applications need much more integration testing. Some web browsers prohibit installation of different versions on the same machine. There are several approaches used to target multiple platforms, but all of them result in software that requires substantial manual effort for testing and maintenance.
(2022). 9781450327688
Techniques such as full virtualization are sometimes used as a workaround for this problem.

Tools such as the Page Object Model allow cross-platform tests to be scripted so that one test case covers multiple versions of an app. If different versions have similar user interfaces, all can be tested with one test case.


Traditional applications
Web applications are becoming increasingly popular but 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 clear. Features, installation methods and architectures for web and traditional applications overlap and blur the distinction. Nevertheless, this simplifying distinction is a common and useful generalization.


Binary software
Traditional application software has been distributed as binary files, especially . Executables only support platform they were built for—which means that a single cross-platform executable could be very bloated with code that never executes on a particular platform. Instead, generally there is a selection of executables, each built for one platform.

For software that is distributed as a binary executable, such as that written in C or C++, there must be a for each platform, using a toolset that translates—transcompiles—a single codebase into multiple binary executables. For example, , an open-source web browser, is available on Windows, macOS (both and x86 through what Apple Inc. calls a ), Linux, and BSD on multiple computer architectures. The four platforms (in this case, Windows, macOS, Linux, and BSD) are separate executable distributions, although they come largely from the same . In rare cases, executable code built for several platforms is combined into a single executable file called a .

The use of different toolsets may not be enough to build a working executables for different platforms. In this case, programmers must the source code to the new platform. For example, an application 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. The multiple versions of the code may be stored as separate codebases, or merged into one codebase.

An alternative to porting is cross-platform virtualization, where applications compiled for one platform can run on another without modification of the source code or binaries. As an example, Apple's Rosetta, which is built into -based 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 OS.

Example of cross-platform binary software:

  • The office suite is built for Microsoft Windows, macOS, many Linux distributions, , , , Android, iOS, iPadOS, Chrome OS, web-based and many others. Many of these are supported on several hardware platforms with processor architectures including IA-32, x86-64, (ARMel, ARMhf, ARM64), MIPS, MIPSel, PowerPC, ppc64el, and S390x9


Scripts and interpreted languages
A script can be considered to be cross-platform if its interpreter is available on multiple platforms and the script only uses the facilities built into the language. For example, a script written in Python for a system will likely run with little or no modification on Windows, because Python also runs on Windows; indeed there are many implementations (e.g. for .NET Framework). The same goes for many of the open-source scripting languages.

Unlike binary executable files, 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 in a . There may be some trivial issues, such as the representation of a .

Some popular cross-platform scripting languages are:

  • bash – A commonly run on Linux and other modern Unix-like systems, as well as on Windows via the compatibility layer.
  • – First released in 1987. Used for CGI programming, small system administration tasks, and more.
  • – Mostly used for web applications.
  • Python – A language which focuses on rapid application development and ease of writing, instead of run-time efficiency.
  • Ruby – An object-oriented language which aims to be easy to read. Can also be used on the web through Ruby on Rails.
  • – 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 or multi-platform is a term that can also apply to released on a range of video game consoles. Examples of cross-platform games include: Miner 2049er, , FIFA series, and .

Each has been released across a variety of gaming platforms, such as the , PlayStation 3, Xbox 360, personal computers, and .

Some platforms are harder to write for than others. To offset this, a video game may be released on a few platforms first, then later on others. Typically, this happens when a new gaming system is released, because video game developers need to acquaint themselves with its hardware and software.

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


Cross-platform play
Several developers have implemented ways to play games online while using different platforms. , , , and Valve 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.Cribba. Quake III Arena, Giant Bombcast, February 15, 2013.

Games that feature cross-platform include , , Street Fighter V, Killer Instinct, Paragon and , and with its Better Together update on Windows 10, VR editions, Pocket Edition and .


Programming
Cross-platform programming is the practice of deliberately writing software to work on more than one platform.


Approaches
There are different ways to write a cross-platform application. One approach is to create multiple versions of the same software in different source trees—in other words, the Microsoft Windows version of an application might have one set of source code files and the version another, while a FOSS *nix system might have a third. While this is straightforward, compared to developing for only one platform it can cost much more to pay a larger team or release products more slowly. It can also result in more bugs to be tracked and fixed.

Another approach is to use software that hides the differences between the platforms. This abstraction layer insulates the application from the platform. Such applications are platform agnostic. Applications that run on the JVM are built this way.

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


Toolkits and environments
There are many tools The GUI Toolkit, Framework Page available to help the process of cross-platform programming:

  • 8th: a development language which utilizes as its GUI layer. It currently supports Android, iOS, Windows, macOS, Linux and Raspberry Pi.
  • : A mobile application platform that works in all Indian languages, including their keyboards, and also supports AppWallet and native performance in all OSs.
  • : a framework that supports the workflow of app development and deployment in an enterprise environment. Natively developed containers present hardware features of the mobile devices or tablets through an API to HTML5 code thus facilitating the development of mobile apps that run on different platforms.
  • Boden: a UI framework written in C++.
  • Cairo: a 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.
  • Cocos2d: an open-source toolkit and game engine for developing 2D and simple 3D cross-platform games and applications.
  • : an open-source Write Once Run Anywhere (WORA) framework for Java and Kotlin developers.
  • Delphi: an IDE which uses a Pascal-based language for development. It supports Android, iOS, Windows, macOS, Linux.
  • : a GUI and 2D/3D graphics toolkit and IDE, written in eC and with support for additional languages such as C and Python. It supports Linux, FreeBSD, Windows, Android, macOS and the Web through Emscripten or Binaryen (WebAssembly).
  • : an open-source 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++.
  • : an open-source toolkit, but more lightweight because it restricts itself to the GUI.
  • Flutter: A cross-platform UI framework for Android and iOS developed by .
  • : An open-source widget toolkit that is completely implemented in Object Pascal. It currently supports Linux, Windows and a bit of Windows CE.
  • : A Windows rapid software development solution for cross-platform application creation and deployment based on knowledge representation and supporting C#, , Java including Android and BlackBerry smart devices, for Apple mobile devices, , Ruby, , and .
  • : A BASIC dialect and compiler that generates C++ code. It includes cross compilers for many platforms and supports numerous platform (Windows, Mac, Linux, Android, iOS and some exotic handhelds).
  • Godot: an SDK which uses Godot Engine.
  • GTK+: An open-source widget toolkit for Unix-like systems with X11 and Microsoft Windows.
  • : An open-source language.
  • : An application framework written in C++, used to write native software on numerous systems (Microsoft Windows, POSIX, macOS), with no change to the code.
  • Kivy: an open-source cross-platform UI framework written in Python. It supports Android, , , , Windows and .
  • : Cross-platform SDK libraries to integrate recognition, document, medical, imaging, and multimedia technologies into Windows, iOS, macOS, Android, Linux and web applications.
  • : a commercial cross-platform rapid application development language inspired by HyperTalk.
  • Lazarus: A programming environment for the FreePascal Compiler. It supports the creation of self-standing graphical and console applications and runs on Linux, MacOSX, iOS, Android, WinCE, Windows and WEB.
  • Max/MSP: A visual programming language that encapsulates platform-independent code with a platform-specific runtime environment into applications for macOS and Windows A cross-platform Android runtime. It allows unmodified Android apps to run natively on iOS and macOS
  • : a cloud-based low-code application development platform.
  • : an open-source model–view–controller design pattern where the model and controller are cross-platform but the view is platform-specific.
  • Mono: An open-source cross-platform version of Microsoft .NET (a framework for applications and programming languages)
  • : an open-source SDK for mobile platform app development in the C++ family.
  • Mozilla application framework: an open-source platform for building macOS, Windows and Linux applications.
  • A cross-platform JavaScript/TypeScript framework for Android and iOS development.
  • : a 3D graphics library.
  • Pixel Game Maker MV: A proprietary 2D game development software for Windows for developing Windows and games.
  • : a proprietary language and IDE for building macOS, Windows and Linux applications.
  • ReNative: The universal development SDK to build multi-platform projects with React Native. Includes latest iOS, tvOS, Android, Android TV, Web, Tizen TV, Tizen Watch, LG webOS, macOS/OSX, Windows, KaiOS, Firefox OS and Firefox TV platforms.
  • Qt: an application framework and for systems with X11, Microsoft Windows, macOS, and other systems—available under both proprietary and open-source licenses.
  • 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 multimedia library written in C that creates an abstraction over various platforms’ graphics, sound, and input APIs. It runs on OSs including Linux, Windows and macOS and is aimed at games and multimedia applications.
  • : a native app development tool to create mobile applications for Android and iOS, using design editor with JavaScript code editor.
  • Tcl/Tk
  • Titanium Mobile: open source cross-platform framework for Android and iOS development.
  • Ultimate++: a C++ 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.
  • Unity: Another cross-platform SDK which uses Unity Engine.
  • : Windows, macOS, iOS, Android, WebAssembly and Linux using C#.
  • : A cross-platform SDK which uses Unreal Engine.
  • : V-Play is a cross-platform development SDK based on the popular Qt framework. V-Play apps and games are created within Qt Creator.
  • : A low-code development tool to create responsive web and hybrid mobile (Android & iOS) applications.
  • : an Integrated Development Environment for Windows, Linux, .Net and Java, and web browers. Optimized for business and industrial applications.
  • : an open-source widget toolkit that is also an application framework. WxWidgets Description It runs on systems with X11, Microsoft Windows and macOS.
  • : a RAD IDE that uses an object-oriented programming language to create desktop, web and iOS apps. Xojo makes native, compiled desktop apps for macOS, Windows, Linux and Raspberry Pi. It creates compiled web apps that can be run as standalone servers or through CGI. And it recently added the ability to create native iOS apps.


Challenges
There are many challenges when developing cross-platform software.

  • 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 ' "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 the most advanced features of each platform.
  • Different platforms often have different user interface conventions, which cross-platform applications do not always accommodate. For example, applications developed for macOS and are supposed to place the most important button on the right-hand side of a window or dialog, whereas Microsoft Windows and have the opposite convention. Though many of these differences are subtle, a cross-platform application which does not conform to these conventions may feel clunky or alien to the user. When working quickly, such opposing conventions may even result in , such as in a confirming whether to save or discard changes.
  • Scripting languages and VM bytecode must be translated into native executable code each time they are used, imposing a performance penalty. This penalty can be alleviated using techniques like just-in-time compilation; but some computational overhead may be unavoidable.
  • Different platforms require the use of native package formats such as RPM and MSI. Multi-platform installers such as address this need.
  • Cross-platform execution environments may suffer cross-platform security flaws, creating a fertile environment for cross-platform malware.


See also
  • Cross-platform play
  • Hardware-agnostic
  • Software portability
  • List of video games that support cross-platform play
  • List of widget toolkits
  • Hardware virtualization
  • Java (software platform)
  • Binary-code compatibility
  • Comparison of user features of messaging platforms
  • Mobile development frameworks, many of which are cross-platform.

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs
1s Time