Cross-Platform 1 Cross-Platform
Total Page:16
File Type:pdf, Size:1020Kb
Cross-platform 1 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] [2] 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. 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. 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: • AmigaOS (m68k), AmigaOS 4 (PowerPC), AROS (x86, PowerPC, m68k), MorphOS (PowerPC) • BSD, very cross platform (see NetBSD, for example) • Java • Linux (x86, x86-64, PowerPC, and other architectures) • Mac OS X (PowerPC, x86, x86-64) • Microsoft Windows (x86, x86-64) • MS-DOS and compatibles on the x86: MS-DOS, DR-DOS, FreeDOS, etc. • OS/2, eComStation • Solaris (SPARC, x86, x86-64) • The CLI, also known by the implementation names .NET Framework (from Microsoft) and Mono (from Novell) Cross-platform 2 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 [4]. 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 Cross-platform 3 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