Chapter 16. Returning a Project to Flash Catalyst

IN THIS CHAPTER

  • 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.

Flash Builder Projects in Flash Catalyst

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.

Note

Many of the Catalyst developers at Adobe have stated in a variety of public forums that they are working on solutions to this issue and hope to resolve it in a future version of Catalyst.

Merging Projects

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

Merging Projects

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 (

Merging Projects

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.

Importing changes into Flash Builder

Figure 16.1. Importing changes into Flash Builder

Using a Flash Catalyst Library Package to Manage Changes

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:

  • Component skins

  • Item renderers

  • Custom components

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.

Note

See Chapter 4 for details on creating a wireframe application.

Create an FXPL file

The FXPL file can be created in Catalyst by right-clicking (

Create an FXPL file
Exporting an FXPL file in Catalyst

Figure 16.2. Exporting an FXPL file in Catalyst

Import an FXPL into Flash Builder

You can import an FXPL file into a Flash Builder project (see Figure 16.3) by choosing File

Import an FXPL into Flash Builder

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.

Importing an FXPL file into Flash Builder

Figure 16.3. Importing an FXPL file into Flash Builder

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:

  1. Modify the project's properties by choosing Project

    Importing an FXPL file into Flash Builder
  2. In the Properties dialog box, click Flex Build Path.

  3. Make sure you are on the Library Path tab (see Figure 16.4).

  4. Click Add Project.

  5. Select the library project from the list that appears.

Changing library items in Catalyst

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.

The Flex Build Path tab of the Project Properties

Figure 16.4. The Flex Build Path tab of the Project Properties

Warning

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.

Summary

This chapter discussed the workflow between Flash Builder and Catalyst. In it, you learned:

  • Why Flash Builder projects cannot be directly opened in Catalyst

  • How to merge changes between projects in Flash Builder

  • How to create and use Catalyst library projects

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.162.49