Search Flex Samples

About Flex Builder projects

Flex Builder uses a traditional approach to software development: grouping the resources (folders and files) that constitute an application into a container called a project. A project contains a set of properties that control how the application is built, where the built application resides, how debugging is handled, and the relationships to other projects in the workspace.

To manage projects, you use the Flex Navigator view, which lets you add, edit, and delete resources. You can also close projects within a workspace, import resources, and link to external resources.

In addition to Flex projects, Flex Builder provides a basic project type called an ActionScript project. Using an ActionScript project, you can code and debug ActionScript applications that directly access the Adobe Flash Player APIs and are compiled into SWF files. ActionScript projects do not use the Flex framework or MXML language.

Flex and ActionScript applications

Using Flex Builder, you can create Flex and ActionScript applications. You compile Flex applications into stand-alone SWF files. For more information, see Working with Projects and About ActionScript projects.

Adobe AIR applications

With Flex Builder you can debug, package, and manage AIR projects. Flex Builder enables you to run Flex applications in AIR. You create AIR projects by using the New Flex Project wizard. Use the Export Release Build feature to generate a release-quality, installable AIR package. For more information, see Developing AIR Applications with Adobe Flex 3.

Flex libraries

You also use Flex Builder to build custom code libraries that you share between your applications or distribute to other developers. A library project generates a SWC file, which is an archive file for Flex components and other resources. For more information, see About library projects.

Applications contained in projects

To begin building a Flex or ActionScript application in Flex Builder, you must first create a project. When you create a Flex project, a main application file is created for you. Then you add other resources such as MXML application files, custom MXML component files, ActionScript files, and all of the other assets that make up your Flex application. When you create an ActionScript project, a main ActionScript file is created; then you can build an application by using ActionScript and the Flash Player API. For more information, see Creating Flex projects and Managing projects.

Projects managed in workspaces

Projects are managed from within a workspace, which is a defined area of the file system that contains the resources (files and folders) that make up your applications. By default, your projects reside within the workspace. You can, however, create projects that are located outside the workspace; Flex Builder automatically links them to the workspace. To switch workspaces, you must restart Flex Builder.

More than one project in each workspace

You can add as many projects to a workspace as needed. All of your projects are displayed in the Flex Navigator view, and you can manage them as you need to--adding resources, organizing your projects into folders, and building projects in the workspace. For more information, see Managing projects and Creating folders and files in a project.

External linked resources

In addition to the resources in your projects, you can link to resources outside a project and workspace. Linked external resources appear as part of the project but reside outside the project's location. For more information, see Linking to resources outside the project workspace.

More than one application in a project

Flex Builder lets you define more than one file in your project as an application. When you create a project, Flex Builder generates a main application file that serves as the entry point into your application, and the compiler uses this file to generate the application SWF file. However, if your project is complex, you can create additional application files. All application files must reside in the src folder under the root folder of your project. For more information, see Managing project application files.

Support for Multiple Flex SDKs

You could have projects that are in progress or an older project code base that must be maintained. With Flex Builder, you can work with different versions of the Flex SDK. To specify the installed SDKs, you configure the Flex Builder workspace, which provides a default SDK for any project. After you set up a project, you can add, remove, or edit SDK configurations on the Installed Flex SDKs Preferences page or the Project Preferences page. For more information, see Using multiple SDKs in Flex Builder.

Automatic project builds

By default, your project is automatically built any time you save changes to a file. You have complete control over how and how often your applications are built. If you have no special requirements for customizing the build, it works transparently and automatically generates the application SWF files. For more information, see Building Projects.

Export Release Build

When your application is ready to deploy, you use the Export Release Build wizard to create a release-quality non-debug SWF of your Flex or ActionScript application. The wizard copies required assets to a bin-release folder separate from the debug version, Export Release Build with or without source code. This version is an optimized production build that can be viewed by end users. For Adobe AIR projects, AIR applications are exported to an AIR file. You use Export Release Build to create a digitally signed AIR file, which users install before running an application. For more information, see Export Release Build.

Custom Ant scripts

Apache Ant is a Java-based build tool that you use to create custom scripts for building your Flex applications in Flex Builder. You use Ant to modify and extend the standard build process. For more information, see Customizing builds with Apache Ant.

Project types

You use Flex Builder to create project types in the following configurations.

Flex projects

Flex project configuration options are based on how your Flex application accesses data and if you have Adobe LiveCycle Data Services ES installed. You can create Flex projects for web (runs in Flash player) or desktop (runs in Adobe AIR) applications. Here are the options:

None If you do not have an application server, this basic configuration lets you specify the output folder for your compiled Flex application. You also set the build paths for your new project.

ASP .NET With Microsoft Windows and Microsoft Visual Web Developer installed, you can create Flex projects that use ASP .NET Development Server for deployment. Also, if you have access to Internet Information Service (IIS), you can create Flex projects with a Flex output folder under IIS.

ColdFusion This project configuration lets you create Flex projects that use ColdFusion with LiveCycle Data Services or ColdFusion Flash Remoting. If neither option is selected, a ColdFusion project is created with a Flex output folder under web root (or virtual folder).

