Author Archive: Vince Genovese

Flex Tutorials for Data Access with Flash Builder

We’ve just updated the Flex Tutorials for Data Access with Flash Builder. In addition to making a few corrections to the original versions, we’ve included examples of using server-side typing.

The Data Management tutorial accesses employee data from the server. The new version of this tutorial illustrates both server-side and client-side typing to define the Employee data type.

With client-side typing, you use Flash Builder wizards to introspect the data on the server and define the Employee data type in client code. With server-side typing, server code defines the Employee data type.

Both PHP and ColdFusion let you define custom data types in server code. Flash Builder recognizes the custom data type during introspection of services. You do not have to walk through the wizard screens to configure the return data type.

Whether you use server-side or client-side typing is a developer preference. Server-side typing can help enforce data integrity on the server and simplify the Flash Builder workflow. Client-side typing simplifies the service coding while using Flash Builder to define the custom data types.

Extending Flash Builder

The documentation on Adobe Flash Builder Extensibility API Reference has been updated for Flash Builder 4 and is now available. The documentation also contains links to videos and examples that show how to extend Flash Builder.

Use Flash Builder Extensibility to customize Flash Builder according to your development needs. You can modify the behavior of Flash Builder and specify how custom controls appear in Flash Builder Components view and Properties view.

Using the Design View Extensions for Flex 4, you can now feature custom components with the Flash Builder native components. This allows you to enable features, such as drag and drop, for custom components.

Code Model and Design Model have been updated for Flash Builder 4. Design View Extensions Kit for Flex 4 is now public. This kit contains example projects that show how to incorporate custom components into Flash Builder.

There is also an Early Access version of DCD Extensibility. DCD Extensibility allows you to update Flash Builder data services tools to access additional services.

Server-side typing for Flash Builder data access tools (PHP)

Flash Builder 4 introduces a rich set of tools for configuring access to data services. The Flash Builder documentation and tutorials can help you get started with writing PHP and ColdFusion services as well as configuring your applications to access these services.

However, the Flash Builder documentation examples and tutorials use client-side typing. You can also write PHP and ColdFusion services that implement server-side typing. Server-side typing simplifies the workflow in Flash Builder, and also provides server code that is easier to understand and maintain.

Client-side typing

Flash Builder uses client-side typing for services that do not specify data types for arguments or return values. To implement access to these services, Flash Builder needs to know the data types for the arguments and return values. Flash Builder tools introspects the services, prompting you to configure the necessary custom data types.

Here are links to the Flash Builder tutorials that use client-side typing:

This article provides documentation and an example for server-side typing in PHP. Later, I’ll provide a separate example for server-side typing in ColdFusion.

Server-side typing

Both PHP and ColdFusion allow you to define custom data types in server code. Flash Builder recognizes the custom data type during introspection of services. This simplifies the access to the service – you do not have to walk through wizard screens to configure custom data types.

This blog post contains an example for PHP that shows how to implement server-side typing. This basic application lists employees from a database. It also includes an input form to add new employees. This blog post contains the full source listing for both the client and server, plus a mini-tutorial.

StrongTypePHPApp.jpg

Continue reading…

Test Drive the Flex 4 Beta Tutorials

Note: Flex 4 shipped on March 22, 2010. The final version of the tutorials is available athttp://help.adobe.com/en_US/Flex/4.0/FlexTutorials/index.html

Flex 4 / Flash Builder 4 Beta Docs Updated

Note: Flex 4 shipped on March 22, 2010.

The final version of the usage content is available at http://help.adobe.com/en_US/flex/using/index.html.

The Platform Reference is available at hthttp://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/index.html.

More Specs Available for Gumbo (the Next Version of Flex)

New specifications for Gumbo, the next version of Flex, are now available. Go to the Gumbo page of the Flex Open Source site to read, and comment on, the plans for Gumbo.

Of particular interest is the Skinning and SkinnableComponent spec, which is a must read for those interested in the new Gumbo framework. There also have been modifications to the Gumbo Architecture whitepaper.

Other new specs that are available include those for TrackBase, Range, Slider, and ScrollBar.

Flex Builder 3 Extensibility API Reference

Flex Builder 3 provides an API to extend Flex Builder. Basically, these are Javadocs for developers familiar with Eclipse and who want to write extensions to Flex Builder.

I mention this here because I just now discovered that this documentation is only available from Flex Builder local help. It does not show up in our LiveDocs site, and search engines will not point to it (They will now, thanks to this blog entry :-)

Here is where you find this documentation in Flex Builder 3:

