Apple

Upgrading Flash Builder

Whether you’re upgrading because you’re using BETA versions that change rather frequently or upgrading to the next major release, you don’t want to lose all your hard work invested in configuring your setup. Here’s how I handle it and hopefully it’s useful to you. If you have other cool ways to persist workflows between upgrades, please share them.

Workspaces

I’ve created a workspaces folder in a custom directory on my HD where I store all the workspaces I like to use with Eclipse-based IDEs. I separate them by IDE and then by purpose. So for Flash Builder, my workspace hierarchy is like this:

/workspaces
  /_fb4
    /air
    /as
    /flash
    /flex

This is where all of my IDE preferences and workbench layout settings are stored. Centralizing them here allows me greater flexibility when upgrading since I never have to worry about any changes to installation procedures overwriting my custom settings. Nevertheless, I backup my workspaces prior to upgrading and since their small text files it only takes a second to archive.

Documents Directory

On OSX, the Flash Builder installer creates an Adobe Flash Builder 4 directory in your Documents directory. The installation instructions advise you to uninstall any previous versions of Flash Builder before installing the new version. Following this advice will delete this folder if it already exists. So, be sure to back this up prior to uninstalling your current version. That way you can cherry pick anything you need after installing the new version.

Applications Directory

You should also backup up your program installation in your Applications directory for the same reasons as with the folder in your Documents directory. If you’ve heavily modified your install with additional plugins, etc., this is vital!

Plugin Restoration

Where are all my cool plugins? They got wiped during the upgrade process but if you followed my advice and backed everything up, you’ll be back up and running in a minute or two. There are generally (2) locations where plugin info is stored for Flash Builder. If you pull the data from your backups and place them in the following locations, you should have full access to all your plugins post-upgrade (provided they still work with the latest release)

#1 – /Documents/Adobe Flash Builder 4/.metadata/.plugins
#2 – /Applications/Adobe Flash Builder 4/plugins

Although this post is slanted more towards upgrading on OSX, it should be similar for other operating systems. Any issues, let me know…

GitX Tweaks: Commit View

So, after thinking about my most recent updates, I decided I wanted to change the way that the commit view looks but just slightly. This is my 1st pass on some things I’d like to have available via the toolbar.

Would also like to tweak the view selector buttons, revise remote selection and add toolbar buttons for all the contextual menu items, which aren’t many.

GitX: A git GUI for OSX

GitX is a git GUI made for OSX. It was created by Pieter de Bie and is a really solid tool for working with git on OSX. I’ve been using it for about 9 months now. I liked it so much when I first began using it that I immediately added the ability to perform remote pushes to Unfuddle.

I was pushing some commits earlier this morning and realized that I never made the changes to GitX public. It was always my goal to share the updates with the community but I always kept getting sidetracked. Well, today I forked the master project and even added GitHub integration.

olgx_github_screenshot

You’ll need the latest version of Xcode to compile from source. If you just want access to the customized application, you can download a ZIP of the forked project and you’ll find the application in /path/to/download/build/Debug/GitX.app. Hope others find this as useful as I have…

olgx_gitx_screenshot

Overlaying the Flex SDK with the AIR 2.0 SDK on OSX

Since I develop with multiple IDEs, I maintain the latest releases of the Flex and AIR SDKs in a centralized location outside of their default install locations. This made enabling the AIR 2.0 SDK simple for me as all I had to do was the following:

1. Duplicate my Flex 3 SDK path
2. Rename the duplicate to flex_sdk_3.x_air_sdk_2.x
3. Download the latest AIR 2.0 SDK (currently AIR20_mac_sdk_120209.tbz2)
4. Place the AIR SDK zip in the root of the new Flex SDK directory

/flex_sdk_3.x_air_sdk_2.x/AIR20_mac_sdk_120209.tbz2

5. Open up Terminal in the new Flex SDK directory and execute the following command:

tar -xjf AIR20_mac_sdk_120209.tbz2

6. Open Flex Builder and add the new SDK -> Flex Builder > Preferences > Installed Flex SDKs > Add

