Cross-platform

From Free net encyclopedia

Template:Confusing


A cross-platform (or platform independent) software application or hardware device works on multiple system platforms (e.g. Linux/Unix, Windows, and Mac OS X). This may mean supporting all common platforms, or simply more than one.

Software and firmware are dependent on the functionality that each platform provides, as well as the programming language that each platform supports. In the early days of software development, cross-platform development was hindered by the fact that the functionality and language availability varied greatly across platforms. Today, many programming languages (such as C) are universally supported by the most common system platforms. Moreover, developers can expect nearly all platforms to support a wide range of functionality, from disk and file access to graphical user interfaces (GUIs) and network services.

Developers must access these features using the platform's Application Programming Interfaces (APIs). Though some APIs (such as OpenGL or Berkeley sockets) are available on multiple platforms, many features are accessed using platform-specific frameworks (such as the Microsoft Foundation Classes). Cross-platform frameworks such as Java attempt to hide these platform-specific APIs by wrapping them in platform-neutral programming interfaces, allowing developers to create truly cross-platform software by building on top of these frameworks. However, not all of these frameworks are equally suited for building cross-platform software, since some frameworks may offer only partial support for certain features on some platforms.

Platform independent software

Software code not using any platform specific feature is inherently compatible across platforms. For example, the quicksort algorithm can be implemented without relying on special platform-dependent features.

Web applications

Web applications are normally considered cross-platform by definition, since they are interpreted by a web browser and do not use platform-specific features directly. Developing rich web applications often requires using advanced features such as Cascading Style Sheets and JavaScript. Many of these technologies have become Web standards, so theoretically any web application written to these standards will behave uniformly in any recent web browser, regardless of the underlying platform. Unfortunately, in practice web browsers often have incomplete or buggy implementations of these standards, and the same web browser may even behave slightly differently across platforms. These problems are often solved by writing browser- or platform-specific code, or by using non-standard APIs which future browsers may or may not support. Alternatively, they can be avoided by only using the features that all major browsers support.

Likewise, web applications may rely on content that not all browsers can render, such as Macromedia Flash presentations. These applications can be made cross-platform by including alternative content, such as images or MPEG-2 movies, that can be rendered as a placeholder.

Cross-platform web accessibility requires as much an understanding of users as of technical standards if a page is to be accessible on platforms as varied as screen readers, Braille-based web browsers, and small devices like mobile phones and PDAs.

A very good guide for coding web applications is SELFHTML.

Ordinary applications

Ordinary applications are the binary executables a user starts on his platform. These binaries of course run on a specific processor using the features of a certain OS system and handle all input/output through a platform specific GUI. So these binaries are in every respect platform specific. To create such binaries true cross-platform, a framework which takes care and hides of all these platform dependencies has to be used. A sample for a though out cross-platform framework is wxWidgets.

Cross-platform guidelines

It is not easy to code these binary executables cross-platform since there are many small and some complex differences between platforms which have to be carefully taken care of. Therefore for cross-platform development cross-platform guidelines are needed. A guide for well-designed cross-platform development is wyoGuide.

Disadvantages and problems with Cross-platform development

  • Special features of a OS/CPU cannot be used, a subset available on all systems must be utilized
    • Mostly slower than non-portable software, some features cannot be programmed
  • Depending on the task it can take more time for programming
  • Takes much more time for testing
  • All systems are needed for testingca:Multiplataforma

de:Plattformunabhängigkeit es:Multiplataforma eo:Multesistema eu:Plataforma-anitz fi:Alustariippumattomuus fr:Multi-plateforme it:Multipiattaforma nl:Multiplatform ru:Кроссплатформенное программное обеспечение zh:跨平台