SlideShare ist ein Scribd-Unternehmen logo
1 von 49
Downloaden Sie, um offline zu lesen
JavaFX: la piattaforma
Java per le Rich Internet
Applications

Corrado De Bari
Software & Java Ambassador

Sun Microsystems Italia Spa
Agenda
●   What's news in Java Runtime Environment
●   JavaFX Technology
    –   Key Features
    –   Architecture & Tools
    –   JavaFX Script tutorial




                        Sun Microsystems Proprietary
                  TechDay 09 – UniParthenope, 4 giugno 2009   2
New Features in 6u10
●   JavaKernel: faster download and install
●   Java Quick Starter: faster applet start
●   Rewritten Java Plugin
     –   Applets run in own JVM
     –   Unified desktop / browser deployment
     –   Draggable Applet
     –   Scriptable applets
     –   Direct3D© support



                                     Try: http://download.java.net/javadesktop/plugin2/wwj/

                             Sun Microsystems Proprietary
                       TechDay 09 – UniParthenope, 4 giugno 2009
Architectural Overview


                                             Applet 1


                                             Applet 2


    HTML Web Page                            Applet 3




                   Sun Microsystems Proprietary
             TechDay 09 – UniParthenope, 4 giugno 2009   4
Architectural Overview

 ●   Ground-up rewrite of the support for applets in the web browser
 ●   Applets are no longer executed in a Java Virtual Machine (JVM™) inside the
     web browser
 ●   Instead, a separate JVM machine process is launched to execute the applets
 ●   By default, only one JVM machine is launched
      –   Same resource consumption and sharing properties as the “classic”
          Java technology-based Plug-In
 ●   Opportunity to launch more than one JVM machine
      –   To support per-applet command-line arguments, heap size requests, and
          more
 ●   Architectural similarities to Java Web Start software, but tighter browser
     integration


                              Sun Microsystems Proprietary
                        TechDay 09 – UniParthenope, 4 giugno 2009
Architectural Overview




                                          Client JVM 1
                                                  OS Process 2
      Thin Server JVM


       OS Process 1
                                        Client JVM 2
                                                 OS Process 3
                   Sun Microsystems Proprietary
             TechDay 09 – UniParthenope, 4 giugno 2009           6
Compatibility
●   Backward compatibility based on runs of hundreds of
    applets from throughout the web
●   Applet lifecycle unchanged
     –   init(), start(), stop(), destroy()
●   All services supported:
     Browser proxy settings                   Browser certificate store
     Browser authenticator                    Browser cookie store
     Printing
     Java/JavaScript integration

                            Sun Microsystems Proprietary
                      TechDay 09 – UniParthenope, 4 giugno 2009           7
JNLP Support
Most significant new feature
●   Unifies deployment between Java Web Start and the
    Java Plug-In
     –   Simply choose the top-level container (Frame /
         Applet)
●   Incorporate JNLP extensions trivially in applets
     –   JavaFX run-time libraries, JOGL, Java 3D, JAI
●   Use JNLP APIs from applets
     –   PersistenceService, DownloadService, ...
●   Full support for JVM command-line arguments, JRE
    version selection, JRE auto-download
                          Sun Microsystems Proprietary
                    TechDay 09 – UniParthenope, 4 giugno 2009   8
Basic JNLP Example


 <applet width=”500” height=”500”>
   <param name=”jnlp_href”
 value=”my_applet.jnlp”>
 </applet>




                 Sun Microsystems Proprietary
           TechDay 09 – UniParthenope, 4 giugno 2009
Basic JNLP Example
 <?xml version=”1.0” encoding=”UTF-8”?>
 <jnlp href=”my_applet.jnlp”>
  <information>
    <title=”My Applet”>
    <vendor>My Company, Inc.</vendor>
    <offline-allowed />
  </information>
  <resources>
    <j2se version=”1.4+”
           href=”http://java.sun.com/products/autodl/j2se” />
    <jar href=”my_jar_1.jar” main=”true” />
    <jar href=”my_jar_2.jar” />
  </resources>
  <applet-desc name=”My Applet”
                 main-class=”com.mycompany.MyApplet”
                 width=”1”
                 height=”1” />
 </jnlp>
                            Sun Microsystems Proprietary
                      TechDay 09 – UniParthenope, 4 giugno 2009
Applet-Desc Tag
 <?xml version=”1.0” encoding=”UTF-8”?>
 <jnlp href=”my_applet.jnlp”>
  <information>
    <title=”My Applet”>
    <vendor>My Company, Inc.</vendor>
    <offline-allowed />
  </information>
  <resources>
    <j2se version=”1.4+”
           href=”http://java.sun.com/products/autodl/j2se” />
    <jar href=”my_jar_1.jar” main=”true” />
    <jar href=”my_jar_2.jar” />
  </resources>
  <applet-desc name=”My Applet”
                 main-class=”com.mycompany.MyApplet”
                 width=”1”
                 height=”1” />
 </jnlp>
                            Sun Microsystems Proprietary
                      TechDay 09 – UniParthenope, 4 giugno 2009
