Aptana SDOCML & Code Hinting Support

Prompted by this post, I’ve been working on a tool that uses jsduck and Adobe AIR to create the SDOCML necessary for Aptana code hinting. Specifically I’ve been playing with EXTJS 4.0 becuaseof some interest in Sencha.

In the near future I’ll post the SDOCML files that I’ve created for the code hinting and once I get the tool looking presentable and working efficiently, I’ll post the source of that to GitHub.

Here is the current version of the file. I’m not completely sure is has everything it needs. So, it is a work in progress and I’ll post updates as I create them.

If you’d like the SDOCML for EXTJS 4.1 Beta

Quick fun with AIR & Dailymugshot.com

So i’ve been playing with DailyMugShot.com for the past couple of months. DailyMugShot is just that – you take 1 picture every day of your mug. Well I wanted all my mugshots and there wasn’t a direct way of downloading them from the site. They have an RSS feed for your shots, but it only shows the current picture.

They do have a little flash based badge that you can post to your site.

So with some hunting around in the firebug output I found where the little flash piece calls a service for the sequence of images. The dataservice is simple XML (Yay!), and I like ActionScript 3 and XML. So, I wrote an AIR app that downloads all my mugshot images. It is really basic and urls and final file locations are all hard-coded, but it was a fun 45 minutes and worked like a charm and I have all my past mug shots.

Here are a few of my favorites:

Update: If you’d like to play with dailymugshot.com I’ve compiled an AIR Application that will download all the images for a given user ID (you can get the userID from the slide show page URL)


WTF is JavaFX?!? (book review)

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.

More Flexible Code – Programming to an Interface

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 .

public var myPet:IAnimal = new Dog();
public var yourPet:IAnimal = new Fish();
public var hirPet:IAnimal = new Camel();
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.

public interface IAnimal
function create(p_name:String):void
function feed(p_food:Object):void
function sleep():void
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

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

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