Now, when I want to create an AIR app that targets the 2.0 SDK all I have to do is

1. Update the project compiler settings to use the new SDK -> Project > Properties > Flex Compiler > Use a Specific SDK
2. Update the application descriptor file to use the AIR 2.0 namespace

<application xmlns="http://ns.adobe.com/air/application/2.0beta">

All of the above steps can be repeated for the Flex 4 SDK as well.

For those interested, these are the items that were updated and added to the SDK for 2.0:
/bin/adl
/bin/adt
/frameworks/libs/air
/frameworks/projects/air
/lib/nai
/lib/adt.jar
/runtimes/air
/samples
/templates/air
/AIR SDK Readme.txt
/SDK license.pdf

CAVEATS:

  1. There’s a new certificate process started in AIR 1.5.3 that may disrupt your workflow if you’re creating signed applications.
  2. If you want to utilize the new native process features, you’ll have to implement multi-platform builds (native installers for Win, Mac and Linux) and these must occur on the target platform (ie, can only create DMGs on Mac, etc)

Working with MySQL Doesn’t Have to Suck

That’s the tag line for Querious, an awesome MySQL database management tool from Araelium Group. It’s like MySQL Administrator combined with Sequel Pro.

Prior to Querious, I would have to use both of those other apps plus some CLI to manage all the data systems I’m responsible for. Now, with Querious I can use one GUI and resort to the CLI only when absolutely necessary. It has a lightweight feel like Sequel Pro plus you get the full administrative capabilities of MySQL Administrator + phpMyAdmin. If you have to import a massive SQL dump, either split it up or prepare for the app to crash (unless you modify max_allowed_packet).

All in all, Querious is a must-have for MySQL DBAs that work exclusively on a Mac and is definitely worth the $25 price tag…

Installing New Snow Leopard Server

During a super busy week this week the main server on the internal network died. This was bad, really bad. As the Open Directory Master, this machine was responsible for everyone being able to enjoy a smooth workflow. Promoting another server to OD Master just wasn’t an option as there were other critical services running on the now deceased machine. No, for this catastrophe we had to invest in something that we could expect to be more reliable under the constant strain.

Pre-Installation

Pre-Installation

Surprisingly, the New Mac Mini Server from Apple couldn’t have been released at a better time. With a little under 12 hours until the next day of business, we would have to acquire a server, setup and restore the system data from our latest backup. Based on those requirements, I knew that only one box could rise to the occasion.

So, after receiving purchase approval, I made my way to the nearest Apple Store to snag one of those precious jewels. I knew things would work out too when I made it to Santa Monica and lucked up on a parking space about 40 feet from the Apple Store entrance.

Once in the store, I didn’t waste anytime. I needed to get my server and split. Of course I ended up browsing and didn’t leave until about 20 minutes later. But, I had our new server in hand ready to be welcomed into the fold.

Once I made it back to the office around 9pm, I had to prepare the rack for a new family member. Finally, we could have all of our servers consolidated in 1 area instead of scattered around thanks to the form factor of the Mac Mini. It really takes up very minimal real estate and makes me wonder if I’ll ever deploy Xserve now that the Mini is a viable option. The cost-to-value ratio here is excellent. I mean you get a terabyte server with 4GB of RAM and an unlimited client license to Snow Leopard Server for around $1200 (including Apple Care). To do the same with a new Xserve could easily set you back $3000+. It might not work for a video shop but at these prices it’s a no brainer for powering an expanding network.

Anyways, it’s now time to put this puppy into action. So I roll up my sleeves and get to crackin’.

The Arrival

The Arrival

The box that it comes in adds an additional 1/3 to the dimensions. So you know the footprint on this bad boy is going to be small.

Installation Preparation

Installation Preparation

After inspecting the package contents, it was time to get to work. About 9 hours later, the new machine was installed into its new home ready to provide core and directory services to the team with overall workflow only slightly bruised…:D

Home, Sweet Home!

Home, Sweet Home!

ZamfBrowser – ZendAMF Service Browser