Applet-Desc Tag

●   width and height are ignored
    –   Browser always overrides because it knows best how
        big the applet needs to be
    –   Relative width and height supported in applet tag (i.e.,
        “50%”)
●   main-class parameter always used
    –   code parameter from applet tag is ignored
    –   Enables backward compatibility mechanisms
        (described later)

                          Sun Microsystems Proprietary
                    TechDay 09 – UniParthenope, 4 giugno 2009
Java / JavaScript Support
●   Completely rewritten Java / JavaScript integration
●   More complete, reliable and portable than before
●   Formerly Mozilla-specific functionality now working in
    Internet Explorer
     –   Static method access
     –   Construction of new Java objects from JavaScript
●
    Respecifying and reintroducing “LiveConnect”




                         Sun Microsystems Proprietary
                   TechDay 09 – UniParthenope, 4 giugno 2009   13
DOM Access
Enables AJAX-style web apps using Java language
●   DOM access via W3C APIs has been rewritten
     –   Built on top of new Java/JavaScript support
●   New, much simpler bootstrapping entry point
      org.w3c.dom.Document doc =
               com.sun.java.browser.plugin2.DOM.
               getDocument(applet);
●   Can then cast to HTMLDocument and descend into the DOM
●   Perform operations from any thread
     –   Underlying Java/JavaScript bridge is thread safe
                          Sun Microsystems Proprietary
                    TechDay 09 – UniParthenope, 4 giugno 2009   14
Support for Advanced Applets
●   Control over Java heap size
●   Control over Java 2D acceleration parameters
●   Ideal environment for running 3D content
●   JOGL applet examples
    –   NASA World Wind Java:
         ●   http://download.java.net/javadesktop/plugin2/wwj/
    –   Jake2 – Bytonic Software:
         ●   http://www.bytonic.de/downloads/jake2_jogl11.jnlp



                              Sun Microsystems Proprietary
                        TechDay 09 – UniParthenope, 4 giugno 2009   15
JavaFX
    JavaFX is THE platform for creating and
                    delivering
          Rich Internet Applications
       across all the screens of your life




    JavaFX is Powered by Java
                 Sun Microsystems Proprietary
           TechDay 09 – UniParthenope, 4 giugno 2009
Key Features
✔   One-stop shop RIA platform for all screens:
    ✔   Build engaging visual experiences across desktop,
        browser and mobile with a unified development and
        deployment model.
✔   Broadest market reach:
    ✔   Distribute RIAs easily across billions of devices with the
        power of Java.
✔   Designer-developer workflow:
    ✔   Dramatically shorten your production cycle for design
        and development.

                           Sun Microsystems Proprietary
                     TechDay 09 – UniParthenope, 4 giugno 2009
Key Features (Continued)
✔   Powerful runtime:
    ✔   Leverage the extreme ubiquity, power, performance
        and security of the Java runtime.
✔   Break free from the browser:
    ✔   Drag-and drop a JavaFX application from the browser
        to deploy to the desktop.
✔   Java technology compatibility:
    ✔   Preserve your investment by enabling the use of any
        Java library within a JavaFX application.


                           Sun Microsystems Proprietary
                     TechDay 09 – UniParthenope, 4 giugno 2009
What you can do: Simple Video Player
•Incorporating video in your application is as simple
as creating an instance of this component, setting a
few variables and including a link to your video
source.




                     Sun Microsystems Proprietary
               TechDay 09 – UniParthenope, 4 giugno 2009
3-D Display Shelf: the Perspective
Transform

•The PerspectiveTransform built into JavaFX
can be used to easily create 3-D effects




                   Sun Microsystems Proprietary
             TechDay 09 – UniParthenope, 4 giugno 2009
Flying Saucer

•The new out-of-process Java applet plugin
in Java SE 6 update 10 enables you to make
applets which can run outside of the browser.




                   Sun Microsystems Proprietary
             TechDay 09 – UniParthenope, 4 giugno 2009
Demo: JavaFX apps




http://www.javafx.com/samples/EffectsPlayground/webstart/EffectsPlayground.jnlp
http://www.javafx.com/samples/DraggableMP3Player/webstart/DraggableMP3Player.jnlp
http://www.javafx.com/samples/BrickBreaker/webstart/BrickBreaker.jnlp

                                       Sun Microsystems Proprietary
                                 TechDay 09 – UniParthenope, 4 giugno 2009
JavaFX architecture




                Sun Microsystems Proprietary
          TechDay 09 – UniParthenope, 4 giugno 2009
JavaFX roadmap
Desktop Product Line              JavaFX
                                  Desktop
                               (Winter 2008)
Mobile Product Line                               JavaFX
                                                  Mobile
                                                (Spring 2009)

TV Product Line                                                 JavaFX TV
                                                                (Summer 2009)


Other Platforms                                With Partner platforms/OSs


                        Sun Microsystems Proprietary
                  TechDay 09 – UniParthenope, 4 giugno 2009                     24
JavaFX Tools: rel 1.2




