Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Os Ramani
1. Evolution of the Java Client
Nandini Ramani
Community Leader OpenJFX
Co-Chair W3C SVG WG
Sun Microsystems., Inc.
2. Rich Integrated Internet Clients
Terminal Client/Server Web Rich Internet Integrated
Applications Applications Applications Applications Rich Clients
Local Services & Data
Richness / Interactivity
Client Client Integration
Client / Browser Applicability
Web as a Platform
Server Complexity Management
Security / Reliability
Management
Consolidation
TIME
2
3. In 2010 ...
• 3G Advanced Phone Devices surpass PCs as the dominant
connection to the Internet (Forrester 2006)
• Global Media and Entertainment Market reaches
$1.83 Trillion driven by online / digital revolution (PWC 2006)
• China will be the largest market for PCs (Forrester 2005)
• Digital Music Sales account for 40% of
Recording Industry (iSuppli 2006)
• 12% of the global handset population will be TV
capable with over 100 Million new Subscribers (iSuppli 2006)
• Content comes from ISVs and SPs, not operators' portals
• Nearly all applications “phone home” for updates
3
4. We've Done it Before...
JavaFX
...And We're Doing it Again
4
5. Designing for Content Authoring
The Big Picture
Home JavaFX
Devices Desktop
Content Authoring Tools
Entertainment Mobile
JavaFX Script
Interactive
Content
JavaFX
Framework
2D/3D
AGUI
PBP
SVG/MSA
CLDC CDC CDC SE
5
6. Before JavaFX
• Why does it take a long time to write GUI
programs?
• How can we avoid the “Ugly Java technology GUI”
stereotype?
• And how can I avoid having an enormous mass of
listener patterns?
• Gridbag anyone ?
6
7. What problem does it solve?
• How can we make GUI development more
efficient ?
• GUI development is a collaboration between
content designers, graphic artists, and programmers
• The main bottleneck in this process appears to be
us—the programmers—and not the content
designers or graphic artists
• But what exactly is making us inefficient?
7
8. The “Ugly” Java GUI
• Part of the problem is Swing
> AWT/Swing container/component hierarchy is a tree of rectangular
(mostly gray) boxes
> If all you do is compose Swing components together
– the result is typically the Ugly Java technology GUI
> Same problem exists with other toolkits, e.g., GTK, VB
• UI Designers and Swing programmers are using different building
blocks
> UI Designers compose designs in tools like Photoshop and
Illustrator
> The building blocks they use have direct analogs in Java 2D API,
but not necessarily in Swing
8
9. Java2D++
• To match the designs of UI designers requires using Java 2D API
• But Java 2D API doesn't have compositional behavior
> The barrier to entry for many Java code programmers is too high
(i.e., other than Romain Guy)
• In addition to Swing Components, JavaFX includes SVG-like
interfaces to Java 2D API as first-class elements which can be
composed together into higher-level components.
> JavaFX allows declarative expression of this composition
9
10. JavaFX Script
Programming Language for the Java platform
> Object-oriented
> Declarative Syntax
> Statically-typed + type-inference
> Automatic data binding
> Extensive Widget library encompassing Swing
> and Java 2D™ API
> Development tools including NetBeans™ and
Eclipse IDE plugins
10
11. JavaFX Script
• Procedural update language with Java-like control
structures and the update syntax (insert/delete) from
XQuery
• For UI designers convenience:
> Cryptic Java operators (!=, !, &&, ||, ?:) were replaced
with more well-known equivalents (<>, not, and, or,
if/then/else)
> Balance between having type declarations for readability
and having the option of omitting them without hurting
ability to understand the code
11
12. JavaFX Script – A Simple Comparison
In JavaFX Script In Java
Main guitar class
picks.opacity = [0, .01 .. 1 ] dur 1000 linear
guitarAnimationThread = new StringOpThread();
......
......
if (guitarAnimationThread != null) {
guitarAnimationThread.run();
}
In Java .........
(SwingLabs Timing Framework) StringOpThread class
...........
public void run() {
opacityBegin = 0.01;
public void class Guitar {
opacityEnd = 1.0;
private GuitarPick pick = ...;
opacityIncreStep = 0.02;
public Guitar() { opacitySleep = 2;
pick.setOpacity(.5f);
Animator a = for(currOpacity = opacityBegin;
PropertySetter.createAnimator( currOpacity < opacityEnd;
currOpacity+=opacityIncreStep) {
300, pick, quot;opacityquot;, .5f, 1.0f);
setPickOpacity();
MouseTrigger.addTrigger(pick, a,
repaint();
MouseTriggerEvent.ENTER, true);
try {
} thread.sleep(opacitySleep);
} } catch (InterruptedException e) { }
12
13. Data Binding in JavaFX
• Cause and Effect—Responding to change
• The JavaFX bind operator—Allows dynamic
content to be expressed declaratively
• Dependency-based evaluation of any
expression
• Automated by the system—Rather than
manually wired by the programmer
• You just declare dependencies and the
JavaFX runtime takes care of performing
updates when things change
• Eliminates listener patterns
13
14. Benefits of static-typing
• High-quality, compile-time error reporting
• High-quality IDE support
> Code-completion
> Searching
> Refactoring
• Efficient compilation
14
15. Consumer JRE
• Quickstarter: Radically reduce the startup time for Java applications
and applets.
• Java Kernel: Reduce the time-to-install-and-launch when the user
needs to install the JRE in order to run an application.
• Deployment Toolkit: Enable easy detection and installation of the
JRE.
• Installer Improvements: Improve the user experience of installation.
• Windows Graphics Performance: Enable default graphics
acceleration for simple and advanced 2D rendering.
• Nimbus Look & Feel : Release a new cross-platform look & feel
based on Synth.
• http://weblogs.java.net/blog/chet/archive/2007/05/consumer_jre_le.html
15
16. Java Plug-In
• Today
> Robust mechanism to support Java content in the browser
> Java <-> JavaScript Communication on all browsers
> Access to the DOM
– http://iris.dev.java.net/ : AJAX-like web app built with Java
> Easy to deploy 3D content as Applets
– JNLPAppletLauncher: http://applet-launcher.dev.java.net
• Tomorrow
> Will enable deployment of more sophisticated Applets
> Control over heap size and low-level JVM command line
arguments
> Unification between Java Web Start and Java Plug-In
– Using JNLP as standard deployment mechanism
16
17. Summary
JavaFX is a family of products and technologies
•
JavaFX Compiler development on openjfx.org
•
JavaFX Script simplifies GUI programming
•
More coming, watch this space
•
Ease of deployment
>
Consumer, modular JRE
>
JavaFX Mobile
>
JavaFX Tools
>
17
18. Further Information
http://openjfx.org
http://www.sun.com/javafx
http://blogs.sun.com/chrisoliver
http://blogs.sun.com/brewin
http://iris.dev.java.net
http://weblogs.java.net/blog/chet
http://jfx.wikia.com
18