I just finished building my first commercial one. I used Flash, PHP and JQuery predominantly. Flash is actually quite good for developing Facebook applications but don't try putting it on the Profile/Fan page as you have to client to enable the plug-in. It's fine to use on the application page though.
I must admit, I found the whole experience a bit confusing. While there's pretty comprehensive documentation available, they really make development and finding your way around completely unintuitive.