NetBeans IDE 6.5.1 for JavaFX 1.2                           JavaFX 1.2 Production Suite
✔ Windows XP, Windows Vista                                 ✔ Adobe Illustrator CS3/CS4
✔ Mac OS X 10.4.10 minimum                                  ✔ Adobe Photoshop CS3/CS4

✔ Ubuntu 8.04 LTE


✔ OpenSolaris 2009.06



                                    Sun Microsystems Proprietary
                              TechDay 09 – UniParthenope, 4 giugno 2009                   25
JavaFX Tools
                                    JavaFX 1.2 Plugin for Adobe
                                    Photoshop and JavaFX 1.0
                                    Plugin for Adobe Illustrator




                 JavaFX 1.2 Media Factory
                 ✔SVG Importer/Transcoder
                 ✔Viewer




               Sun Microsystems Proprietary
         TechDay 09 – UniParthenope, 4 giugno 2009                 26
How to Deploy

●   Java Plugin
●   Java Web Start
●   JavaFX 1.0 Mobile Emulator




                    Sun Microsystems Proprietary
              TechDay 09 – UniParthenope, 4 giugno 2009   27
JavaFX APIs
●   JavaFX Scene
     –   Node based GUI framework
●   JavaFX Media
     –   Media player, native and cross platform codecs
●   JavaFX Web Services
     –   REST-ful
     –   RSS
●   JavaFX Profiles
     –   Common
     –   Desktop
     –   Mobile           Sun Microsystems Proprietary
                    TechDay 09 – UniParthenope, 4 giugno 2009
JavaFX Script
●   Created for rapid and easy GUI creation
●   Object-oriented
    –   Namespaces, Classes, attributes, functions and
        operations
●   Declarative syntax
●   Both static-typing & type-inference
●   Animation, data binding and event handing
    built in

                      Sun Microsystems Proprietary
                TechDay 09 – UniParthenope, 4 giugno 2009
Example: Hello World in Swing
import javax.swing.*;

public class HelloWorldSwing {

      public static void main(String[] args) {
          JFrame frame = new JFrame(quot;HelloWorld Swingquot;);
          final JLabel label = new JLabel(quot;Hello Worldquot;);
          frame.getContentPane().add(label);
          frame.setDefaultCloseOperation(
                          JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setVisible(true);
      }
}
                       Sun Microsystems Proprietary
                 TechDay 09 – UniParthenope, 4 giugno 2009   30
Example: Hello World in JavaFX
Declarative Syntax
 Frame {
     title: quot;Hello World JavaFXquot;
     width: 200
     height: 100
     visible: true
     stage: Stage {
         content: [Text {
                 font: Font {
                     size: 24
                     style: FontStyle.PLAIN
                 }
                 x: 10, y: 30
                 content: quot;Hello Worldquot;
         }]
     }
 }

                      Sun Microsystems Proprietary
                TechDay 09 – UniParthenope, 4 giugno 2009   31
Class Definition

•Address class definition: The Address class
declares street, city, state, and zip instance
variables all of type String
  class Address {
     var street: String;
     var city: String;
     var state: String;
     var zip: String;
  }
                    Sun Microsystems Proprietary
              TechDay 09 – UniParthenope, 4 giugno 2009
Class Definition
•Customer class definition with functions -
functions are like methods in Java
  class Customer {
     var firstName: String;
     var lastName: String;
     var phoneNum: String;
     var address: Address;

      function printName() {
         println(quot;Name: {firstName} {lastName}quot;);
      }

      function printPhoneNum(){
         println(quot;Phone: {phoneNum}quot;);
      }
  }
                            Sun Microsystems Proprietary
                      TechDay 09 – UniParthenope, 4 giugno 2009
Create an Object
 •Nesting Address object inside Customer
 object
 def customer = Customer {
       firstName: quot;Johnquot;;
       lastName: quot;Doequot;;
       phoneNum: quot;(408) 555-1212quot;;
       address: Address {
           street: quot;1 Main Streetquot;;
           city: quot;Santa Claraquot;;
           state: quot;CAquot;;
           zip: quot;95050quot;;
       }
   }
                    Sun Microsystems Proprietary
              TechDay 09 – UniParthenope, 4 giugno 2009
Step by Step Process of Creating
a simple GUI
•JavaFX application that renders a green
rounded rectangle and a white circle with red
outline on the top of the rectangle




                   Sun Microsystems Proprietary
             TechDay 09 – UniParthenope, 4 giugno 2009
Step by Step Process of Creating a GUI
1.Add necessary imports
2.Create an Application window
3.Set the Scene
4.Create a Rectangle
5.Create a Circle
6.Change the code (so that the Circle gets
underneath the Rectangle)

                  Sun Microsystems Proprietary
            TechDay 09 – UniParthenope, 4 giugno 2009
1. Add Necessary Imports
import javafx.stage.Stage;           // required to render a window
import javafx.scene.Scene;          // required to display a circle and
                                    // rectangle on a window
import javafx.scene.shape.Rectangle; // required to render the
rectangle
import javafx.scene.paint.Color;                // required to fill and stroke the
                                                // rectangle and circle with color
import javafx.scene.shape.Circle;               // required to render the circle