J2EE This project configuration lets you create Flex projects that use J2EE with or without remote object access service and LiveCycle Data Services. When no option is selected, a Flex output folder is created under the Java application server root. If you select the Use Remote Object Access Service option, you can use Flex with LiveCycle Data Services and your project is deployed on a LiveCycle Data Services server. With the Eclipse Web Tools Project (WTP) plug-in installed, you select the Create Combined Java/Flex Project Using WTP option to create combined Java/Flex projects with or without remote object access service. For locally compiled projects with WTP, projects are deployed on your J2EE server.

You can use LiveCycle Data Services with or without WTP. If you use it with WTP, the project will not be deployed on the local LiveCycle Data Services server, but it will be deployed using WTP features.

PHP This project configuration lets you create Flex projects that have a Flex output folder under the Apache/IIS web root (or virtual folder). You configure the URL and run and debug your Flex application by using your PHP server or scripts.

Other If you have an application server other than those previously listed, this option lets you specify the output folder for your compiled Flex application. You can also set the build paths for your new project.

ActionScript projects

Based on the Flash API, not the Flex framework, ActionScript projects let ActionScript developers use Flex Builder to code, build, and debug ActionScript-only applications. Because these projects do not use MXML to define a user interface, you cannot view the application layout and design in Design mode. You work exclusively in the source editor, the debugging tools as necessary, and then build the project into SWF application files to preview and test your application in a web browser or stand-alone Flash Player. For more information about ActionScript projects, see About ActionScript projects.

Flex library projects

Library projects are used to package and distribute components and other resources. They generate SWC files that you add to other projects or distribute to other developers. For more information, see About library projects.

Projects in the Flex Navigator view

All projects in a workspace are displayed in the Flex Navigator view, as the following example shows. Using this view, you manage your projects by adding and deleting resources (folders and files), importing and linking to external resources, and moving resources to other projects in the workspace.

Flex Navigator view

Flex Builder provides wizards to help you create projects.

  • The New Flex Project wizard automatically generates Flex project configuration files, the output (bin) folder where your compiled application resides, and the main application file. It also lets you create an Adobe AIR project.
  • The New ActionScript Project wizard generates a main ActionScript application file.
  • The New Flex Library Project wizard helps you generate a Flex Library Project that you use to package and distribute components and other resources.

From the Flex Navigator view, you can open the project resources for editing. For example, you can edit MXML and ActionScript in blocks and CSS in blocks, or you can switch to Design mode and visually manipulate components and controls to create the application's layout and behavior. For more information about working with the Flex Builder editors, see About code editing in Flex Builder and Building a Flex User Interface.

Then you add projects, files, and folders, and organize and manage them as needed (see Creating folders and files in a project).

You can also modify the Flex Navigator view's appearance. For example, you can expand and collapse projects and folders, limit which projects and resources are visible by creating a working set (a collection of resources), create display filters, and sort resources by name and type. For more information about modifying views, see Navigating and Customizing the Flex Builder Workbench.

Most menu commands that you use in the Flex Navigator view are also available from the Flex Navigator view's context menu. For example, instead of selecting File > New, you can right-click (Control-click on Macintosh) in the Flex Navigator view, and select New from the context menu.

For more information about working with projects in the Flex Navigator view, see Managing projects and Creating folders and files in a project.

Project resources

Flex and ActionScript applications support several standard resource types (MXML, ActionScript, and CSS). The following table lists the resource types that you can add to your projects. (To add these resources, select File > New.)

Resource type

Description

ActionScript Class

An ActionScript class file. When you add this type of resource, the New ActionScript Class wizard prompts you for class definition elements, such as the superclass, interfaces, and so on. For more information about working with ActionScript in Flex Builder, see Creating an ActionScript class.

ActionScript File

A text file template for creating ActionScript functions.

ActionScript Interface

An ActionScript interface file. When you add this type of resource, the New ActionScript Interface wizard prompts you for interface definition elements such as extended interfaces and the package in which they reside. For more information about working with ActionScript in Flex Builder, see Creating an ActionScript interface.

ActionScript Project

An ActionScript project based on the Flash API, not the Flex framework. ActionScript projects let ActionScript developers use Flex Builder to code, build, and debug ActionScript-only applications. For more information, see Creating ActionScript projects

CSS File

A text file template for creating a Cascading Style Sheets file.

File

An unformatted text file. For more information, see Creating folders and files in a project.

Flex Project

A Flex project contains a set of properties that control how the application is built, where the built application resides, how debugging is handled, and the relationships to other projects in the workspace. For more information, see Setting Flex project properties.

Flex Library Project

Flex Library Projects are used to package and distribute components and other resources. They generate SWC files that you add to other projects or distribute to other developers. For more information, see About library projects.

Folder

A standard file system folder for organizing the contents of your projects. For more information, see Creating folders and files in a project.

MXML Application

A standard Flex application file with the tag as the root MXML element. A Flex project can have more than one application file. For more information, see Managing project application files.

MXML Component

A standard Flex component file with the tag as the root MXML element. For more information, see Creating MXML components visually.

MXML Module

A resource that can be added to an existing application project or created separately, but always associated with one application. For more information on using modules, Creating modules in Flex Builder.

Other

Other file types that are registered in Flex Builder. Select File > New > Other to add any other file types. For example, if you have a Java plug-in installed in Flex Builder, you can add new Java classes, interfaces, and packages.

When a file type is registered in Flex Builder, a corresponding editor is also available in the workbench. For more information, see Associating editors with file types.

You can always add unregistered file types to your projects by importing them. For more information see Importing projects

0 comments:

Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples