Using Flex Builder 3 with Subversion on Assembla


Source control. We all know we should be using it. The peace of mind benefit alone is enough to aid in speeding development – a programmer who isn’t concerned with self-versioning his files is a more productive one. Then there are the other benefits, like code comparison and streamlining workflow for a team-built project.

Setting up Trac and Subversion can be somewhat painful the first time around, so if you’re looking for a quick and easy hosted system (with a whole mess of other features, too), I suggest taking a look at Assembla.com.

Adobe Flex Builder 3

This guide assumes that you already have Flex Builder 3 installed and ready to go. You might even have a project already set up that you’d like to version control. If you don’t already have the software, you can download a 60 day trial of Flex Builder on Adobe’s site.

Assembla.com

For those of you who aren’t familiar with Assembla, it provides software development spaces, focusing on rapid application development and agile programming methods. I’ve found it to be an excellent solution for working with local or distributed teams with its wikis, discussion and chat, e-mail and RSS alerts, milestones and ticketing, and the killer app: hosted Subversion and Trac (Git is also availble for those interested). And it’s free with a 500 megabyte storage ceiling, and monthly commercial spaces of 5 gigabytes are available.

Signing up for Assembla is very quick and easy.

Once you’re signed up and logged in, let’s go ahead and create a space for our project. Click the Create a New Space button on the Start page. Feel free to read through the various options (separated into tabbed sections) before setting up your new space. At a minimum you’ll need the “Software developers (trac)” option for the purposes of this guide. Also, depending on how common the space URL is that you want to use, you may need to come up with an alternate.

I’ve set up a collaboration space for my ToledoMenu.com site. Currently the development is handled by just me, and I’m only using it for Subversion and bug tracking with Trac, but that could change as needs for the site grow and features and staff are added.

Now that we have a space set up you can take some time to get acquainted with the Assembla interface. I’ll wait for you and when you get back we’ll look at setting up Subversion and Trac for use with Flex Builder.

Trac/Subversion

Welcome back. Go ahead and click the Trac/SVN tab. You’ll be presented with two columns, one for SVN and the other for Trac. Take note of the SVN URL. For example, if the project space URL you chose earlier was something like toledomenu, then your SVN URL would be http://tools.assembla.com/svn/toledomenu. We’ll be using this info in Flex Builder to access the SVN repository.

Setting up Flex Builder to use SVN with Subclipse

Out of the box, Flex Builder 3 is not equipped to use Subversion. It’s something that can be remedied with a few Eclipse updates, and those steps are outlined below. I’ll be showing you how to install the Subclipse plug-in.

Flex Builder is built on the excellent Eclipse platform. Traditionally used as an IDE for Java development, it has been repurposed to do Ruby on Rails, Python, PHP, and even .NET. Because it is open and extensible, it has also been used as a baseline to build additional IDEs on top of, like Aptana and Flex Builder.

Eclipse uses what are known as update sites for plugins and adding extra functionality. These can be downloaded as Zip archives, but are usually straight URLs to the desired plug-in bundle. To get Subversion in Eclipse, we need to do add a couple of these update sites – one with some Java related features missing in Builder, and the other with the appropriate version of Subclipse.

  1. Fire up Flex Builder
  2. In the menu, go to Help > Software Updates > Find and install…
  3. Select the “Search for new features to install” radio button and press Next
  4. Select the “Europa Discovery Site” checkbox and press Finish
  5. Select a mirror and press OK
  6. Expand “Europa Discovery Site”
  7. Expand “Java Development”
    • Select the PDE (Eclipse plug-in development environment) checkbox
    • Select the JDT (Java Development Tools) checkbox
  8. Click the “I accept the terms in the license agreement” radio button and then click Next
  9. Click Finish and restart Flex Builder when prompted
  10. Repeat steps 1-3
  11. Click the “New Remote Site” button
  12. Click Finish
  13. Expand “Subclipse Update Site”
  14. Expand “Subclipse Plugin”
  15. Choose Subclipse 1.2.x (x will be the current revision number) and then click Next
  16. Click the “I accept the terms in the license agreement” radio button and then click Next
  17. Click Finish and restart Flex Builder when prompted

After this process is complete, Subclipse will be available for use.

Setting up Subclipse to work with Assembla

With Subclipse now installed, we can use the SVN URL noted earlier to access our repository.

Open the SVN Repository Exploring Perspective by going to Window > Perspective > Other… and expand the SVN folder. Select “SVN Repository Exploring” and click OK.

Click the Add SVN Repository button. It should be at the right edge of the new leftmost panel (labeled “SVN Repository”). In the dialogue box that appears, add the URL from earlier (in the form http://tools.assembla.com/svn/[your repository name] ) and click Finish. Your repository is probably empty at this point, so you’ll want to add a new or existing project to it to share.

Sharing a Flex Builder project with Subversion

To share a project to SVN, follow the steps for creating a new Builder project, or use an existing project. At the top-level folder of your project in the Flex Navigator panel (switch to the Flex Development perspective if necessary), right-click and about 3/4 of the way down the menu look for the item marked Team > Share Project… and click it.

You’ll be prompted to select a repository type (CVS or SVN in the dialogue. Select SVN since that’s what we’ll be using.) Click Next. Select the “Use existing repository location:” radio button and click Next.

Select use project name as folder name and click Finish.

After the import is complete (you’ll be prompted for initial commit comment), your Flex project is now shared on your Assembla Subversion repo! Now you can version your code and work on your project with a local or distributed team with ease.

In a future article I’ll be talking about setting up Assembla Trac ticketing to work directly in Flex Builder using the Mylyn plug-in. This is a huge productivity booster, so definitely stay tuned! Thanks for reading.

Copy from source: codehinting.com/archive/using_flex_builder_3_with_subversion_on_assembla

Advertisements

3 comments on “Using Flex Builder 3 with Subversion on Assembla

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s