                          Sun Microsystems Proprietary
                    TechDay 09 – UniParthenope, 4 giugno 2009
2. Create an Application Window
•In order to display the graphics, you need to create a
window through Stage object literal
// Create a Stage object literal. Stage is required to render any object.
// The window should be big enough to display all of the rectangle and
// the circle. In this example, the window is a rectangle of 249 by 251
// pixels. To create a window of this size, with a quot;Declaring is Easyquot; title,
// declare these values within the curly brackets using the following
    code:

Stage {
  title: quot;Declaring Is Easy!quot;
  width: 249
  height: 251
  visible: true
}
                           Sun Microsystems Proprietary
                     TechDay 09 – UniParthenope, 4 giugno 2009
3. Set the Scene
•Within the stage, set the scene to hold Node
objects such as a circle or a rectangle
•The scene is a root area where you place
objects of the node type.
•The scene has content variable that is used
to hold the nodes.
•There are many different kinds of nodes,
such as graphical objects, text, and GUI
components.
                   Sun Microsystems Proprietary
             TechDay 09 – UniParthenope, 4 giugno 2009
3. Set the Scene (Continued)
•// The content of the window becomes filled with white
because
// white is a default fill color for a scene. The scene is
   placed on top
// of the window.

Stage {

    ...
    scene: Scene {
      content: [ ]
    }
}

                           Sun Microsystems Proprietary
                     TechDay 09 – UniParthenope, 4 giugno 2009
4. Create a Rectangle
Stage {
   ...
   scene: Scene {
       content: [
         // The x and y instance variables specify the pixel location of the
         // rectangle, arcWidth and arcHeight define the roundness of
         // corners, and the fill variable defines the color that fills the rectangle.
         Rectangle {
            x: 45 y: 35
            width: 150 height: 150
            arcWidth: 15 arcHeight: 15
            fill: Color.GREEN
         }
       ]
   }
 }


                                Sun Microsystems Proprietary
                          TechDay 09 – UniParthenope, 4 giugno 2009
5. Create a Circle
Stage {
   ...
   scene: Scene {
       content: [
          Rectangle {
             ...
          },
        // Because the rectangle is declared before any other objects, it is painted
        // first. The rectangle will be behind any other objects painted later.
        Circle{
            centerX: 118
            centerY: 110
            radius: 83
            fill: Color.WHITE
            stroke: Color.RED
         }
       ]
   }
 }

                                  Sun Microsystems Proprietary
                            TechDay 09 – UniParthenope, 4 giugno 2009
6. Place Circle Underneath Rectangle
Stage {
   ...
   scene: Scene {
       content: [
         // Place the circle underneath the square. To do so, switch the order
         // of the circle and square
         Circle{
            ....
          },
          Rectangle {
             ...
          }
       ]
   }
 }

                             Sun Microsystems Proprietary
                       TechDay 09 – UniParthenope, 4 giugno 2009
Effects: DropShadow
   Text {
       effect: DropShadow {
          offsetY: 3
          color: Color.color(0.4, 0.4, 0.4)
       };
      ...
   },
   Circle {
       effect: DropShadow {
          offsetY: 4
       },
      ...
   }
                      Sun Microsystems Proprietary
                TechDay 09 – UniParthenope, 4 giugno 2009
Images
 ImageView = ImageView {
     clip: Rectangle {
         y: 30 x: 50
         width: 350 height: 100
     }
     image: Image { url: quot;...quot;}
 }




                      Sun Microsystems Proprietary
                TechDay 09 – UniParthenope, 4 giugno 2009   45
JavaFX Script: Data Binding

       // will be modified elsewhere
   var count:Integer = new Integer();


       // The label text is bound to the count
   Label {
         text: bind count.value.toString( )
   }




                       Sun Microsystems Proprietary
                 TechDay 09 – UniParthenope, 4 giugno 2009
JavaFX Script: Event Triggers

  // Triggering validation of the
  // number of wheels on a vehicle
attribute numWheels:Integer = 4
    on replace (oldValue) {
         if (numWheels <= 0) {
             System.out.println(quot;{numWheels} wheels not valid,
                                  changing back to {oldValue}!quot;);
             numWheels = oldValue;
         }
    };




                              Sun Microsystems Proprietary
                        TechDay 09 – UniParthenope, 4 giugno 2009
Resources
●   JavaPassion Trainings (Source of this presentation):
     –   http://www.javapassion.com/javafx
●   http://www.javafx.com/
●   http://java.sun.com/javase/downloads/index.jsp
●   http://java.sun.com/javase/6/webnotes/6u10.html
●   http://scenegraph.dev.java.net/
●   http://jogl.dev.java.net/



