什么时候牺牲向后兼容性?

发布于 2024-09-26 10:00:05 字数 488 浏览 2 评论 0原文

基本上,我想知道在应用程序中是否存在这种行为,其中较新版本要求使用旧版本创建的内容(自动)转换为较新版本格式,但以向后兼容性为代价。

Visual Studio 对其 .sln 文件执行此操作。

这种做法有什么优点/缺点吗?

我想在我正在编写的应用程序(3D 内容创建)的背景下,我正在考虑寻找潜在的不同方法来及时创建事物(更快、更好、更高效),这可能只有在旧内容文件的情况下才能实现被转换为以看似相似的方式创建相同事物的新方法。

例如,也许 v1 有一个 Shape 类,在 v2 中,您意识到可以通过使用 更通用、更快地完成此操作PolySpline 类。但为了使旧的 Shapes 成为 PolySplines,您需要转换旧的内容文件,并且所有内容都将与新版本兼容。

这是一个合理的想法吗?

Basically I am wondering about having this behavior in an app where the newer versions require the content created with the older version to be (automatically) converted to the newer version format, at the cost of backwards compatibility.

Visual Studio does this for its .sln files.

Are there any pros/cons to this practice?

I guess in the context of the app I am writing (3d content creation), I was thinking of finding potentially different ways to create things in time (faster, better, more efficient) which might only be possible to implement if the older content files are converted to the new way of creating the same thing in a seeming similar way.

So for instance, maybe v1 had a Shape class where in v2 you realized you could do this more generically and faster by using a PolySpline class. But in order to have the old Shapes to be PolySplines you would convert the old content files and everything would be compatibile with the new version.

Is this a reasonable idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

强辩 2024-10-03 10:00:05

我没有看到提到的一个因素是,是否几乎所有共享数据的人都可能使用相同版本的应用程序。例如,如果诸如乐谱编辑程序之类的东西以早期版本无法读取的格式保存,这可能会非常烦人,因为希望交换乐谱的人很可能运行的不是相同版本的软件。另一方面,如果数据库仅由小商店内的用户访问,则计划仅对每个人进行同时升级并完成它。

A factor I haven't seen mentioned is whether nearly everyone who shares data will likely be using the same version of the application. It can be very annoying, for example, if a something like a sheet-music editing program saves in a format that is unreadable by earlier versions, since people who wish to exchange sheet music may very well not be running the same version of software. On the other hand, if a database will only be accessed by users within a small shop, plan on just doing a simultaneous upgrade of everyone and be done with it.

长伴 2024-10-03 10:00:05

除非您拥有庞大的安装基础和严厉的升级政策/成本(例如 Microsoft 的 Office),否则您应该不会遇到用户需要在旧版本软件上打开新版本文件的问题。换句话说,人们经常升级,但很少降级

您现在可以预见和考虑的一件事是创建(a)一些免费播放器,让拥有新格式文件和旧版本软件的用户看到这个新文件(并且可能决定升级)和(b)将转换的转换器模块较新的格式可能会删除一些不支持的功能/元素。

Unless you have a huge installation base and draconian upgrade policies/costs (like Microsoft with it's Office), you should have no problems with users needing to open new version files on older version of software. In other words, people frequently upgrade, but rarely downgrade.

One thing you can foresee and consider now is to create (a) some free player to let users that have new format file and old version of software see this new file (and maybe decide to upgrade) and (b) converter module that will convert newer format to older possibly dropping some unsupported features/elements.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文