Thursday Jul 31, 2008

NetBeans helps you get started with JavaFX

I've been waiting since Java One for the release of the JavaFX SDK. This morning, I was finally able to download the bits and to my pleasant surprise the tooling accompanied the release. I installed a distribution of NetBeans 6.1 that includes support for JavaFX script. ~30MB later and a straight forward install I was ready to go. NetBeans bundles a few samples which are useful when you want to learn by modifying someone else's code.


In a nutshell, for a preview the bits fared well and I was able kick the tires of the new language. Of course the availability of the debugging capabilities that I got with NetBeans made my job easier. Developer docs can be found both on the javafx.com site as well on netbeans.org. I am looking forward to the 1.0 release of the SDK later on this year.

Friday May 09, 2008

Java uber alles

IMHO opinion the '08 Java One had many themes. The event took place right after the OpenSolaris launch and unlike last year when Sun introduced JavaFX, this year the conference had Java + You as its motto. My take is that Java is poised to become more of a consumer brand. It is not hard to see why. Java is part of every day life wether we realize or not. Phones, entertainment devices - PS3 (Blue-ray), desktops, web apps, etc. Basically all the "screen" with which we now interact leverage Java.

NetBeans has been focusing on dynamic languages, especially since there is an opportunity to run Ruby, Python, PHP on the JVM. It is likely for this trend to continue, since Sun is a position to offer optimized deployment for applications that use dynamic languages. This is true now more than ever since most of these languages leverage MySQL and Sun will do its best to tune the database on Sun systems.

The most entertaining session that I attended was Todd Fast's. That were I learned that 1.0 developers are an endangered species :-) Thanks God that I am now in management. I should also hedge my bets and become a casual developer. All I need is a 2.0 development environment and I ready to go.
 

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.

Friday Jul 27, 2007

Get Started with JavaFX Script

JavaFX Script made it debut in May '07 during the Java One conference. The excitement of the developer community is obvious and the project became the most popular project on java.net

Here are a few easy steps that could help any developer get started with JavaFX Script.

Of course folks can use an IDE to learn the language, so in this case I would recommend this tutorial. It will call for the use of NetBeans (which is now available in a small - "basic profile" ~ 23 MB) and one will have to use the update center and download the FX plugin


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