                         Sun Microsystems Proprietary
                   TechDay 09 – UniParthenope, 4 giugno 2009   48
JavaFX: la piattaforma
Java per le Rich Internet
Applications

Corrado De Bari
Software & Java Ambassador

Sun Microsystems Italia Spa

Weitere ähnliche Inhalte

Was ist angesagt?

Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework Rohit Kelapure
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 
Great Java Application Server Debate
Great Java Application Server DebateGreat Java Application Server Debate
Great Java Application Server DebateHamed Hatami
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutesArun Gupta
 
jDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring SmackdownjDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring SmackdownMert Çalışkan
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersBruno Borges
 
What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)Pavel Bucek
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Hirofumi Iwasaki
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXBruno Borges
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overviewsbobde
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishArun Gupta
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGMarakana Inc.
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsMurat Yener
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkStephen Chin
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOFglassfish
 
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFishJava API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFishArun Gupta
 
What's Coming in Java EE 8
What's Coming in Java EE 8What's Coming in Java EE 8
What's Coming in Java EE 8PT.JUG
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowBruno Borges
 

Was ist angesagt? (20)

Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
Great Java Application Server Debate
Great Java Application Server DebateGreat Java Application Server Debate
Great Java Application Server Debate
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
 
jDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring SmackdownjDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring Smackdown
 
Java EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c DevelopersJava EE 7 for WebLogic 12c Developers
Java EE 7 for WebLogic 12c Developers
 
What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)What's next for Java API for WebSocket (JSR 356)
What's next for Java API for WebSocket (JSR 356)
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
 
Sun Java EE 6 Overview
Sun Java EE 6 OverviewSun Java EE 6 Overview
Sun Java EE 6 Overview
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
 
Overview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUGOverview of Java EE 6 by Roberto Chinnici at SFJUG
Overview of Java EE 6 by Roberto Chinnici at SFJUG
 
Java EE Revisits GoF Design Patterns
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring Framework
 
GlassFish BOF
GlassFish BOFGlassFish BOF
GlassFish BOF
 
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFishJava API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFish
 
What's Coming in Java EE 8
What's Coming in Java EE 8What's Coming in Java EE 8
What's Coming in Java EE 8
 
Changes in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must KnowChanges in WebLogic 12.1.3 Every Administrator Must Know
Changes in WebLogic 12.1.3 Every Administrator Must Know
 
JSF 2.2
JSF 2.2JSF 2.2
JSF 2.2
 

Andere mochten auch

JavaFX - Bringing rich Internet applications ...
JavaFX - Bringing rich Internet applications ...JavaFX - Bringing rich Internet applications ...
JavaFX - Bringing rich Internet applications ...terrencebarr
 
Introduction into JavaFX
Introduction into JavaFXIntroduction into JavaFX
Introduction into JavaFXEugene Bogaart
 
Getting your Grails on
Getting your Grails onGetting your Grails on
Getting your Grails onTom Henricksen
 
Presentation - Course about JavaFX
Presentation - Course about JavaFXPresentation - Course about JavaFX
Presentation - Course about JavaFXTom Mix Petreca
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsSrikanth Shenoy
 
Message Driven Architecture in Grails
Message Driven Architecture in GrailsMessage Driven Architecture in Grails
Message Driven Architecture in GrailsDaniel Woods
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and DevicesStephen Chin
 

Andere mochten auch (13)

JavaFX - Bringing rich Internet applications ...
JavaFX - Bringing rich Internet applications ...JavaFX - Bringing rich Internet applications ...
JavaFX - Bringing rich Internet applications ...
 
Java Entreprise Edition
Java Entreprise EditionJava Entreprise Edition
Java Entreprise Edition
 
Introduction into JavaFX
Introduction into JavaFXIntroduction into JavaFX
Introduction into JavaFX
 
Getting your Grails on
Getting your Grails onGetting your Grails on
Getting your Grails on
 
JavaFx
JavaFxJavaFx
JavaFx
 
Neo4J and Grails
Neo4J and GrailsNeo4J and Grails
Neo4J and Grails
 
Presentation - Course about JavaFX
Presentation - Course about JavaFXPresentation - Course about JavaFX
Presentation - Course about JavaFX
 
Play framework
Play frameworkPlay framework
Play framework
 
Effective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjectsEffective JavaFX architecture with FxObjects
Effective JavaFX architecture with FxObjects
 
Message Driven Architecture in Grails
Message Driven Architecture in GrailsMessage Driven Architecture in Grails
Message Driven Architecture in Grails
 
JavaFX Presentation
JavaFX PresentationJavaFX Presentation
JavaFX Presentation
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
 
Support Java Avancé Troisième Partie
Support Java Avancé Troisième PartieSupport Java Avancé Troisième Partie
Support Java Avancé Troisième Partie
 

Ähnlich wie JavaFX Uni Parthenope

What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1IBM Connections Developers
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTIONProf Ansari
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTIONProf Ansari
 
Matt Wright - The Application Grid
Matt Wright - The Application GridMatt Wright - The Application Grid
Matt Wright - The Application GridSaul Cunningham
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSumanMitra22
 
"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGap"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGapChristian Rokitta
 
