Swing为什么在较新的JavaSE版本中受支持,而JavaFX不受支持?

huangapple go评论80阅读模式
英文:

Why is Swing supported in newer JavaSE versions, but not JavaFX?

问题

我认为从我的角度来看,JavaFX比Swing更现代化且更好用。

我读了一篇关于JavaFX的未来的文档,作者是一位Oracle员工,其中有一句话是:

Oracle再次确认,Swing和AWT仍然是Oracle在所有Java SE版本和支持时间表上的核心Java SE技术。

为什么在较新的JavaSE版本中支持Swing,但不支持JavaFX?

英文:

I find JavaFX from my perspective more modern and better to use than Swing.

I read a document about the future of JavaFX written by an Oracle employee and came across a sentence:

> Oracle is reaffirming that Swing and AWT remain core Java SE
> technologies to Oracle across all Java SE releases and support
> timelines.

Why is Swing supported in newer JavaSE versions, but not JavaFX?

答案1

得分: 1

以下是翻译好的内容:

这是一个商业问题。

一个答案是,他们希望能够将JavaFX的发布周期与主要的Java SE发布周期分开。尽管事实证明,JavaFX正在遵循新的Java SE发布节奏。

第二个答案是,将它们分开可能会使项目治理更加简单。

但为什么选择JavaFX而不是Swing?

同样,出于商业原因:

  • JavaFX被认为比Swing更“特定”。因此,将其分离被认为更容易接受。

  • Swing(和AWT)是在旧项目中广泛使用的技术。而在这里,“旧”指的是已经存在超过20年的“成熟”/“传统”项目。将Swing分开可能会破坏更多旧项目。

    对于Oracle的商业模式来说,重大改变可能会“破坏”旧客户的代码或做法,这对付高额Java许可费用的企业客户来说是不利的,这些客户可能正在考虑转向一种“战略性”切换到其他语言。

  • Swing(和AWT)不在积极开发中,因此它们通常不会像JavaFX那样对主要的Java SE进度产生阻碍。

无论如何,这都是无关紧要的。分离JavaFX而不是Swing的决定是多年前做出的。这已经发生了,接受它吧。

英文:

That is a business question.

One answer is that they wanted to be able to separate the JavaFX release cycle from the main Java SE release cycle. Though as it turns out JavaFX is following the new Java SE release cadence.

A second answer is that separating them possibly makes project governance simpler.

> But why JavaFX and not Swing?

Again, business reasons:

  • JavaFX is perceived as more "niche" than Swing is. So splitting it out is perceived as more acceptable.

  • Swing (and AWT) are widely used technologies in old projects. And by old, I mean "mature" / "legacy" projects that have been around for over 20 years. Separating Swing is more likely to break more old projects.

    Major changes that "break" old customer code or practices are bad for Oracle's business model. They annoy corporate customers who pay substantial Java license fees, who might be considering a "strategic" switch to some other language.

  • Swing (and AWT) are not under active development, and hence they won't normally present such a drag on the main Java SE schedule as JavaFX may do.


Anyway, this is all moot. The decision to split out JavaFX and not Swing was made years ago. It happened. Live with it.

huangapple
  • 本文由 发表于 2020年7月30日 09:43:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/63164926.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定