+ All Categories
Home > Documents > diap-Pro JavaFX™ Platform

diap-Pro JavaFX™ Platform

Date post: 16-Oct-2015
Category:
Upload: gustavo-luis-condoy-pogo
View: 23 times
Download: 0 times
Share this document with a friend

of 36

Transcript
  • 5/26/2018 diap-Pro JavaFX Platform

    1/36

    Pro JavaFX PlatformRIA Enterprise Application Development

    with JavaFX Technology

    Stephen ChinInovis, Inc.

    Jim WeaverVeriana Networks, Inc.

  • 5/26/2018 diap-Pro JavaFX Platform

    2/36

    RIA Enterprise Application Development with JavaFX Technology

    2

    Pro JavaFX Platform

  • 5/26/2018 diap-Pro JavaFX Platform

    3/36

    Meet the Presenters

    JimSteve

    3

    Motorcyclist

    Family Man

    Family Man

    Inhabitant of 100 Acre Woods

  • 5/26/2018 diap-Pro JavaFX Platform

    4/36

    4

    I am, therefore I blog ;-)

    steveonjava.com

    Tweet: steveonjava

    JavaFXpert.com

    Tweet: JavaFXpert

  • 5/26/2018 diap-Pro JavaFX Platform

    5/36

    And a Book> Available as an eBook

    today

    > Print version ships inJune

    > Includes JavaFX 1.2> Chapters on:

    ! Mobile Development! Advanced Layouts! Back-end Integration! WidgetFX/JFXtras

  • 5/26/2018 diap-Pro JavaFX Platform

    6/36

    JavaFX Crash Course

  • 5/26/2018 diap-Pro JavaFX Platform

    7/36

    7

    JavaFX Tools and Resources

  • 5/26/2018 diap-Pro JavaFX Platform

    8/36

    8

    Start Here: JavaFX.com

  • 5/26/2018 diap-Pro JavaFX Platform

    9/36

    9

    JavaFX API Docs

  • 5/26/2018 diap-Pro JavaFX Platform

    10/36

    10

    Expressing the UI Scenegraph

  • 5/26/2018 diap-Pro JavaFX Platform

    11/36

    11

    Hello Earthrise

  • 5/26/2018 diap-Pro JavaFX Platform

    12/36

    12

    Hello Earthrise

  • 5/26/2018 diap-Pro JavaFX Platform

    13/36

    JavaFX Mobile Development

  • 5/26/2018 diap-Pro JavaFX Platform

    14/36

    JavaFX Mobile Advantages

    > Write Once, Run Anywhere! Desktop, Mobile, Set-top Boxes (future)

    > Large Embedded Base! Built on top of Java ME platform

    > Wide Range of Devices! Runs on Feature Phones, Smart Phones

  • 5/26/2018 diap-Pro JavaFX Platform

    15/36

    JavaFX Mobile Constraints> Screen Size

    ! Your application has to be capable of running withina resolution of 320 by 240 or possibly even smaller.

    > Common Profile! Mobile applications are limited to the JavaFX APIs

    that are part of the Common Profile, which is asubset of the Desktop Profile.

    > Performance! Mobile applications run on much less powerful

    devices, so they have less CPU and memoryresources available to work with.

  • 5/26/2018 diap-Pro JavaFX Platform

    16/36

    Developing for the Common ProfilePackage Class(es) Affected Variables and Methods

    avafx.ext.swing All All

    avafx.reflect All All

    avafx.scene Node effect, style

    avafx.scene Scene Stylesheetsavafx.scene.effect All All

    avafx.scene.effect.light All All

    avafx.scene.shape ShapeIntersect All

    avafx.scene.shape ShapeSubstract All

    avafx.scene.text Font

    autoKern, embolden, letterSpacing, ligatures,

    oblique, positionavafx.stage AppletStageExtension All

    avafx.util FXEvaluator All

    avafx.util StringLocalizer All

  • 5/26/2018 diap-Pro JavaFX Platform

    17/36

    Mobile DemosHello Earthrise, Mobile DrawJFX

  • 5/26/2018 diap-Pro JavaFX Platform

    18/36

    18

    Controls/Binding/Triggers/Sequences

  • 5/26/2018 diap-Pro JavaFX Platform

    19/36

    19

    More Cowbell!

  • 5/26/2018 diap-Pro JavaFX Platform

    20/36

    20

    Transforms/Transitions/Timelines

  • 5/26/2018 diap-Pro JavaFX Platform

    21/36

    21

    Timeline Animation

  • 5/26/2018 diap-Pro JavaFX Platform

    22/36

    Who is My Representative?

    22

    Web Service Integration

  • 5/26/2018 diap-Pro JavaFX Platform

    23/36

    Calling a REST Service> REST URL:http://whoismyrepresentative.com/getall_mems.php?

    zip=90210&output=json> Output:{ "results": [

    { "type": "rep", "name": "Henry A. Waxman",

    "party": "D", "state": "CA", "district": "30", "phone":"(202) 225-3976", "office": "2204 Rayburn", "link":"http://www.henrywaxman.house.gov/" }

    ]}

    23

  • 5/26/2018 diap-Pro JavaFX Platform

    24/36

    Making an HttpRequestreq = HttpRequest {

    method: HttpRequest.GET

    location: url

    onInput: parseResponse

    onDone: function() {if (req.responseCode != 200) {

    message = req.responseMessage;

    } else if (sizeof senators == 0 and sizeof representatives == 0) {

    message = "No members found for {zipcode}";

    }

    }

    onException: function(ex: java.lang.Exception) {println("Exception: {ex.getClass()} {ex.getMessage()}");

    }

    }

    req.start();

    24

    Was req.enque() in JavaFX 1.1

  • 5/26/2018 diap-Pro JavaFX Platform

    25/36

    Using the Pull Parserwhile (parser.event.type != PullParser.END_DOCUMENT) {

    parser.seek( "type" );

    if (parser.event.type == PullParser.START_VALUE) {

    parser.forward();if (parser.event.text == "rep") {

    var rep = Representative{}

    parseMemberOfCongress( rep, parser );

    insert rep into representatives;

    } else if (parser.event.text == "sen" ) {

    var sen = Senator{}

    parseMemberOfCongress( sen, parser );

    insert sen into senators;

    } } }

    25

  • 5/26/2018 diap-Pro JavaFX Platform

    26/36

    The JavaFX Desktop Widget Platform

    WidgetFX

  • 5/26/2018 diap-Pro JavaFX Platform

    27/36

    27

    Why another desktop widget framework?

    > Open-Source! But widgets can be licensed commercially

    >Cross-Platform Support! Windows XP/Vista, Linux, and Mac OS X.

    > One-Click Installation! Plus automatic updates of the dock andwidgets.

    > Robust Security! Secure sandbox + signed widgets

  • 5/26/2018 diap-Pro JavaFX Platform

    28/36

    The Pac-Man Challenge!

    > I Wish... Henry Zhang would make aWidgetFX widget from his JavaFX

    Pac-Man game -- Jim Weaver

    28

    javafxpert.com

  • 5/26/2018 diap-Pro JavaFX Platform

    29/36

    The Pac-Man Challenge!> With about one week to go, I think it is

    interesting and fun to give it a try.

    After adjusting the width and height, itwas just simply working! (see theimage on the [right])

    -- Henry Zhang

    29

    javafxgame.com

  • 5/26/2018 diap-Pro JavaFX Platform

    30/36

    Learn how at the Friday WidgetFX session!

    Movie Widget Tutorial

    TS-3789: Getting Started with WidgetFX

    10:50AM this Friday

  • 5/26/2018 diap-Pro JavaFX Platform

    31/36

    JavaFX Puzzlers

    FX1.2

  • 5/26/2018 diap-Pro JavaFX Platform

    32/36

    Puzzler 1> What will this program display?:

    Text {

    textOrigin: TextOrigin.TOPfont: Font.font(null, 36)content: the newspaper in the handbag was bent

    }

    " Output:

  • 5/26/2018 diap-Pro JavaFX Platform

    33/36

    Puzzler 2> What does this print out?var cars = [

    ["z3", "m3", "x5"],

    ["a4", "r8", "tt"]];println("bmw: {cars[0]}");println("audi: {cars[1]}");

    bmw: z3audi: m3

    "Answer:

  • 5/26/2018 diap-Pro JavaFX Platform

    34/36

    Puzzler 3> What does this print out?var value = [10, 9, 8,

    for (x in reverse [0..7]) {x}-1

    ];println(value);

    [ 10, 9, 8, 6, 5, 4, 3, 2, 1, 0, -1 ]

    "Answer:There is no 7!

  • 5/26/2018 diap-Pro JavaFX Platform

    35/36

    35

  • 5/26/2018 diap-Pro JavaFX Platform

    36/36

    36

    Stephen Chin

    Jim Weaver

    http://projavafx.com/

    Book Plate Signing at 5:30

    In front of the bookstore


Recommended