iPhone meets SOA - 06/2008
iPhone meets SOA - 06/2008iPhone meets SOA - 06/2008
iPhone meets SOA - 06/2008Roland Tritsch
 
Advance java prasentation
Advance java prasentationAdvance java prasentation
Advance java prasentationdhananajay95
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application developmentEngin Hatay
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseMatt Raible
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for JavaLars Vogel
 
Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40Roger Brinkley
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshellWe4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshellWe4IT Group
 

Ähnlich wie JavaFX Uni Parthenope (20)

Splunking the JVM
Splunking the JVMSplunking the JVM
Splunking the JVM
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
Codename one
Codename oneCodename one
Codename one
 
What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1What’s new for Developers in IBM Domino & Domino Designer 9.0.1
What’s new for Developers in IBM Domino & Domino Designer 9.0.1
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTION
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTION
 
Matt Wright - The Application Grid
Matt Wright - The Application GridMatt Wright - The Application Grid
Matt Wright - The Application Grid
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptx
 
"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGap"Native" Apps with APEX and PhoneGap
"Native" Apps with APEX and PhoneGap
 
iPhone meets SOA - 06/2008
iPhone meets SOA - 06/2008iPhone meets SOA - 06/2008
iPhone meets SOA - 06/2008
 
GlassFish Embedded API
GlassFish Embedded APIGlassFish Embedded API
GlassFish Embedded API
 
Advance java prasentation
Advance java prasentationAdvance java prasentation
Advance java prasentation
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
Sunstate
SunstateSunstate
Sunstate
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuse
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshellWe4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
We4IT LCTY 2013 - x-pages-men - ibm domino xpages - performance in a nutshell
 

Kürzlich hochgeladen

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Kürzlich hochgeladen (20)

Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

