Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Cross-platform software
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Implementation <span class="anchor" id="Implementations"></span> == 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 [[API|application programming interfaces]] (API). Software written for one OS may not automatically work on all architectures that OS supports. Just because software is written in a popular [[programming language]] such as [[C (programming language)|C]] or [[C++14|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=== [[Web application]]s are typically described as cross-platform because, ideally, they are accessible from any [[web browser]]: 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 [[stateless 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. This type of application was the norm in the early phases of [[World Wide Web]] application development. Such applications follow a simple [[Transaction processing|transaction]] model, identical to that of serving [[static web page]]s. 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 [[Gmail]] and [[Google Maps]]. Such applications routinely depend on additional features found only in the more recent versions of popular web browsers. These features include [[Ajax (programming)|Ajax]], [[JavaScript]], [[Dynamic HTML]], [[SVG]], and other components of [[rich web applications]]. ==== Design <span class="anchor" id="Design strategies"></span> ==== 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 [[interpreter (computer science)|interpreted]] or [[compiler|compiled]] 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.<ref>{{cite journal|last=Corti|first=Sascha P.|title=Browser and Feature Detection|journal=MSDN Magazine|date=October 2011|url=http://msdn.microsoft.com/en-us/magazine/hh475813.aspx|access-date=28 January 2014}}</ref> =====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 [[vendor lock-in]]. =====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 <span class="anchor" id="Testing strategies"></span>==== 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.<ref>{{Cite book|last=Choudhary|first=S.R.|title=Companion Proceedings of the 36th International Conference on Software Engineering |chapter=Cross-platform testing and maintenance of web and mobile applications |date=2014|pages=642–645|doi=10.1145/2591062.2591097|isbn=9781450327688|s2cid=1903037|hdl=1853/53588|hdl-access=free |url=https://repository.gatech.edu/server/api/core/bitstreams/c283fd1a-551d-4b0e-a7da-7add80df2328/content }}</ref> 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 [[executable file]]s. Executables only support the 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 [[software build]] for each platform, using a toolset that translates—transcompiles—a single codebase into multiple binary executables. For example, [[Firefox]], an open-source web browser, is available on Windows, macOS (both [[PowerPC]] and x86 through what [[Apple Inc.]] calls a [[Universal binary]]), 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 [[source code]]. In rare cases, executable code built for several platforms is combined into a single executable file called a [[fat binary]]. The use of different toolsets may not be enough to build a working executables for different platforms. In this case, programmers must ''[[porting|port]]'' 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 (software)|Rosetta]], which is built into [[Intel]]-based Macintosh computers, runs applications compiled for the previous generation of Macs that used PowerPC CPUs. Another example is IBM [[Lx86|PowerVM Lx86]], which allows Linux/x86 applications to run unmodified on the Linux/Power OS. Example of cross-platform binary software: * The [[LibreOffice]] office suite is built for Microsoft Windows, macOS, Linux, [[FreeBSD]], [[NetBSD]], [[OpenBSD]], [[Android (operating system)|Android]], [[iOS]], [[iPadOS]], [[ChromeOS]], web-based [[Collabora Online]] and many others.<ref>{{Cite news|last=Mehrotra|first=Pranob|date=2020-12-01|title=Collabora Office suite gets a new layout for Android tablets and Chromebooks|work=XDA-Developers|url=https://www.xda-developers.com/collabora-office-suite-gets-layout-android-tablets-chromebooks/|access-date=2021-01-15|quote=Collabora Office is a popular open-source alternative to the Microsoft Office suite. It's based on LibreOffice, and it's available on a variety of platforms, including Windows, Linux, iOS, and Android. This year in July, a major update for the office suite brought support for Chrome OS devices.}}</ref><ref name=":1">{{Cite news|last=|first=|date=2020-12-15|title=Collabora Office on iOS and Android Just got Better!|work=Adfinis|url=https://adfinis.com/en/blog/collabora-office-on-ios-and-android-just-got-better/|access-date=2021-01-15|quote=...touch optimized interfaces: one for tablets and one for phone screens. ...(iOS, iPadOS, Chromebooks, Android).}}</ref> Many of these are supported on several hardware platforms with processor architectures including [[IA-32]], [[x86-64]], [[ARM architecture family|ARM]] (ARMel, ARMhf, ARM64), [[MIPS architecture processors|MIPS]], [[Mipsel|MIPSel]], [[PowerPC]], [[Ppc64|ppc64le]], and S390x[9]<ref>{{Cite news|date=2021-03-26|title=Nextcloud Ubuntu Appliance adds Collabora Online to Raspberry Pi image|work=MuyLinux|url=https://www.muylinux.com/2021/03/26/nextcloud-ubuntu-appliance-collabora-online-raspberry-pi/|access-date=2021-03-30|quote=the first viable self-hosted web office solution for the popular Raspberry Pi 4 platform}}</ref> ====Scripts and interpreted languages==== A script can be considered to be cross-platform if its [[Interpreter (computing)|interpreter]] is available on multiple platforms and the script only uses the facilities built into the language. For example, a script written in [[Python (programming language)|Python]] for a [[Unix-like]] system will likely run with little or no modification on Windows, because Python also runs on Windows; indeed there are many implementations (e.g. [[IronPython]] for [[.NET Framework]]). The same goes for many of the [[open-source software|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 [[plain text]] in a [[text file]]. There may be some trivial issues, such as the representation of a [[newline|new line character]]. Some popular cross-platform scripting languages are: * [[Bash (Unix shell)|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, [[Git]] for Windows, or the [[Windows Subsystem for Linux]]. * [[Perl]] – First released in 1987. Used for [[Common Gateway Interface|CGI]] programming, small [[system administration]] tasks, and more. * [[PHP]] – Mostly used for web applications. * [[Python (programming language)|Python]] – A language which focuses on [[rapid application development]] and ease of writing, instead of run-time efficiency. * [[Ruby (programming language)|Ruby]] – An object-oriented language which aims to be 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 or multi-platform is a term that can also apply to [[video game]]s released on a range of [[video game console]]s. Examples of cross-platform games include: ''[[Miner 2049er]]'', ''[[Tomb Raider: Legend]]'', ''[[FIFA (video game series)|FIFA series]]'', ''[[NHL series]]'' and ''[[Minecraft]]''. Each has been released across a variety of gaming platforms, such as the [[Wii]], [[PlayStation 3]], [[Xbox 360]], [[personal computer]]s, and [[mobile devices]]. Some platforms are harder to write for than others, requiring more time to develop the video game to the same standard. 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 developer]]s 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, [[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, it may be required to release the game solely on Sony's console for a short time [[Console exclusivity|or indefinitely]]. ====Cross-platform play==== {{Main|Cross-platform play|List of video games that support cross-platform play}} Several developers have implemented ways to play games online while using different platforms. [[Psyonix]], [[Epic Games]], [[Microsoft]], and [[Valve Corporation|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 (Dreamcast with specially produced keyboard and mouse) was ''[[Quake 3]]''.<ref>Cribba. [https://www.giantbomb.com/quake-iii-arena/3030-3874/ Quake III Arena], ''Giant Bombcast'', February 15, 2013.</ref><ref>[http://www.thedreamcastjunkyard.co.uk/2017/08/a-closer-look-at-dreamcast-internet.html A Closer Look At The Dreamcast Internet Starter Kit]</ref> Games that feature cross-platform [[online play]] include ''[[Rocket League]]'', ''[[Final Fantasy XIV: A Realm Reborn|Final Fantasy XIV]]'', ''[[Street Fighter V]]'', ''[[Killer Instinct (2013 video game)|Killer Instinct]]'', ''[[Paragon (video game)|Paragon]]'' and ''[[Fable Fortune]],'' and ''[[Minecraft]]'' with its Better Together update on [[Windows 10]], VR editions, [[Minecraft - Pocket Edition|Pocket Edition]] and [[Xbox One]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)