Flex SDK and Flash Builder 4: An In-Depth Interview with Andrew Shorten
Recently, Adobe announced the release of the Flex 4 SDK along with Flash Builder 4, which was formerly known as Flex Builder 3. InfoQ spoke with Andrew Shorten, Senior Product Manager at Adobe, to learn more about these releases, how they fit into the overall Flash platform, and what to expect in the future.
InfoQ: With the move from Flex 3 to Flex 4, there seemed to be some changes to the overall Flash platform, including a renaming of Flex Builder to Flash Builder. Can you please explain that in a bit more detail?
Andrew Shorten: After the release of Flex Builder 3, we found that it wasn't just Flex developers who wanted to make use of the code editing, debugging and profiling features that were available in the product; developers who were writing ActionScript-only projects and those working with Flash Professional, but who were also spending a significant amount of time coding, were turning to Flex Builder.
The appeal of Flex Builder to an ever-widening audience of non-Flex developers, combined with the increasing momentum behind the Flash Platform and recognition that whether or not the Flex framework was involved, developers were building Flash applications, gave us the opportunity to evaluate whether a name change made sense. Now, with the release of Flash Builder 4, I'm really glad that we changed the name - Flash Builder continues to offer Flex developers the most productive development environment available, but also adds workflows for those using Flash Catalyst, includes new support for Flash Professional projects and offers robust code editing capabilities demanded by ActionScript developers.
In essence, we've simply acknowledged that Flash Builder is the professional development environment for anyone building applications that target the Flash Platform - i.e. if you're writing MXML and/or ActionScript code then Flash Builder should be for you. The role of Flex is also more clearly defined now - Flex relates purely to the Open Source SDK that can be used to build rich Internet applications.
Aside from the change of name, we added 70+ new features in Flash Builder 4 - many of these relate to code editing, debugging and profiling and so will improve developer productivity for those building ActionScript or Flex applications. Even for the Flex-specific features added in Flash Builder 4, the vast majority will be of benefit to those building applications based on the Flex 3 SDK, as well as those undertaking projects using Flex 4.
I've blogged about the full list of new features in Flash Builder 4 and provided links to documentation so that people can explore the new features that most interest them.
InfoQ: What's my migration path as an existing Flex 3 developer to Flex 4? What do I need to do to prepare my projects to run in Flash Builder 4?
Andrew Shorten: The good news is that you can move existing Flex 3 applications, developed using Flex Builder 3, to Flash Builder 4 without needing to migrate the application to use the Flex 4 SDK - this enables you get the benefit of the new Flash Builder 4 features straight away on an existing project.
I've written an article to explain the process of importing projects into Flash Builder 4, but the key thing to remember when moving projects is to specify during the import process that you want to continue compiling against the existing Flex 3 SDK.
As and when you are ready to migrate a Flex 3 application to Flex 4, you should not expect to do very much work. Other than bug fixes and a change in the default theme, you can look forward to your application generally working the same (or better) than it did in Flex 3.
If you want to make use of the new features in Flex 4, you will need to make updates to your code so as to reference the new Flex namespace as well as move non-visual properties to a declarations tag and update state code to use the new in-line syntax - additionally, should you wish to use the new Spark components, Spark-based visual effects or take advantage of the new Text capabilities added in Flash Player 10 then you will need to undertake additional migration work.
Adobe has published a migration guide (PDF) to help developers with the task of updating an existing application and we also have resources on the Adobe Developer Connection site that provide guidance on this topic.
InfoQ: What are the major new features that have arrived with Flex 4 and Flash Builder 4?
Andrew Shorten: In the Flex 4 SDK, we've implemented a completely new component and skinning architecture (Spark) that supports a level of expressiveness in RIAs not seen previously. With the new Spark component and skinning architecture, component logic is "divorced" from component visuals such that customizing either the behavior or look and feel of the component is much more straightforward. Additionally in the Flex 4 SDK, we have improved the Flex compiler performance, enhanced numerous language and infrastructure features and provided first-class support for the new runtime capabilities in Flash Player 10.
In Flash Builder 4, we've made it easier than ever to connect to back-end services with a complete set of data centric development features, enabled new design and development workflows with Flash Catalyst and Flash Professional; in addition, we've enhanced the core code development features that are essential to developer productivity.
In this area alone, we've implemented new refactoring options, improved the debugger to support conditional breakpoints, watchpoints and expression evaluation, added code generation features and made it easier to test applications with the new network monitor and FlexUnit support. As I mentioned above, most of these improvements are available to developers building applications that use either the Flex 3 or Flex 4 SDK, so Flash Builder 4 will help in your overall development even if you aren't yet ready to use the new Spark components.
InfoQ: How has the component model changed between Flex 3 and Flex 4?
Andrew Shorten: One of the major additions to Flex 4 was a new skinning and component architecture for Flex user interface components called Spark.
Spark offers designers and developers a seamless way to customize the visuals and behaviors of a Flex component in a much more direct and effortless manner. The main tenet of the Spark architecture is supported by a skinning model that provides separation of a component's visual elements from its logic. This separation gives designers and developers more freedom, because the visual elements of a Flex component can be designed in an unfettered manner, independent of the implementation of the logic powering the component. After learning the Spark skinning model, you can build expressive and robust Flex components in a very short amount of time.
InfoQ: There has been recent discussion of a larger Flash Platform, for instance with the acquisition of Omniture a few months back - can you tell us more about this Flash Platform?
Andrew Shorten: The Flash Platform encompasses the client runtimes, frameworks, tools, servers and services that designers and developers can leverage to build applications that deploy to an ever-increasing range of internet-connected devices.
As an integral part of the Flash Platform, Flash Builder lets developers build cross-platform rich Internet applications and content using the Flex framework, which can deployed to the web using Adobe Flash Player or as a desktop application using Adobe AIR. In the future, it will also be possible to use Flash Builder to develop Flex applications that target mobile phones, tablets and other devices that have Flash Player or Adobe AIR available.
From an integration perspective, we've focused on providing streamlined workflows with Adobe's servers (such as ColdFusion and LiveCycle) and service offerings (such as those recently acquired with Omniture), but of course developers can also connect and exchange data with a host of other non-Adobe technologies.
In Flash Builder 4, we added a new set of data centric development features that enables you to introspect server-side services, have Flash Builder generate the client-side representation of the service and associated data models and allow you to drag and drop service operations to visual components so as to bind the returned data - this makes it incredibly quick to integrate data into a Flex application and works with XML, PHP, ColdFusion, Java, Web Services and (through a third-party adapter) .NET back-ends. Adobe LiveCycle Data Services takes this approach further by adding application modeling tools to Flash Builder, whilst supporting high performance data messaging and quality of service delivery and enabling offline data management for when running in a disconnected mode.
In relation to Omniture specifically, we are due to release an extension for Flash Builder shortly that will enable developers to visually instrument SiteCatalyst tracking during the development of a rich Internet application; this should dramatically shorten implementation time by removing the need to manually tag content and map the custom variables required to enable tracking and analysis.
InfoQ: In Flex 4, Adobe has new component for most of the existing Flex 3 components, however not all. For example, Halo (Flex 3 component model) has a DataGrid, but there currently is no Gumbo (Flex 4 component model) version of the component. Is there a plan to address this? If so, what is the timeframe?
Andrew Shorten: Yes, unfortunately there were some components that we were unable to move to the Flex 4 component model in the time available. That said, we knew that would be the case from the outset, so we made it very easy to mix both MX and Spark components within the same application, hence the lack of a Spark DataGrid (for example) shouldn't deter you from moving to Flex 4 today.
We do of course want to deliver Spark versions of the remaining key components (such as DataGrid, Tree and Form) and plan to do so in the upcoming version of Flex SDK codenamed "Hero". Whilst we can't announce the planned release date for that version of the SDK yet, developers will start to see progress on the new components in the nightly builds that we post to the Adobe Open Source website.
InfoQ: While Flex 4 has made compiler performance improvements, the Flex compiler still is way behind Java in terms of compile times. Why is it that it takes so much longer to compile Flex than it does Java? Are we likely ever to see Flex compile times that are comparable to Java compile times?
Andrew Shorten: Improving the Flex compiler speed, has been, and continues to be a goal of each release of Flex. In the Flex 4 timeframe we made significant reductions in incremental and full compilation speed as well as memory consumption during compilation. In the next few releases, we are doubling up that effort and are aiming to make Flash compilation speed comparable to other client technologies. Its important to note that technologies like Java have had many years of effort around improving their compilation performance. Similarly, Flash & Flex continue to make strides towards improving compilation with each release.
Todd Montgomery Dec 19, 2014