JavaFX FAQ
Contents
- What is JavaFX?
- What is being announced at the 2007 JavaOne Conference around JavaFX?
- How does JavaFX compare with other tools for creating rich internet applications (RIAs)?
- Will there be other products in the JavaFX family?
- Where can I obtain JavaFX or more information?
- Tell me more about JavaFX Script.
- Why is the JavaFX Script name so long?
- Why did you create another scripting language?
- Will JavaFX Script be open sourced?
- Can I contribute to JavaFX Script?
- Will development tools support JavaFX Script?
- Why do I need the JavaFX Script language? Isn't Swing good enough?
- Why isn't Groovy enough?
- What about performance? Isn't using a scripting language going to be a problem?
- Is JavaFX Script only for simple GUIs?
- Will JavaFX applications run on Java on the desktop?
- Will JavaFX applications run on JavaFX Mobile?
What is JavaFX?
JavaFX is a new family of Sun products based on Java technology and targeted at the high impact, rich content market.
What is being announced at the 2007 JavaOne Conference around JavaFX?
At the Conference, Sun Microsystems is announcing two products in the JavaFX family: JavaFX Script and JavaFX Mobile. JavaFX Script is a a highly productive scripting language for content developers to create rich media and content for deployment on Java technology. JavaFX Mobile is a complete mobile operating and application environment built around Java and Linux open source technologies.
How does JavaFX Script compare with other tools for creating rich internet applications (RIAs)?
Today's Internet offers a world of possibility for those who can quickly develop and deploy rich internet applications (RIAs). But only the Java platform is pervasive enough on mobile devices and browsers to effectively marry client- and browser-based technologies with RIAs enabling applications to run on multiple platforms virtually unchanged. JavaFX is Sun's new product family that addresses this market. JavaFX Script will enable developers to more quickly and easily develop RIAs and next-generation services that can be proliferated across virtually any device -- from desktop browsers and mobile devices, to set-top boxes and Blu-ray Discs -- securely and without local installation. JavaFX Mobile software makes these type of applications a reality for the mobile world.
Will there be other products in the JavaFX family?
Sun is planning several products in this family. More details will follow as they become available.![]()
Where can I obtain JavaFX Script or more information?
More information on JavaFX Script is available at www.sun.com/javafx. The alpha code that Sun is demoing at the JavaOne Conference is available at Project OpenJFX (openjfx.dev.java.net). Sun will be expanding this scripting language and is inviting developers to join the OpenJFX community and participate with their feedback.
Tell me more about JavaFX Script.
JavaFX Script is a highly productive scripting language that enables content developers to create rich media and content for deployment on Java environments.
JavaFX Script is a declarative, statically typed programming language. It has First-class functions, declarative syntax, list-comprehensions, and incremental dependency-based evaluation. It can make direct calls to JavaAPIs that are on the platform. Since JavaFX Script is statically typed, it has the same code structuring, reuse, and encapsulation features (such as packages, classes, inheritance, and separate compilation and deployment units) that make it possible to create and maintain very large programs using Java technology.
Why is the JavaFX Script name so long?
Although the official name of the scripting language is JavaFX Script, we expect many programmers to just call it JavaFX as it is the core of the JavaFX family.
Why did you create another scripting language?
JavaFX Script is specifically designed to optimize the creative process of building rich and compelling UIs leveraging Java Swing, Java 2D and Java 3D for developers and content authors.![]()
Will JavaFX be open sourced?
Yes, JavaFX Script will be open sourced. The governance, licensing, and community models will be worked out as product release draws closer.
Can I contribute to JavaFX?
Absolutely. Join the OpenJFX community on Java.net. Currently, Sun is looking for your feedback and the directions in which you would like to see JavaFX Script evolve. Once the basic prototype phase is completed, Sun will provide additional details on how you can contribute to the technology itself.
Will development tools support JavaFX Script?
JavaFX Script will initially work with the NetBeans IDE, but it is expected to work with other IDEs as well.
Why do I need the JavaFX Script? Isn't Swing good enough?
There's nothing wrong with Swing. Swing is one of the best GUI development toolkits of its kind. Swing makes it very easy to create standard GUI components, buttons, listboxes, trees, and tables. Together with Java 2D, Swing makes it easy to customize existing components or to create new custom components to achieve virtually any desired visual effect. Sun is not replacing Swing with JavaFX; instead, JavaFX Script makes Swing much easier to use.
With the new JavaFX Script language, the structure of the programmer's code closely matches the actual layout of the GUI, making it tangibly easier to understand and maintain.
Why isn't Groovy enough?
Groovy and other languages have two specific traits which don't precisely meet these needs, namely that they are generic in nature and don't provide the appropriate abstractions necessary to optimize the UI design process and similarly are designed specifically for programmers other than content authors.
What about performance? Isn't using a scripting language going to be a problem?
Performance is obviously an important issue. The architecture of JavaFX Script is meant to be highly performant. For example, the GUI components and back-end application objects are implemented in Java; JavaFX Script code is used only to create such components, configure them, and wire them together.
In addition, since the JavaFX Script implementation handles event generation and dispatching, it can be optimized and all Swing applications built with JavaFX Script will benefit. Without JavaFX Script, programmers must effectively handcraft their own incremental evaluator for each new application -- adding property change listeners to and firing events from Java Beans, adding listeners to GUI components, and then determining what events need to fired and/or handled by each bean or component. These steps tend to be very error prone and difficult for programmers to optimize.
Is JavaFX Script only for simple GUIs?
Although JavaFX Script makes it very easy to create simple GUIs, it is designed to be capable of supporting GUIs of any size or complexity. Unlike many other Java scripting languages, JavaFX Script is statically typed and has the same code structuring, reuse, and encapsulation features (such as packages, classes, inheritance, and separate compilation and deployment units) that make it possible to create and maintain very large programs in Java. In addition, JavaFX Script is intended to have the same level of IDE/tool support that Swing programmers are familiar with in Java: an editor with code completion, refactoring, a Javadoc-like documentation tool, a source-level debugger, a profiler, and ultimately a visual builder.![]()
Will JavaFX Script applications run on Java on the desktop?
JavaFX Script applications run on the Java Runtime Enviroment (JRE) on the desktop.
Will JavaFX Script applications run on JavaFX Mobile?
Yes, that is why JavaFX Mobile is being announced simultaneously.
内容
- 什么是JavaFX?
- 在2007年JavaOne大会上SUN发表了哪些关于JavaFX的产品?
- 如何把JavaFX和其它能够创建富浏览器应用(RIAs)的工具做比较?
- 在JavaFX家族中将出现哪些其它产品?
- 我从哪里能够获取更多关于JavaFX的信息?
- 告诉我更多关于JavaFX脚本的事。
- 为什么JavaFX脚本这个名字这么长?
- 为什么你还要创建其它的脚本语言?
- JavaFX脚本将开源吗?
- 我能为JavaFX脚本做捐献?
- 开发工具支持JavaFX脚本吗?
- 为什么我需要JavaFX脚本语言?难道Swing不够好吗?
- 为什么Groovy不够用?
- JavaFX性能如何?使用脚本语言不会成为影响性能的问题吗?
- JavaFX脚本是不是只能用于简单的GUI?
- JavaFX应用能运行在桌面级的Java环境下吗?
- JavaFX应用能运行在JavaFX Mobile环境下吗?
什么是JavaFX?
JavaFX是一种全新的、基于Java技术、力求高效、定位于富内容市场的Sun产品。
在2007年JavaOne大会上SUN发表了哪些关于JavaFX的产品?
在JavaOne2007大会上, Sun宣布了JavaFX家族中的两个产品:JavaFX脚本和JavaFX Mobile。JavaFX脚本是一种高生产力的脚本语言,它能够使内容开发媒体并在Java环境中完成内容部署者建立富。JavaFX Mobile是一个围绕着Java和Linux开源技术的、完整的移动操作和应用环境。
如何把JavaFX和其它能够创建富浏览器应用(RIAs)的工具做比较?
今天的Internet为那些能够快速开发、部署富Internet应用(RIAs)的开发商提供了无限可能的世界。但只有Java平台称得上在移动设备 和浏览器领域非常流行,将使用RIAs的、基于浏览器的技术能够使应用无需实际改变就能应用在多种平台。JavaFX便是Sun定位于此市场的全新产品 族。JavaFX脚本将是开发者更快速、轻松地开发RIAs和下一代能够被扩展到跨越任何设备的服务,从桌面浏览器到移动设备、机顶盒、Blu-ray光 盘--安全而且无需本地安装。JavaFX Mobile软件使多种类型的应用在移动世界中成为了现实。
在JavaFX家族中将出现哪些其它产品?
Sun正在计划JavaFX家族的其他产品,我们会随时更新有关消息。![]()
我从哪里能够获取更多关于JavaFX的信息?
可以从www.sun.com/javafx站点获取更多关于JavaFX的消息。在JavaOne大会上演示的alpha代码已经可以从OpenJFX 项目站点(openjfx.dev.java.net)上下载。Sun正准备扩充这个脚本语言,邀请开发者加入OpenJFX社区,并通过提交反馈的方式 参与到开发过程中来。
告诉我更多关于JavaFX脚本的事.
JavaFX脚本是一种高生产力的脚本语言,它能使开发者创建富媒体并在Java环境中进行内容部署。
作 为一种声明式、静态类型编程语言,它具有第一级函数、声明式语法、列表推导和基于依赖关系的增量式求值等特性,并能够直接调用平台上的Java API。由于JavaFX脚本是静态类型的,因此它具有相同的代码结构、重用、封装特性(例如package、类、继承、分离编译、部署单元),这使其能 够用于创建和维护大型Java程序。
为什么JavaFX脚本这个名字这么长?
尽管这个脚本语言的官方名称为JavaFX脚本,而我们还是希望广大开发者称之为JavaFX,因为它是JavaFX家族的核心部分。
为什么你还要创建其它的脚本语言?
JavaFX脚本是专门为开发者设计用以优化创建富内容和集JavaSwing、Java2D和Java3D于一身的UI的过程。![]()
JavaFX脚本将开源吗?
是的,JavaFx脚本即将开放源代码。管理(governance)、授权和社区模式将随着项目发展而被逐步推出。
我能为JavaFX脚本做捐献?
绝对可以,加入在Java.net上的OpenJFX社区吧。目前,Sun正在寻找你的反馈和你所希望的JavaFX脚本发展的方向。只要基本原型阶段完成,Sun将提供给你如何为技术本身做贡献的附加说明。
开发工具支持JavaFX脚本吗?
JavaFX脚本最初和NetBeans IDE一起使用,但我们也期待得到其它IDE的支持。
为什么我需要JavaFX脚本语言?难道Swing不够好吗?
使 用Swing并没有错。Swing是最好的GUI开发工具之一。它使创建标准化的GUI组件(按钮、下拉列表、树形、表格等)变得十分容易。和 Java2D集合在一起,Swing还能够轻松地自定义现有组件或者创建自定义的全新组件来实现实际所需的可视化效果。Sun并没有使用JavaFX代替 Swing;正相反,JavaFX脚本使Swing变得更加易用。
通过使用新的JavaFX脚本语言,开发者的代码结构更接近于实际的GUI布局,这使其更易于理解和操作。
为什么Groovy不够用?
Groovy和其它语言具有两个不能精确地满足需求的特性,首先它们是天然类属的、不能提供适当的抽象来优化UI设计过程,同时它们是为程序员而设计的,而并非内容编写者。
JavaFX性能如何?使用脚本语言不会成为影响性能的问题吗?
性能是一个非常显的重大问题。JavaFX脚本框架正是为高性能而设计的。例如,GUI组件和后端的应用对象是在Java中实现的;JavaFX脚本代码只能够创建这样的组件、配置它们并将它们相互捆绑在一起。
另外,由于JavaFX脚本实现处理了事件的生成和调度,因此它能够被优化并且使所有使用JavaFX脚本的Swing应用都受益。离开了JavaFX脚 本,程序员必须为每个新应用手工打造他们自己的递增式求值程序;为JavaBean增加属性改变侦听器、触发JavaBean事件,为GUI组件增加侦听 器,而后判断哪些事件需要触发、哪些事件需要被bean或者组件处理。
JavaFX脚本是不是只能用于简单的GUI?
尽 管JavaFX脚本使其易于创建简单的GUI,但它是被设计用于支持任意尺寸或者复杂度的GUI的。不像其它的Java脚本语言,JavaFX脚本是静态 类型的、并且具有相同的代码结构、重用、封装特性(例如package、类、继承、分离编译、部署单元),这使其能够用于创建和维护大型Java程序。另 外,JavaFX脚本具备Swing程序员非常熟悉的在IDE/工具层面上的支持:它具有带有代码自动完成、重构、类似JavaDoc的文档化工具、源代 码级的调试器、优化器,总之它是一个可视化builder。![]()
JavaFX应用能运行在桌面级的Java环境下吗?
JavaFX脚本能够应用运行在桌面级的JRE下。
JavaFX应用能运行在JavaFX Mobile环境下吗?
当然,这正是为什么JavaFX Mobile被同时发布的原因。