views:

364

answers:

2

Setting up Flex project for group development can be a bit tricky. There are lots of little local settings that might need to be tweaked in order to have a project that can be easily checked out.

I've had limited success using the built-in import/export flex project utilities. I seem to wind up editing by hand a lot and I think I might be missing something.

UPDATE I neglected to mention originally that my goal is to make it possible to checkout a project from subversion and get up and running with as little fuss as possible. The biggest problems that I have run into all revolve around managing the "dot" files and how to make them flexible enough to deal with different developer environments.

For example, even with just me, I would like to have this ability: at work, I use a Vista machine and at home I use a Mac. There are certainly differences in the way certain paths are described, but they really are quite similar. On Vista, the flex root is c:/ColdFusion8/wwwroot, on OS X, it is /Applications/ColdFusion8. I have been able to set up a linked resource path variable for both CF_FLEX_SERVER and WEBSERVER that I then reference using the ${WEBSERVER}/myProject syntax.

So far, it seems to work pretty well, but I find there are a few places that it still has issues. Specifically, in the .project file you find something like:

<linkedResources>
 <link>
  <name>bin-debug</name>
  <type>2</type>
  <location>c:/inetpub/wwwroot/myProject-debug</location>
 </link>
</linkedResources>

Unfortunately, if I try to change the location entity to ${WEBSERVER}/wwwroot/myProject-debug, flex throws a compiler error. That's a shame, because pretty much everything else works.

+2  A: 

Since Flex Builder is written on top of Eclipse, it can integrate with Subclipse. This allows you to pretty easily tag files as 'SVN ignore' to avoid project-specific settings. I've used this to add my Flex projects to an existing SVN repository, which I've checked out to multiple sites. I have noticed a few issues here and there (some checkins get errors, but they're relatively rare), but it generally works.

bedwyr
So when you introduced your second developer to the project, what was the process they used to check out the files from svn?
anopres
Checking out from SVN was pretty easy. I just added Subclipse to their version of Flex Builder and connected to the Repository. From there I just checked out the Flex project and continued from there.
bedwyr
For me, it looks like I need to pull .properties out of source control since the OS X vs. Vista pathing is a mess. I'm tinkering with a .properties_template that I might put under source control that can be quickly modified.
anopres
Eclipse on the mac rewrites the path with linked variables and Vista just throws a compile error.
anopres
Ahh, that's interesting. I worked with 2 Windows XP servers with a Solaris-based repository. I never came across properties problems because of differing operating systems.
bedwyr
+2  A: 

I have worked through this problem before and generally set my projects up as such:

Application/trunk/source/ <-- workspace is here (can also be in 'trunk') Application/trunk/source/Application <-- Application here

I DO keep my project (.actionScriptProperties, .flexProperties, .project, .settings) in SVN, but NOT my workspace (.metadata) because it's too big.

I find that importing projects via Import -> Flex Project enforces alot of restrictions. For example, if your workspace was in the 'trunk' directory above then importing as a Flex Project will cause the project to be copies into trunk/Application or simply complain about the location.

The better way to go about it is to create the workspace and then Import -> [General] Existing Projects into Workspace. The only difference is that you will have to manually add the Flex Development perspective.

Edit: I'd also recommend setting your compiler options to "Use default SDK" and then setting the appropriate SDK as default. This will prevent commit-tennis when each developer names his SDK differently.

Richard Szalay
How would this have worked if it was somebody else's project and you were the second developer to get the code? I'm trying to use the linked resources variables, but they seem not to work in some places.
anopres
I'm not sure about linked resource variables. But I would do a subversion checkout, then switch workspace to /trunk. Once the workspace has been created, import the project like I mentioned in my post.
Richard Szalay