Monday Jan 19, 2009

Learn to program using JavaFX Script

The 1st session of the "15-week JavaFX Programming (with Passion!)" free online course will start on January 30th, 2009. The details of the curriculum can be found at the javapassion.com website.

For registration, all you have to do is to send a blank email to the following email address: javafxprogramming-subscribe@googlegroups.com

Tuesday Dec 18, 2007

Patterns in Java & JavaFX Script

One of the thoughts that I had the other day was related to design patterns in JavaFX Script. Patterns are quite popular with developers. The are books on this topic and lots of web resources. The question is how could write, for instance a Singleton, in JavaFX Script.
 
In Java it would look like this:

public class OnlyOne {

    private static OnlyOne singleton = null;

    private OnlyOne() {

    }

    public static synchronized OnlyOne getInstance() {
        if (singleton == null) {
            singleton = new OnlyOne();
        }

        return singleton;
    }
}

/\*\*
\* Test program to prove we've coded the singleton correctly
\*/
public class Driver {

    public static void main(String[] args) {
        // one would try this OnlyOne one = new OnlyOne();
        // and it won't work due to the private constructor
       
        // get an instance
        OnlyOne one = OnlyOne.getInstance();
        System.out.println("Myfirst attempt: " + one.toString());
       
        // get another instance to see if they are the same
        OnlyOne two = OnlyOne.getInstance();
        System.out.println("My second attempt: " + two.toString());
    }
}

The result of running the Driver program is: 

Myfirst attempt: onlyone.OnlyOne@9b49e6
My second attempt: onlyone.OnlyOne@9b49e6

As expected, any time one is trying to get a handle to the OnlyOne object, the same instance is returned.

Thursday May 31, 2007

Java FX @ Java One

Everyone (especially in the US) loves a winner and at every Java One you have one product, technology or event that makes the biggest splash. 2007 is shaping up as the year of Java FX. In a nutshell: "JavaFX comprises a comprehensive set of runtime environments, widgets, development tools, and scripting environments At the 2007 JavaOne Conference, Sun introduced two products in the JavaFX family: JavaFX Script and JavaFX Mobile." You owe to yourself to kick the tires on Java FX Script, so here are some pointers to some resources on the web.

As far as I am concerned, this year's conference was one of the better ones, that I've attended (since '96). I have not been so excited since 2003 when we previewed Java Studio Creator. One of the cool things about the conference is the social networking aspect. You end up having a beer with entrepreneurs that will become the next Jeff Bezos, renowned technologists and lot's of other folks with who you collaborate during the year, but they always at the end of the phone line or just a name in the CC list.
 

About

octav

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today