Flex development on Ubuntu 8.04
June 2nd, 2008
Ok so first things fist which version of linux do I install? My first choice is surely Ubuntu Hardy Heron 8.04 although I have a soft spot for their values and celebrity endorsement
the Ubuntu community really do have a great release that has all the tools I need to get started.
My second choice and certainly worth mentioning would have been Fedora, this is a really professional distribution with great support and a large community.
The difference between the two? Ubuntu roots are Debian based while Fedora is based on RedHat. (Keep in mind that linux is very customizable and most of the time workarounds exist for both).
So after installation everything worked first time no major problems, installation was easier than windows and most of my devices were detected and working straight out the box. Not bad for an open source operating system eh?
So whats the first thing I do once my installation is complete, install Flex Builder of course. InisdeRIA.com had a great article on getting java and eclipse set up, that’s pretty much all you need to get flex builder rocking.
Next up, vmware workstation. With vmware workstation installed you can run windows inside a virtual machine and use all your favourites like photoshop and flash. I had a few problems when I had to install vmware workstaition on the latest linux kernel, luckily in true linux tradition, somebody wrote a patch that fixes any issues during installation. I have mirrored the patch here for other people who need it.
Download vmware-any-any-update-115-k2624-wirelessbridgetar
Since making the switch I would say that yes I probably did not have to switch to Linux to get my work done, but every day I honestly do find a reason not to switch back and although there are a few bits of windows that I do miss, nothing compares to the amount of useful development software available for linux. I really am in programmer heaven right now. Give it a go if you have the time, you won’t be sorry…
Package your code with ant
April 23rd, 2008
I recently commented on how ant is by far the most versatile and flexible way to compile your Flex applications, take for example this sample swc compiler project.
I keep this project handy in my workspace, and if I ever need to compile or package my source code into a swc file (pronounced swik for the noobs) I do the following:
- Copy my source code into the source directory
- Open up build.properties and set the parameters
flex-sdk-dir=C:/tools/flex3_sdk output-name=pixelate.swc src-dir=src bin-dir=bin
- And open up build.xml in the Eclipse Ant view
- Now I am good to go
- Finally to build my project simply double click the “compile-swc” task in my Ant view.
This is obviously a very basic example, but consider how useful this becomes if you are developing a third-party api for a team of developers.
You can distribute your code in a neat tidy package and be safe in the knowledge that if anyone decides tinker with your code they only have access to available public members.
Don’t even consider compiling a swc file and expecting it to be completely secure and inaccessible, because where there’s a will there is a way. The point is that you have a working tool that you can distribute and safe guard yourself against bugs caused by other developers.
Download the above mentioned swccompiler.
Extended Flex ComboBox
April 16th, 2008
DEfusion posted an extended Flex ComboBox that works a treat check it out: FoxyComboBox
flexcursion and flex addiction
April 16th, 2008
Cairngorm event gotcha
April 15th, 2008
The latest version of Cairngorm i.e. Cairngorm v2.2.1 has an added helper method in the CairngormEvent class. CairngormEvent->dispatch(e:CairngormEvent). The other day I was busy debugging an application and came across the following code inside one of the views:
var event:CairngormEvent = new CairngormEvent(); dispatchEvent(event);
At first glance this seems completely normal but will fail silently and cease to trigger the associated command.
While I do appreciate the new CairngormEvent helper method which should look like this:
var event:CairngormEvent = new CairngormEvent(); event.dispatch();
for clarity towards fellow team members who may not be familiar with Cairngorm and better distinction between Cairngorm application events and standard view events, I recommend still using the original syntax to dispatch your events:
var event:CairngormEvent = new CairngormEvent(); CairngormEventDispatcher.getInstance().dispatchEvent(event);
This will ensure that the event is clearly dispatched by the Cairngorm framework and not your view.