From the Help Menu Select Help Contents. Then expand the Adobe Flex Builder 3 Extensibility node and click Flex Builder 3 Extensibility API Reference.

The reference contains APIs to extend the Code Model and the Design Model. Each section also contains an introduction that helps you get started.

Actually, I don’t know how to use this API or I’d write more about it. But I did find this blog entry from the Thinking Digital archives that enhances the introductory material provided in Flex Builder help.

We are also interested if anyone is actually using this API reference. Comments are welcome.

Learn About Gumbo: The Next Version of Flex

Gumbo is the code name of the next version of Flex. New information about Gumbo has been made available on the Gumbo page of the Flex Open Source site.ᅠ

Highlights of the new information about Gumbo include the following:

1. Themes of the Release
Gumbo is being planned around three primary themes:

  • Design in Mind
    A framework for continuous collaboration between designer and developer.
  • Developer Productivity
    Improve compiler performance and add productivity enhancements.
  • Framework Evolution
    Take advantage of the new Flash Player capabilities and add features required by common use-cases.

2. Recorded Presentations

3. White Paper: An Introduction to the Gumbo Component Architecture
This white paper provides a comprehensive look into our plans for the next version of Flex.

4. Gumbo Feature Specifications
Read, and comment on, the recently published specifications for Gumbo. Currently, there are eight specs available, with more on the way.

The Security Sandbox in Flex Builder 3

We recently received a question from a user about Flex Builder security sandbox settings. I thought the answer to this question would be of general interest.

Question: In Flex Builder 2, the security sandbox settings for both debug mode and release mode was local-trusted. In Flex Builder 3, why is release mode now local-with-network?

Short Answer: Whether a given SWF, when run locally in a non-trusted location, is local-with-filesystem or local-with-network is a compilation setting. This setting is stored as a flag in the SWF header and is the only compiler flag. The default is local-with-network and has not changed in Flex Builder 3.

What is new with Flex Builder 3 is that we no longer put the release SWF inside the trusted debug output folder by default. The advantage to the developer is that the release SWF will run in the same security sandbox in which it will be deployed. Thus you get accurate application behavior instead of the more permissive local-trusted, which is only available to the developer.

Detailed Answer: In Flex Builder 2 we put the release SWF alongside the debug SWF, which was inside an output folder that we configured the flash player to trust for the following reason:

You could click, debug, and launch your application and have it access network services without first configuring the project to host the SWF on a web server (and thus have to launch it with a proper http:// URL). Basically, you can launch your application from the file system using file:/// URLs.

The problem with this approach is that when testing the release SWF, even if you edited the launch URLs to use http://, you would be running the application out of local-trusted instead of the actual deployment sandbox (remote).

There are other problems with this arrangement, such as facilitating the accidental deployment of both debug and release SWFs in the output folder.

So, for Flex Builder 3 we separated the notion of the Run button from the release SWF. The Run button merely launches the debug-capable SWF with debugging turned off. The Export Release Wizard creates the actual release SWF. Flex Builder 3 encourages you to put the release SWF somewhere other than your debug output folder. Thus, to test the release version, you must launch and test it as an end user would using a browser and web server (that is, unless you actually want the end user to try to run it locally).

Note: Use the custom compiler option, use-network=false, if you want to override the Flex Builder default compiler option. This would change the settings to local-with-filesystem.

Master-Detail Flex Application

I’m an Adobe writer assigned primarily to Flex Builder and the Flex SDK. I joined Adobe in October of 2007 and have spent the first few months learning and using Flex and Flex Builder.

I’ve recently completed my first Flex application, and am using this blog to write about my learning experience, and also to describe some of the concepts behind the application that make it work. Actually, these are two applications that work together, vRadio and RadioLoginDB.

These applications illustrate how to use Flex to create a master-detail application that accesses data from a PHP server, and also incorporates PHP sessions.

At the end of this posting is a list of documentation sources I used to learn how to create the applications. I also have links to the source files.

vRadio and RadioLoginDB applications

I have always been a fan of Community Radio, and in the past I’ve Googled “Community Radio” to find new stations to listen to over the web. I created the vRadio application to provide a Flex alternative that lists Community and Talk radio stations, providing details about each station including station name and location, station graphic, and clickable links to open the station. RadioLoginDB is a CRUD application to update the database of radio stations used by vRadio.

vRadio is a Master-Detail application, and corresponds to many type of applications that present stored data in a variety of presentation formats, and also provide forms for updating the data.

What is interesting about the the vRadio application is the way Flex handles XML data using the E4X format. By providing an XML feed into the vRadio application, the application displays the XML data in a tree view. When the user clicks a node in the tree, details are displayed.

Continue reading…