kids encyclopedia robot

Cross-platform software facts for kids

Kids Encyclopedia Facts
About VirtualBox OSE
This image shows how Virtualbox can run different operating systems like Linux, macOS, and Microsoft Windows.

Imagine you have a favorite video game or a useful app. Wouldn't it be great if it could run on any computer or phone, no matter what kind it is? That's what cross-platform software is all about! It's computer software designed to work on many different types of computing systems.

Sometimes, cross-platform software needs a special version for each system. But other times, it can run directly on any system without extra work. This is often because it's written in a special language that can be understood by many systems. For example, an app might run on Linux, macOS, and Microsoft Windows. Some tools that help create cross-platform software include Qt, Flutter, and React Native.

What is a Platform?

A "platform" in computing can mean a few things. It might refer to the type of processor (like the brain of the computer) or other hardware. It can also mean the type of operating system (OS) that controls the computer. Or, it can be a mix of both!

For example, Android is a common platform that runs on a type of processor called ARM. Other well-known platforms are Linux, macOS, and Microsoft Windows. Software can be made to work with specific features of a platform, whether it's the hardware, the OS, or a virtual machine (VM). A Java platform is a good example of a VM platform that works on many OSs and hardware types.

Hardware Platforms

A hardware platform usually refers to the type of instructions a computer's processor understands. Think of it like a specific language the processor speaks. Examples include ARM or x86. Different operating systems can run on these hardware types.

Most smartphones and tablets use ARM processors. They often run Android or iOS, which are types of mobile operating systems.

Software Platforms

A software platform can be an operating system (OS) or a special environment for running programs. Often, it's a combination of both. A special case is Java, which uses a virtual machine (VM) that works on any OS to run its code.

Here are some common software platforms:

Java Platform

The Java language is usually turned into code that runs on a special program called the Java virtual machine (JVM). The JVM acts like a software-based processor that can run all Java code. This means that the same Java code can run on any system that has a JVM installed.

Java programs running in the JVM can use services from the operating system, like saving files or connecting to the internet. The JVM handles these tasks for the Java app. Java software can run on Microsoft Windows, macOS, many Unix-like OSs, and even on systems for small devices. For mobile apps, Android has built-in support for Java.

How Cross-Platform Software is Made

For software to be called cross-platform, it needs to work on more than one type of computer system or operating system. Making such software can take a lot of time because different operating systems have different ways for programs to talk to them (called Application Programming Interfaces, or APIs).

Just because software is written in a popular language like C or C++, it doesn't mean it will automatically run on all operating systems that support that language. It might not even run on different versions of the same OS!

Web Applications

Web applications are usually considered cross-platform because you can access them from almost any web browser. The web browser itself acts as the platform. Web applications often use a client–server model, where some work is done on your device (client) and some on a remote computer (server).

Simple web applications do most of their work on the server and send the results to your browser. Your interactions are simple requests and responses. These types of apps were common when the internet was newer. They are still used today, especially when being compatible with many systems and being simple are more important than having lots of fancy features.

More advanced web applications, like Gmail or Google Maps, use extra features found in newer web browsers. These features include Ajax, JavaScript, and Dynamic HTML.

Design Strategies

Because developers want both compatibility and cool features, many design methods have been created.

Many software systems use a layered design. This means that the parts of the code that depend on a specific platform are kept separate, usually in the very top or very bottom layers of the program.

Graceful Degradation

This idea tries to give similar features to all users and platforms. However, it might offer fewer features for older or more limited web browsers. For example, if you use an older browser to access Gmail, it might switch to a simpler mode with fewer features, but it will still work.

Single Codebase

This method uses one main set of code that can be changed to work on many different platforms. One way to do this is called conditional compilation. This means that code common to all platforms is used everywhere. But special blocks of code that only work for certain platforms are included only when needed. Another way is to turn off features that a browser or OS doesn't support, while still giving the user a complete app.

Third-Party Libraries

These are special tools or sets of code created by other companies. They try to make cross-platform development easier by handling the differences between clients. This means developers can use one simple way to talk to different platforms.

Responsive Web Design

Responsive web design (RWD) is a way to design websites so they look good and are easy to use on any device, from small phones to large computer screens. The layout changes automatically to fit the screen size. This method uses very little code specific to one platform.

Testing Strategies

Cross-platform applications need a lot more testing. This is because different platforms can act slightly differently or have small bugs. Sometimes, tools like full virtualization are used to help with testing. This lets developers run different versions of an app on the same computer.

Traditional Applications

Even though web applications are popular, many people still use traditional software that runs directly on their computer. The difference between web and traditional apps can sometimes be blurry, but it's still a useful way to think about them.

Binary Software

Traditional software is often given out as "binary files," which are ready-to-run programs. These programs usually only work on the platform they were made for. So, a single cross-platform program might be very large because it contains code for many different systems. Instead, developers usually create separate versions, each made for one platform.