JavaFX Uni Parthenope

  • 1. JavaFX: la piattaforma Java per le Rich Internet Applications Corrado De Bari Software & Java Ambassador Sun Microsystems Italia Spa
  • 2. Agenda ● What's news in Java Runtime Environment ● JavaFX Technology – Key Features – Architecture & Tools – JavaFX Script tutorial Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 2
  • 3. New Features in 6u10 ● JavaKernel: faster download and install ● Java Quick Starter: faster applet start ● Rewritten Java Plugin – Applets run in own JVM – Unified desktop / browser deployment – Draggable Applet – Scriptable applets – Direct3D© support Try: http://download.java.net/javadesktop/plugin2/wwj/ Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 4. Architectural Overview Applet 1 Applet 2 HTML Web Page Applet 3 Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 4
  • 5. Architectural Overview ● Ground-up rewrite of the support for applets in the web browser ● Applets are no longer executed in a Java Virtual Machine (JVM™) inside the web browser ● Instead, a separate JVM machine process is launched to execute the applets ● By default, only one JVM machine is launched – Same resource consumption and sharing properties as the “classic” Java technology-based Plug-In ● Opportunity to launch more than one JVM machine – To support per-applet command-line arguments, heap size requests, and more ● Architectural similarities to Java Web Start software, but tighter browser integration Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 6. Architectural Overview Client JVM 1 OS Process 2 Thin Server JVM OS Process 1 Client JVM 2 OS Process 3 Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 6
  • 7. Compatibility ● Backward compatibility based on runs of hundreds of applets from throughout the web ● Applet lifecycle unchanged – init(), start(), stop(), destroy() ● All services supported: Browser proxy settings Browser certificate store Browser authenticator Browser cookie store Printing Java/JavaScript integration Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 7
  • 8. JNLP Support Most significant new feature ● Unifies deployment between Java Web Start and the Java Plug-In – Simply choose the top-level container (Frame / Applet) ● Incorporate JNLP extensions trivially in applets – JavaFX run-time libraries, JOGL, Java 3D, JAI ● Use JNLP APIs from applets – PersistenceService, DownloadService, ... ● Full support for JVM command-line arguments, JRE version selection, JRE auto-download Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 8
  • 9. Basic JNLP Example <applet width=”500” height=”500”> <param name=”jnlp_href” value=”my_applet.jnlp”> </applet> Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 10. Basic JNLP Example <?xml version=”1.0” encoding=”UTF-8”?> <jnlp href=”my_applet.jnlp”> <information> <title=”My Applet”> <vendor>My Company, Inc.</vendor> <offline-allowed /> </information> <resources> <j2se version=”1.4+” href=”http://java.sun.com/products/autodl/j2se” /> <jar href=”my_jar_1.jar” main=”true” /> <jar href=”my_jar_2.jar” /> </resources> <applet-desc name=”My Applet” main-class=”com.mycompany.MyApplet” width=”1” height=”1” /> </jnlp> Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 11. Applet-Desc Tag <?xml version=”1.0” encoding=”UTF-8”?> <jnlp href=”my_applet.jnlp”> <information> <title=”My Applet”> <vendor>My Company, Inc.</vendor> <offline-allowed /> </information> <resources> <j2se version=”1.4+” href=”http://java.sun.com/products/autodl/j2se” /> <jar href=”my_jar_1.jar” main=”true” /> <jar href=”my_jar_2.jar” /> </resources> <applet-desc name=”My Applet” main-class=”com.mycompany.MyApplet” width=”1” height=”1” /> </jnlp> Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 12. Applet-Desc Tag ● width and height are ignored – Browser always overrides because it knows best how big the applet needs to be – Relative width and height supported in applet tag (i.e., “50%”) ● main-class parameter always used – code parameter from applet tag is ignored – Enables backward compatibility mechanisms (described later) Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 13. Java / JavaScript Support ● Completely rewritten Java / JavaScript integration ● More complete, reliable and portable than before ● Formerly Mozilla-specific functionality now working in Internet Explorer – Static method access – Construction of new Java objects from JavaScript ● Respecifying and reintroducing “LiveConnect” Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 13
  • 14. DOM Access Enables AJAX-style web apps using Java language ● DOM access via W3C APIs has been rewritten – Built on top of new Java/JavaScript support ● New, much simpler bootstrapping entry point org.w3c.dom.Document doc = com.sun.java.browser.plugin2.DOM. getDocument(applet); ● Can then cast to HTMLDocument and descend into the DOM ● Perform operations from any thread – Underlying Java/JavaScript bridge is thread safe Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 14
  • 15. Support for Advanced Applets ● Control over Java heap size ● Control over Java 2D acceleration parameters ● Ideal environment for running 3D content ● JOGL applet examples – NASA World Wind Java: ● http://download.java.net/javadesktop/plugin2/wwj/ – Jake2 – Bytonic Software: ● http://www.bytonic.de/downloads/jake2_jogl11.jnlp Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 15
  • 16. JavaFX JavaFX is THE platform for creating and delivering Rich Internet Applications across all the screens of your life JavaFX is Powered by Java Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 17. Key Features ✔ One-stop shop RIA platform for all screens: ✔ Build engaging visual experiences across desktop, browser and mobile with a unified development and deployment model. ✔ Broadest market reach: ✔ Distribute RIAs easily across billions of devices with the power of Java. ✔ Designer-developer workflow: ✔ Dramatically shorten your production cycle for design and development. Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 18. Key Features (Continued) ✔ Powerful runtime: ✔ Leverage the extreme ubiquity, power, performance and security of the Java runtime. ✔ Break free from the browser: ✔ Drag-and drop a JavaFX application from the browser to deploy to the desktop. ✔ Java technology compatibility: ✔ Preserve your investment by enabling the use of any Java library within a JavaFX application. Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 19. What you can do: Simple Video Player •Incorporating video in your application is as simple as creating an instance of this component, setting a few variables and including a link to your video source. Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 20. 3-D Display Shelf: the Perspective Transform •The PerspectiveTransform built into JavaFX can be used to easily create 3-D effects Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 21. Flying Saucer •The new out-of-process Java applet plugin in Java SE 6 update 10 enables you to make applets which can run outside of the browser. Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 23. JavaFX architecture Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 24. JavaFX roadmap Desktop Product Line JavaFX Desktop (Winter 2008) Mobile Product Line JavaFX Mobile (Spring 2009) TV Product Line JavaFX TV (Summer 2009) Other Platforms With Partner platforms/OSs Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 24
  • 25. JavaFX Tools: rel 1.2 NetBeans IDE 6.5.1 for JavaFX 1.2 JavaFX 1.2 Production Suite ✔ Windows XP, Windows Vista ✔ Adobe Illustrator CS3/CS4 ✔ Mac OS X 10.4.10 minimum ✔ Adobe Photoshop CS3/CS4 ✔ Ubuntu 8.04 LTE ✔ OpenSolaris 2009.06 Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 25
  • 26. JavaFX Tools JavaFX 1.2 Plugin for Adobe Photoshop and JavaFX 1.0 Plugin for Adobe Illustrator JavaFX 1.2 Media Factory ✔SVG Importer/Transcoder ✔Viewer Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 26
  • 27. How to Deploy ● Java Plugin ● Java Web Start ● JavaFX 1.0 Mobile Emulator Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 27
  • 28. JavaFX APIs ● JavaFX Scene – Node based GUI framework ● JavaFX Media – Media player, native and cross platform codecs ● JavaFX Web Services – REST-ful – RSS ● JavaFX Profiles – Common – Desktop – Mobile Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 29. JavaFX Script ● Created for rapid and easy GUI creation ● Object-oriented – Namespaces, Classes, attributes, functions and operations ● Declarative syntax ● Both static-typing & type-inference ● Animation, data binding and event handing built in Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 30. Example: Hello World in Swing import javax.swing.*; public class HelloWorldSwing { public static void main(String[] args) { JFrame frame = new JFrame(quot;HelloWorld Swingquot;); final JLabel label = new JLabel(quot;Hello Worldquot;); frame.getContentPane().add(label); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 30
  • 31. Example: Hello World in JavaFX Declarative Syntax Frame { title: quot;Hello World JavaFXquot; width: 200 height: 100 visible: true stage: Stage { content: [Text { font: Font { size: 24 style: FontStyle.PLAIN } x: 10, y: 30 content: quot;Hello Worldquot; }] } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 31
  • 32. Class Definition •Address class definition: The Address class declares street, city, state, and zip instance variables all of type String class Address { var street: String; var city: String; var state: String; var zip: String; } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 33. Class Definition •Customer class definition with functions - functions are like methods in Java class Customer { var firstName: String; var lastName: String; var phoneNum: String; var address: Address; function printName() { println(quot;Name: {firstName} {lastName}quot;); } function printPhoneNum(){ println(quot;Phone: {phoneNum}quot;); } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 34. Create an Object •Nesting Address object inside Customer object def customer = Customer { firstName: quot;Johnquot;; lastName: quot;Doequot;; phoneNum: quot;(408) 555-1212quot;; address: Address { street: quot;1 Main Streetquot;; city: quot;Santa Claraquot;; state: quot;CAquot;; zip: quot;95050quot;; } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 35. Step by Step Process of Creating a simple GUI •JavaFX application that renders a green rounded rectangle and a white circle with red outline on the top of the rectangle Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 36. Step by Step Process of Creating a GUI 1.Add necessary imports 2.Create an Application window 3.Set the Scene 4.Create a Rectangle 5.Create a Circle 6.Change the code (so that the Circle gets underneath the Rectangle) Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 37. 1. Add Necessary Imports import javafx.stage.Stage; // required to render a window import javafx.scene.Scene; // required to display a circle and // rectangle on a window import javafx.scene.shape.Rectangle; // required to render the rectangle import javafx.scene.paint.Color; // required to fill and stroke the // rectangle and circle with color import javafx.scene.shape.Circle; // required to render the circle Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 38. 2. Create an Application Window •In order to display the graphics, you need to create a window through Stage object literal // Create a Stage object literal. Stage is required to render any object. // The window should be big enough to display all of the rectangle and // the circle. In this example, the window is a rectangle of 249 by 251 // pixels. To create a window of this size, with a quot;Declaring is Easyquot; title, // declare these values within the curly brackets using the following code: Stage { title: quot;Declaring Is Easy!quot; width: 249 height: 251 visible: true } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 39. 3. Set the Scene •Within the stage, set the scene to hold Node objects such as a circle or a rectangle •The scene is a root area where you place objects of the node type. •The scene has content variable that is used to hold the nodes. •There are many different kinds of nodes, such as graphical objects, text, and GUI components. Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 40. 3. Set the Scene (Continued) •// The content of the window becomes filled with white because // white is a default fill color for a scene. The scene is placed on top // of the window. Stage { ... scene: Scene { content: [ ] } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 41. 4. Create a Rectangle Stage { ... scene: Scene { content: [ // The x and y instance variables specify the pixel location of the // rectangle, arcWidth and arcHeight define the roundness of // corners, and the fill variable defines the color that fills the rectangle. Rectangle { x: 45 y: 35 width: 150 height: 150 arcWidth: 15 arcHeight: 15 fill: Color.GREEN } ] } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 42. 5. Create a Circle Stage { ... scene: Scene { content: [ Rectangle { ... }, // Because the rectangle is declared before any other objects, it is painted // first. The rectangle will be behind any other objects painted later. Circle{ centerX: 118 centerY: 110 radius: 83 fill: Color.WHITE stroke: Color.RED } ] } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 43. 6. Place Circle Underneath Rectangle Stage { ... scene: Scene { content: [ // Place the circle underneath the square. To do so, switch the order // of the circle and square Circle{ .... }, Rectangle { ... } ] } } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 44. Effects: DropShadow Text { effect: DropShadow { offsetY: 3 color: Color.color(0.4, 0.4, 0.4) }; ... }, Circle { effect: DropShadow { offsetY: 4 }, ... } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 45. Images ImageView = ImageView { clip: Rectangle { y: 30 x: 50 width: 350 height: 100 } image: Image { url: quot;...quot;} } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 45
  • 46. JavaFX Script: Data Binding // will be modified elsewhere var count:Integer = new Integer(); // The label text is bound to the count Label { text: bind count.value.toString( ) } Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 47. JavaFX Script: Event Triggers // Triggering validation of the // number of wheels on a vehicle attribute numWheels:Integer = 4 on replace (oldValue) { if (numWheels <= 0) { System.out.println(quot;{numWheels} wheels not valid, changing back to {oldValue}!quot;); numWheels = oldValue; } }; Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009
  • 48. Resources ● JavaPassion Trainings (Source of this presentation): – http://www.javapassion.com/javafx ● http://www.javafx.com/ ● http://java.sun.com/javase/downloads/index.jsp ● http://java.sun.com/javase/6/webnotes/6u10.html ● http://scenegraph.dev.java.net/ ● http://jogl.dev.java.net/ Sun Microsystems Proprietary TechDay 09 – UniParthenope, 4 giugno 2009 48
  • 49. JavaFX: la piattaforma Java per le Rich Internet Applications Corrado De Bari Software & Java Ambassador Sun Microsystems Italia Spa