(2条消息) 向下兼容、向上兼容、向前兼容、向后兼容

摘要:

简要辨析向下兼容、向上兼容、向前兼容、向后兼容四个概念之间的关联与联系。简言之,向上兼容等同于作向前兼容,向下兼容等同于向后兼容。主流使用的是向前兼容和向后兼容。向后兼容中“后”指“落后”,站在新版本的立场讨论过去版本的兼容性问题。向前兼容中“前”指“前进”,表示未来的事情,站在旧版本的立场讨论未来版本的兼容性问题。

正文:

向后兼容(Backward compatibility)

        Backward compatibility is the capability of interoperating with older systems. In telecommunications and computing, a product or technology is backward or downward compatible if it can work with input generated by an older product or technology. If products designed for the new standard can receive, read, view or play older standards or formats, then the product is said to be backward-compatible; examples of such a standard include data formats and communication protocols. The reverse is forward compatibility, which implies that old devices allow data formats generated by new devices, perhaps without supporting all new features. A standard supports forward compatibility if older product versions can receive, read, view, or play the new standard. For example, the introduction of FM stereo transmission allowed backward compatibility since new FM radio receivers could receive monaural signals generated by old transmitters. It also allowed forward compatibility, since old monaural FM radio receivers could still receive a signal from a new transmitter. In programming languages, backward compatibility refers to the ability of a compiler for version N of the language to accept programs or data that worked under version N - 1. By this definition, if previous versions were also backward compatible, which is often the case, then, by induction, version N will also accept input that worked under any prior version after, and including, the latest one that was not backward compatible. However, in practice, features are often deprecated and support is dropped in a later release, which is yet thought of as backward compatible.
        Backward compatibility is important because it eliminates the need to start over when you upgrade to a newer product. A backward-compatible word processor, for instance, allows you to edit documents created with a previous version of the program. In general, manufacturers try to keep all their products backward compatible. Sometimes, however, it is necessary to sacrifice backward compatibility to take advantage of a new technology.
        The flip side of backward compatibility is upward compatibility. Upward compatible is the same as backward compatible, except that it is from the point of view of the older model.

向前兼容(Forward compatibility)

        Forward compatibility is the capability of interoperating with anticipated future systems. Forward compatibility aims at the ability of a design to gracefully accept input intended for later versions of itself. The concept can be applied to entire systems, electrical interfaces, telecommunication signals, data communication protocols, file formats, and computer programming languages. A standard supports forward compatibility if older product versions can receive, read, view, play or execute the new standard. The applicability of a forward compatible system with new versions requires not only the respecting of the older version by the designers of the newer version but additionally some agreement on future design features with the design freeze of current versions. The introduction of a forward compatible technology implies that old devices partly can understand data generated by new devices. 

forward compatibility and extensibility:

        Although the concepts of forward compatibility and extensibility are similar, they are not the same. A forward compatible design can accept data from a future version of itself and pick out the "known" part of the data. An example is a text-only word processor ignoring picture data from a future version. An extensible design is one that can be upgraded to fully handle the new data in the newer input format. An example is a text-only word processor that can be upgraded to handle picture data.
        Forward compatibility is a design principle in which a program or piece of hardware is developed to remain functional in the future with new software or devices. For example, a computer program is typically written in code that allows it to work with an Operating System (OS) and hardware that is current at the time of its release. A developer creating a program with forward compatibility in mind tries to ensure that it will also be able to function several years later with a new OS and different hardware. This can be quite difficult to ensure, however, though certain methods can be used to make the process simpler.

总结:

        向后兼容中“后”指“落后”,而不是“后来”,表示过去的事情,站在新版本的立场讨论过去版本的兼容性问题。向前兼容中“前”指“前进”,而不是“以前”,表示未来的事情,站在旧版本的立场讨论未来版本的兼容性问题。

微软网站对“向后兼容”和“向前兼容”的理解:

      (1)向后兼容。2007 Microsoft Office 系统向后兼容下列早期版本:Microsoft Office 2000、Microsoft Office XP 和 Microsoft Office 2003。这些版本的用户可以轻松地采用新的格式,并继续从现有文件中获得最大的益处。特别是他们还可以继续使用旧的 .doc、.xls 和 .ppt 二进制格式,这些格式与 2007 文件格式完全兼容。
      (2)向前兼容。应用程序的早期版本能够打开较新版本中的文件并忽略早期版本中未实现的功能。例如,Word 2003 向前兼容 Word 2007,因为它能够成功地使用转换器打开 Word 2007 文件。

向上兼容(Upward Compatible)

向上兼容(Upward Compatible),又称作向前兼容(Foreward Compatibility)。在计算机中指在较低档计算机上编写的程序,可以在同一系列的较高档计算机上运行,或者在某一平台的较低版本环境中编写的程序可以在较高版本的环境中运行,都称为向上兼容,前者是硬件兼容,而后者是软件兼容。例如,基于Intel386的PC兼容机上所有的软件也可以运行在486或更高的机型上。向上兼容具有非常重要的意义,一些大型软件的开发,工作量极大,如这些软件都能做到兼容,则无需在其它机器上重新开发,就可节省庞大的人力和物力。

向下兼容(Downward Compatible)

向下兼容(Downward Compatibility),又称作向后兼容(Backward Compatibility)。在计算机中指在一个程序或者类库更新到较新的版本后,旧的版本程序创建的文档或系统仍能被正常操作或使用,或在旧版本的类库的基础上开发的程序仍能正常编译运行的情况。例如较高档的计算机或较高版本的软件平台可以运行较为低档计算机或早期的软件平台所开发的程序,如基于Pentium微处理器的PC兼容机可以运行早期在486上运行的全部软件。向下兼容可以使用户在进行软件或硬件升级时,厂商不必为新设备或新平台从头开始编制应用程序,以前的程序在新的环境中任然有效。
对于软件来说,向下兼容的意思是,较高版本的程序能顺利处理较低版本程序的数据。拿著名的动画制作软件 Flash的两个版本 Flash 5(老版本)与 Flash MX 2004(新版本)来说,这两个版本虽然保存出来的文件都是 .fla,可是文件内容的结构有所不同。尽管如此,Flash MX 2004 仍然能处理 Flash 5 保存的 fla 文件,我们就说 Flash MX 2004 是向下兼容的。而Flash 5不能处理Flash MX 2004保存的fla文件,我们就说Flash 5不支持向上兼容。

西安电子科技大学的《计算机体系结构》的考题答案中给出兼容性的定义:
(1)向上(下)兼容指的是按某档机器编制的软件,不加修改就能运行于比它高(低)档的机器上。
(2)向前(后)兼容指的是按某个时期投入市场的该型号机器上编制的软件,不加修改就能运行于比它前(后)投入市场的机器上。

(0)

相关推荐