For example, Firefox, a web browser, is available for Windows, macOS, Linux, and BSD. These are all separate programs, even though they come from mostly the same original code. Sometimes, code for several platforms is put into one file, called a fat binary.

Sometimes, programmers have to "port" the original code to a new platform. This means changing the code so it works on the new system. For example, Firefox, which already runs on Windows, can be changed and rebuilt to run on Linux.

An alternative to porting is "cross-platform virtualization." This allows programs made for one platform to run on another without changing the original code. For instance, Apple's Rosetta allowed older Mac apps to run on newer Macs with different processors.

An example of cross-platform binary software is the LibreOffice office suite. It works on Microsoft Windows, macOS, Linux, Android, iOS, ChromeOS, and many other systems. It also supports many different types of processors.

Scripts and Interpreted Languages

A "script" can be cross-platform if its special program (called an interpreter) is available on many platforms, and the script only uses basic features of its language. For example, a script written in Python for a Linux system will likely run on Windows with few changes, because Python also runs on Windows.

Unlike ready-to-run programs, the same script can be used on all computers that have the software to understand it. This is because scripts are usually stored as simple text files.

Some popular cross-platform scripting languages are:

  • Bash: Used on Linux and other similar systems, and also on Windows.
  • Perl: Used for web programming and system tasks.
  • PHP: Mostly used for web applications.
  • Python: A language that focuses on making it easy and fast to write programs.
  • Ruby: An object-oriented language that aims to be easy to read. It's used for web apps with Ruby on Rails.
  • Tcl: A flexible language for many uses, including web and desktop apps.

Video Games

The term cross-platform also applies to video games released on many different video game consoles. Examples include Minecraft, FIFA series, and NHL series. These games are available on systems like Wii, PlayStation 3, Xbox 360, personal computers, and mobile devices.

Some game systems are harder to develop for than others. This means it might take more time to make a game for them. So, a game might be released on a few systems first, and then later on others. This often happens when a new gaming system comes out, as game developers need time to learn how to work with it.

Sometimes, games are not cross-platform because of agreements between game developers and console makers. For example, a game might be released only on Sony's console for a certain time.

Cross-Platform Play

Some game developers have found ways for players to play games online together, even if they are using different systems. Companies like Psyonix, Epic Games, Microsoft, and Valve have technology that lets players on Xbox and PlayStation play with PC gamers. The first game to allow this was Quake 3.

Games that let you play online across different platforms include Rocket League, Final Fantasy XIV, Street Fighter V, and Minecraft (with its Better Together update).

Programming Cross-Platform Software

Cross-platform programming is the practice of purposely writing software so it works on more than one platform.

Approaches to Cross-Platform Programming

There are different ways to create a cross-platform application. One way is to make separate versions of the same software for each platform. For example, the Windows version might have one set of code files, and the Mac version another. This can be more expensive and lead to more bugs.

Another way is to use special software that hides the differences between platforms. This "abstraction layer" protects the application from needing to know the details of each platform. Applications that run on the Java Virtual Machine (JVM) are built this way.

Some applications mix different methods. For example, the Firefox web browser uses abstraction for some parts and separate code for platform-specific features, like its look.

Toolkits and Environments

Many tools help with cross-platform programming:

  • Flutter: A UI framework by Google for iOS, Android, Mac, and Windows.
  • GTK+: A toolkit for Unix-like systems and Microsoft Windows.
  • Kivy: A UI framework written in Python for Android, iOS, Linux, macOS, Windows, and Raspberry Pi.
  • Qt: A framework and toolkit for Unix-like systems, Microsoft Windows, and macOS.
  • Simple DirectMedia Layer: A library for graphics, sound, and input, used in games and multimedia apps.
  • Unity: A popular SDK for making games that run on many platforms.
  • Unreal: Another powerful SDK for creating cross-platform games.
  • wxWidgets: A toolkit and application framework that runs on Unix-like systems, Microsoft Windows, and macOS.
  • Xojo: An IDE that compiles apps for Windows, macOS, iOS, and Linux.

Challenges

Developing cross-platform software comes with challenges:

  • Testing: It can be much harder to test cross-platform apps because different systems might act slightly differently or have unique bugs.
  • Features: Developers might be limited to using only the features that are available on *all* platforms. This can stop them from using the most advanced features of a specific system.
  • User Interface: Different platforms have different ways their apps look and feel. Cross-platform apps don't always match these styles, which can make them feel strange to users.
  • Performance: Scripting languages and VM code need to be translated into native code each time they run. This can make them a bit slower, though modern techniques help reduce this.
  • Installation: Different platforms use different ways to package software for installation (like RPM for Linux or MSI for Windows). Special installers are needed to handle this.
  • Security: Cross-platform systems can sometimes have security weaknesses that allow malware to spread across many different types of computers.

See also

  • Operating context
  • List of widget toolkits
  • Hardware virtualization
  • Language binding
  • Source-to-source compiler
  • Binary-code compatibility
  • Comparison of user features of messaging platforms
kids search engine
Cross-platform software Facts for Kids. Kiddle Encyclopedia.