Flash Builder projects and Catalyst
Merge projects
Use a library package to manage changes
After you import your Catalyst project into Flash Builder, development of the project should be done entirely in Builder. Full round-trip editing between Catalyst and Builder is not available.
However, in real-world environments, there may be situations where some updating or editing of the project will be easier in Catalyst than in Builder. For example, if your client decides to change some aspect of the look and feel of the project, such as deciding that a button should be a different shape or color, you may want to make the necessary modifications in Catalyst.
While no direct path exists to open a project in Catalyst, it is nonetheless possible to work between the two applications.
Once a project has been modified in Flash Builder it's no longer possible to open and edit that file in Catalyst. Attempting to do so will result in an error. Even though Flash Builder contains a menu item to export the project as an FXP, Catalyst will not be able to open the project.
The reason for this limitation is based on the differences in the workflow between Flash Builder and Catalyst. A Flex developer working exclusively in Flash Builder might begin by working in Design mode to create the basic interface of the application, but will likely very quickly switch to working in code. Ultimately, many of the changes the developer makes in code will result in Design mode being unable to display the project any longer.
In Catalyst, all you have to work with is Design mode, so once the project reaches the stage where it cannot be rendered in Design mode, it's no longer logical to work within Catalyst. There are too many variables to consider as to when a project might reach this point, so the Catalyst team decided it would be best not to allow projects that have been edited in Flash Builder to be opened in Catalyst.
Because projects cannot be directly opened by Catalyst once they have been edited in Flash Builder, it's necessary instead for the designer to maintain a copy of the original FXP file created in Catalyst. That way, if the design of the project needs to be changed after it has been handed off to the developer, the designer will have access to a file that can be opened and modified in Catalyst.
Once the designer completes the changes in Catalyst, the developer can merge the file back into Flash Builder and continue working on the project (see Figure 16.1). The developer will use the same menu option to import this file as he would have when importing a new project: File
Flash Builder includes a merge tool to assist the developer in identifying changes and merging these changes into the project without disturbing the work already done in Flash Builder. The developer can right-click (
Ideally, the developer will not be making modifications to the skins or other visual aspects of the project within Flash Builder. Any changes identified in Flash Builder to those files should represent changes made in Catalyst that the developer can accept simply by clicking the appropriate button to copy the changed code from the new project into the old one. At that point, the developer can delete or ignore the new project and continue work on the original.
An alternative approach to managing the designer/developer workflow in Catalyst and Flash Builder is to use an alternate file type recognized by Catalyst: FXPL or Library Package file. Unlike a more traditional FXP file, which contains both the visual assets of the project as well as a main application file to manage those assets, the FXPL file contains only the visual assets:
In order to use FXPL files, you need to maintain your main application file and other supporting MXML and ActionScript files in a separate Flex project. This could be a project designed using the wireframe components in Catalyst or one created from scratch in Flash Builder.
See Chapter 4 for details on creating a wireframe application.
The FXPL file can be created in Catalyst by right-clicking (
You can import an FXPL file into a Flash Builder project (see Figure 16.3) by choosing File
Once imported, your library project can be associated with any Flex project. In fact, a single library file can be associated with any number of Flex projects.
This association is done by defining the library project's location as part of a Flex project's build path. You can add the project to the build path by following these steps:
Modify the project's properties by choosing Project
In the Properties dialog box, click Flex Build Path.
Make sure you are on the Library Path tab (see Figure 16.4).
Click Add Project.
Select the library project from the list that appears.
As changes are needed in the project's visual assets, the designer can simply reopen the project file in Catalyst and make the needed changes. Then the designer can reexport the library project, replacing the original library project with the new one. These changes are available automatically in the Flex project.
For this workflow between designer and developer to work, the developer must be sure not to edit the code in the library files directly within Flash Builder. Doing so will result in the changes being lost the next time the designer modifies the assets and overwrites the library package. Instead, all changes need to be made in Catalyst.
3.16.81.33