One of my colleagues at Almer/Blank, Omar Gonzalez, just released a very promising project into the open source community today, ZamfBrowser. This AIR application is a lifeline for all the developers who have embraced ZendAMF since its release yet have longed for that familiar service browser paradigm we grew used to with AMFPHP. Well, wait no longer. ZamfBrowser performs server introspection to give you access to your ZendAMF services and it even features test retention by remembering the last arguments used for method testing between sessions. This is definitely an application worth a look if you plan on doing any AMF development.

Using the Flex IViewCursor to Manage an ArrayCollection

One of the nice things about the Flex framework is the various utility classes that make it so much easier for you to accomplish your development tasks than you’d be able to without them. One such class, in my opinion, is mx.collections.IViewCursor. What this class does is to define an interface for enumerating a collection view (ie, ArrayCollection) both forwards and backwards. Using this construct, you can avoid having to use for.. loops to examine the collection.

Here’s a quick example of a fictitious auto maker that’s tasked us to update some info related to one of its auto dealers after receiving the quarterly sales report:

var carDealers:ArrayCollection;
var dealerCursor:IViewCursor;
var vehicleCursor:IViewCursor;
 
var affectedDealer:CarDealer;
var targetVehicle:Car;
var targetVehicleIndex:Number;
 
var dealerIdFromSale:String = 'XXXXXXXX-XXXX-XXXX-XXXXXXXXXXX';
var vinNumberFromSale:String = 'XXXXXXXXXXXXXXXXX';
 
dealerCursor = carDealers.createCursor();
 
// iterate through the list of dealers
while (!dealerCursor.afterLast)
{
  if (dealerCursor.current.dealerId == dealerIdFromSale)
  {
     affectedDealer = CarDealer( dealerCursor.current );
 
     // create a cursor to iterate over the dealer's inventory
     vehicleCursor = affectedDealer.inventory.createCursor();
 
     // iterate over the inventory
     while (!vehicleCursor.afterLast)
     {
        if (vehicleCursor.current.VIN == vinNumberFromSale)
        {
           // a match was found so now we need the
           // index of this vehicle in the ArrayCollection
           targetVehicle = Car( vehicleCursor.current );
           targetVehicleIndex = affectedDealer.inventory.getItemIndex( targetVehicle );
 
           // since the sale was successful, we can safely
           // remove the vehicle from this dealer's inventory
           affectedDealer.inventory.removeItemAt( targetVehicleIndex );
        }
 
        vehicleCursor.moveNext();
     }
  }
 
  dealerCursor.moveNext();
}

In a few lines of code, we’re able to create some very readable and manageable logic to complete the task of updating the inventory. And, you may notice that we also iterated over not one, but two ArrayCollection instances with our mighty IViewCursor. One additional thing to note is the use of the moveNext() method. It’s important that you instruct the cursor that it’s OK to advance even though you’ve found what you’re looking for; otherwise, plan on some serious hang time. I mean it is still a while..loop after all!

:D

Cool Features in Flash Builder 4

I was recently working on a project in the latest beta release of the forthcoming Flash Builder 4 and wanted to point out the new contextual help feature. What’s nice about this feature is that I had just added the highlighted event to the event class and was busy implementing it in a view class and because of FB4’s new code-hinting muscle I was able to see everything that I had documented in the event class concerning the event without having to have the event class open.

This is definitely a much appreciated usability enhancement. Now, if we could just get editable code (not file) templates (think FDT, Zend Studio, etc), FB4 would be that much closer to being ready for prime time…:D

To open aum.flexbuilder.osx, you need to install Rosetta

If you’re a Flex developer that’s recently upgraded to Apple’s latest OS, Snow Leopard, you may run into this prompt when launching Flex Builder 3. This is saying that in order to use the Adobe Update Manager plugin for Flex Builder, you need to install Rosetta. Rosetta which was enabled by default in Leopard, is not in Snow Leopard as Apple tries to push the market towards 64-bit computing.

You’re perfectly safe to launch/use Flex Builder without this plugin until Adobe releases an updated version. All other application functionality appears unaffected by a lack of Rosetta.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes