Associative Arrays in ActionScript 3.0

Sometimes something very simple takes hours of your time just to figure out what’s going wrong.
I was doing a XML parsing and I was trying to save a part of information in a multi-dimensional Associative  Array.

And the problem was so easy that I would never ever guess something has been changed in AS 3.0 , till I stuck in the middle and spend hours to figure out what’s the problem.
A very simplified version of the issue is like this :

var my_arr:Array=new Array();
my_arr['test']    =    'xxx';
trace(my_arr.length); // returns 0

So as you can see, none of the properties and methods of Array won’t work for associative arrays. [refering to Adobe’s help].

Again referring to the same Help document you should use object Class whenever you need something like an Associative  Array.

Hope it will help someone out.

IDEs for PHP development

It’s been a long time that I used different IDEs for PHP development. I started with DreamWeaver 4.0 and grew up with the next versions.
Still I believe that none of the IDEs is as handy and easy to use as DreamWeaver, but unfortunately it didn’t update itself with developers’ needs. Integration with code repositories and code navigation are the basic needs for today’s development.

Well it has some features to support SVN in the CS4 version, but I prefer not to mention it because it has lots of flaws. And code navigation and class/method listing is not there, there are some extensions to give you the same concept but they’re not that much useful.

Once in a while I tried the other IDEs. I tried ActiveState Komodo long time ago but it didn’t work out for me at all, lots of problems with searching and searching through the folders and serious problems with unicode. They might have debugged all those things but that experience was enough for me.

NotePad++ is a great editor but you can not mention it as an IDE.

When PDT came out I was excited about it but the more I worked with that the more I disliked it. Very slow, lots of bugs and suddenly freezes and lack of so many features.

I also tried Aptana Studio for a while, but the same thing as PDT,, pretty slow and suddenly freezes. Which I eventually understood that it’s because of Eclipse.
Oh God! Eclipse ! It has a wonderful plugin-based software architecture, amazing integration and lots of plugins, but it just have 2 flaws :

  1. VERY slow
  2. Suddenly freezes without any reason

I don’t know why they love it so much at schools.

I moved to PHPed and I still use it for a some projects. One of the most important things that I really like from PHPed is the DB client, which you can Drag/Drop DB fields instantly from the IDE without considering any typo or need to go to another application to copy/paste them. The other thing that I really like is Shell-Menu access, it means you can have the menu which you have my right-clicking on the item in windows-explorer, so it doesn’t matter if it doesn’t support SVN or not [which it does] you can easily do whatever you want by accessing the shell-menu.
But on the other hand it has it’s own strangnesses, the most important of all shortcut keys are totally different [ctrl+Y does a line delete instead of Redo and so on…]
I still use it for some of my old projects though.

I’m not a Java fan at all, and I only use it when I’m completely obligated to use it at school [still wondering why do they love Java that much! ] . But for a school project I had to download Java and install it so I can study, and I was really shocked when I found that Eclipse has not been mentioned anywhere in Sun MiscroSystem‘s website at all. But they suggest NetBeans for Java Development, I downloaded the package containing Netbeans and JDK, I studied but you know, when you want to study you do everything else rather than studying 😛 it was exactly the case for me and I ended of finding an official plugin developed by NetBeans team for PHP development.

I can say that’s IT… That’s what a developer exactly needs for PHP development, it’s fast and smart. That is really it… Free and supports all the features you need. Give it a try and you’ll definitely like it.

As a MacroMedia/Adobe fan I’m still looking forward for them to provide a great IDE for PHP developemnt, but they should hurry.  They’re loosing so many of their users for the lack of the features I mentioned above.

While we’re looking forward for Adobe, let’s take a look at NetBeans and enjoy it.