Archive for July, 2007

Testing locally, project directory structures, and symbolic links

With all of my projects, i follow the same directory structure, which looks like:

/Client_Name
	/Project_Name
		/_assets
		/classes
		/deploy
		/fla

It’s a simple and effective structure that allows me to easily sync everything in CVS. However, I was also keeping a separate copy of the ‘deploy’ folder within my local webserver for local testing, and trying to manually keep the two in sync.

At first, in order to solve the problem of keeping the two folders in sync i was looking for a program that would just sync the folders whever a file was saved into a folder that was being ‘watched’. Nothing really panned out there, although i did find a few apps that would sync two folders whever i told it to (I wanted somethign more automatic than that).

So yesterday, I was talking to a coworker about it and he told me I was going about it all wrong, and the solution is really simple. All I needed to do was set up symbolic links within the webserver, and point those symbolic links to my deploy folder within the project structure. Symbolic links are just like aliases, but hold a slightly different meaning, the main one being that the webserver will follow those links to their target, but it wouldn’t do that with aliases. He then busted out the terminal and set one up to show me how to do it with a simple ‘ln -s’ command. Now, I’m ok with the terminal, but I’d rather have something that can do it within the GUI, so I did a quicksearch and found SymbolicLinker, which although pretty old still works fine. Now i can right-click on any file or folder to make a symbolic link.

Other Flex frameworks?

I was just doing a search for alternatives to Carignorm for Flex, and I just wanted to see if anyone knew of ones that I may be missing, and maybe throw in some comments on any of the ones listed here. What I have so far is:

Newlines in xml

I was trying to split a string on a newline character today and having some issues. The string was a text node loaded from an xml file, and i could see that the line breaks were coming in intact. However when i tried to split the string on the “\n” character, it wouldn’t work. Long story short, internally flash represents a newline character as “\r”, so string.split(“\r”) works fine.