WTF is JavaFX?!? (book review)

Thursday, May 29th, 2008
2/5

I didn’t really know anything about JavaFX until I picked up this book. Now not only do I know what it is, I can use it too. If you’re looking to understand what JavaFX is and where it might fit in your toolset then go grab the 216 page book “JavaFX Script: Dynamic Java Scripting for Rich Internet/Client-side Applications”. This book will get you rolling quickly and simply and give you the basics you’ll need to know to properly evaluate if it is right for you.

With that said - if your not familiar with programming concepts (conditionals, loops etc.) in general, or if you want an in-depth explanation of where JavaFX fits into the scheme of things, then I would not suggest this book.

Rated 2/5 on May 29 2008
Vote on John’s reviews at LouderVoice
LouderVoice review tags:

More Flexible Code - Programming to an Interface

Wednesday, August 22nd, 2007

Keep your code flexible - program to interfaces. What does this mean? Well there are a few things that we need to discuss before we can really answer that question. For this discussion you'll need a decent understanding of Object Oriented programming…but, hey if you don't have that it still may make some sense anyhow and you might even get something that you don't understand explained for you as we go along.

First things first, Polymorphism - The ability for one class to stand in for another, kind of. By "kind of" I mean that by programming to an interface, a variable or property's value can be assigned to an object that conforms to a "formal interface", more on that in a second. This means that if you crate a property or variable that is typed to an interface - myPet:IAnimal; - (where IAnimal is the interface) that item can be any number of classes that follow the "interface" defined by IAnimal .

Example:

Actionscript:
  1. public var myPet:IAnimal = new Dog();
  2. public var yourPet:IAnimal = new Fish();
  3. public var hirPet:IAnimal = new Camel();
  4. public var herPet:IAnimal = new Giraffe ();

Each of the classes, Dog, Fish, Camel, Giraffe must "implement" the IAnimal interface.

Okay, so what is a formal interface you say?
First off, a formal interface is a definition, some might say a contract, but I think that is confusing, of what a class's publically accessible methods should be and what they should look like. ActionScript 3 provides a construct to create these interfaces that is very similar to classes. Basically you create the public methods, their parameters and their return types, but nothing that has to do with what happens inside the method.

Example:

Actionscript:
  1. package
  2. {
  3. public interface IAnimal
  4. {
  5. function create(p_name:String):void
  6. function feed(p_food:Object):void
  7. function sleep():void
  8. }
  9. }

Notice that there is nothing that tells you what you need to do in the methods, or anything about properties or private methods. That is determined by the needs of the class that implements the interface. This is a good point to take hold of and knock into your head:

A class has an implementation (what the class does ) and an interface (how the outside world interacts with it).

This is what allows your code to be flexible. If you program to interfaces, you can crate objects that are much more flexible and powerful by have the ability to "stand in" for any property or variable.

You can also create an "interface" through inheritance by using something called an "abstract" class. An abstract class isn't intended for instantiation, so it is up to you to manage that. But abstract classes do allow for a default implementation (what the class does) as well as allowing for the type of interface implementation mentioned above because sub-classes inherit the interface of their parent classes.

So, keep your code flexible, program to interfaces!

FlexLib Launched

Wednesday, February 28th, 2007

Darron Shall announced on his blog that FlexLib is now launched.

FlexLib is a Google Code project that aims at being a concentrated effort by the Flex 2 community for creating high quality user interface components. FlexLib provides a standard component namespace, package structure, code and naming conventions, and common reusable base classes to unify the various efforts people have put forth on their own.

Also mentioned it FlexBox which Jun Heider brought to my attention yesterday. FlexBox is directory of Adobe Flex components available for developers.

Darron Shall's full post includes some additional Flex resources. Check it out and get Flexified!

10 Minute RSSReader & Flex For Free

Thursday, February 9th, 2006

Macromedia announced the Flex Builder 2 Public BETA so I thought I'd play with it and see what I thought. I'm loving some of the new layout features they have added. It makes the initial layout so easy!Check out the list of features that have been added on the Adobe Labs site.
Free Flex SDK Announcement!

As I was playing, I put this blog reader together in about 10 minutes.


Very simple, but very cool. It will read in an RSS 2.0 feed URL and let you cycle through the articles. You can choose from 3 pre-defined feeds ro enter your own. Oh yeah, this appwill only work locally bacuse it is reading in images and the flash crossdomain policy will get in the way.

View the source here.

Download the source here.

Of course you'll need the updated 8.5 player to view it.

The Flex Builder 2 Public BETA is available on the labs site: labs.macromedia.com

Find entries :

Want to subscribe?

  Subscribe in a reader or,
Subscribe via email:

About me

I'm a senior developer at RealEyes Media, Adobe Certified Instructor and Adobe Certified Professional. Here you'll get my ideas and experience Flex, Flash, ColdFusion and related technologies as well as some generally off the wall stuff.