Creating PlayBook apps with Flex and QNX UI Components
I got some requests about how to use both Flex and QNX UI components for building PlayBook apps. In this post I will show you how to do it.
Here are the basic steps.
1. Create a Flex mobile project. Make sure that you enable the project for BlackBerry Tablet OS development.

2. Edit project properties to include the QNX libraries in the project build path (right-click on the project name > Properties). Select BlackBerry Tablet OS section and then select the Include BlackBerry Tablet OS Libraries in Build Path option.

Once you apply these changes your project should be ready for QNX components. Of course you have to add QNX components using ActionScript code; you can’t use QNX components as MXML tags.
You have to remember that the QNX UI components don’t inherit or extend the Flex base UI components. And because of this you can’t add them, for example, directly to a View Flex class using view.addElement(QNX-UI-component); instead you can use an instance of Flex UIComponent as a wrapper. Here is a code snippet that illustrates this technique:
Here is screencast that walks you through the setup and shows a sample app:
Download
You can download the project code from here.
Understanding Flex Mobile View and ViewNavigator
The Flex framework “Hero” makes the task of creating mobile applications for BlackBerry Tablet OS, Android, and soon iOS extremely simple. I think that one of the best looking apps for Android is MAX Companion 2010 and please bear in mind that this app was created using an early build of Flex “Hero”.
This is a reasonably complex application with lots of screens and social integration (Twitter) and yet on my Nexus One and Samsung Galaxy Tab it still works great. This is exactly where the Flex framework can shine on mobile devices: fast and easy development of applications that can connect to virtually anything (web services, REST services, RPC).
In this article I will talk about Flex Mobile Views and ViewNavigator. If you want to use Flex “Hero” to create mobile apps you need to understand how these components work.
Oh and one more thing, if you want to try this yourself you’ll need the Flash Builder “Burrito”. You can download it from here. Read more
Developing for mobile devices with the Flash Platform
The dust has settled over this year Adobe MAX conference (my colleague, Serge Jespers, has been thinking about the next year’s conference for the past two months but this is another story :D). So, by now, you should have heard most of the news around the Flash Platform and mobile devices. However, if you haven’t yet tried to build your first “Hello World” application, read on because it is really simple for us, Flash developers.

In this post I want to help you understand what tools and workflows you can use and what devices you can target. Please keep in mind that this post is about what is available today. We are working hard to make mobile development easier so expect to see more news from us in the future.
Flex 4 mini book: Flex 4 in a Day
As you know this year we released the fourth version of our framework for building RIAs on top of Flash Player or Adobe AIR. As you can imagine, I spent quite some time evangelizing Flex 4 at conferences, customer meetings, and training sessions.
In preparing my presentations/articles I read a lot of material (Adobe’s documentation or blog posts) and talked to our engineers. And some time this summer I started to distill all this information into a formal document I called “Flex 4 in a day”. Initially I was really looking to a way to put all the relevant information into a document you could read in no more than a day. In the end, what I created is a 40-page document with links to additional resources. So I doubt you can “eat” everything in one day.

So what’s in it for you in reading this mini book? I think I managed to keep a fine balance in staying focused on the main features of Flex 4 and providing enough information to understand each one. Here is a list of the topics I covered:
- MXML 2009
- Namespaces
- States
- New MXML Tags (Declarations, Library, Definition, Private, Reparent, DesignLayer)
- Two-way data binding
- MXML Graphics and FXG
- CSS
- Flex Themes
- Creating a Flex Theme
- Applying a Theme
- Spark Components
- The Skinning Contract – Skinning Spark Components
- Creating Spark components and skins
- Spark Components/Skins lifecycle
- New Layout Engine
- Existing Spark layouts
- Creating custom Spark layouts
- New Animation Engine
- Built-in Effects
- Advanced Effects
- What’s new in Adobe AIR 2
- Text Layout Framework in Flex 4
- Working with Fonts
- Working with Flex 3 and 4 components in the same project
- Migrating Flex 3 projects to Flex 4
- Flash Builder 4 new features
- Additional Resources
I should have used “we” instead of “I”, because my colleague Alin Achim helped me with some of these topics. A big thank you to Alin!
Download
You can download the PDF from here (651 KB).
If you find mistakes or you have additional resources that you think should be added please drop a comment. Thanks!
Hero is available
The next version of the Flex SDK, codename Hero, is available to you for download now. If you want to check this special builds just go here and download.
What is so special about Hero? Well, the most important thing is the added support for mobile development. So far you’ll find in this builds: Spark DataGrid, Spark Image, Spark Form, OSMF 1.0 integration, Mobile Application, View & View Navigator, and ActionBar. You can read more here.
No go and start play with it already :D!
Working with Doctrine 2, Flex, Zend AMF, and Flash Builder
I finally got some time to play with Doctrine 2 and Flex. Back in May I wrote an article about working with Doctrine 1.x and Flex (you can read the article here) and my feelings were mixed. I chatted with Jonathan Wage of Doctrine about some of the shortcomings I found in Doctrine 1.x and his response was to check Doctrine 2 (still in development at the time of writing this article). Doctrine 2 is a big step forward.
In this article I describe how I rewrote the original application I created for my first article, this time using Doctrine 2, Flex 4, Zend Framework, and the Flash Builder data-centric development wizards. I’ll highlight the relevant differences between Doctrine 1 and Doctrine 2 along the way. Thus, you should find this article valuable in any one of these two cases:
- You are already working with Doctrine 1 and you’ve wondered what it would take to move to version 2
- You want to learn how to use Doctrine 2 with Flex; you know PHP and you know enough Flex not to be scared away if you see some snippets of code
Before going into the details let me say this: if you aren’t already using an ORM framework for PHP then you should. For most projects it can help you by freeing you of the tedious tasks of writing CRUD code and SQL queries. It allows you to focus on the business logic of your application. And all these advantages are multiplied when working on Rich Internet Applications because on this kind of project much of the work is done on the client and not on the server.
There are some aspects of using this ORM with RIA that could be better, but hey we don’t live in a perfect world. Most of these things, I think, are related to the fact that every time you use a server side ORM with a rich client, you leave behind the main story used for creating that framework – you use the ORM in order to feed a rich client with data and enable the client to persist the changes. Thus you need additional boiler plate code to make the whole thing work.
If you don’t know much about ORMs in general, you may want to read my first article first and before continuing.
50 resources to get up to speed with the Flash Platform
For the past six months we’ve been rolling out a lot of goodies, some of them in the form of final releases, others as betas. It’s no wonder you have to spend some time in order to get up to speed with the latest features of AIR 2, Flash Player 10.1 for Android, AIR 2.5, Flex 4, or Flash Builder 4. Thus, I thought it’d be a great idea to put together a list of resources to help you learn about these goodies.
So here I go, in no particular order.
Peer 2 Peer
Flash Player 10.1 and Adobe AIR 2 brings new capabilities to the table when it comes to Peer 2 Peer. The best resource to learn about this is my fellow evangelist Tom Krcha (some say his dreams are multicasted, but only a few are lucky enough to receive them :D):
- Multicast Explained in Flash Player 10.1
- File sharing over P2P in Flash Player 10.1 with Object Replication
- P2P GroupSpecifier Class Explained
- Direct Routing Explained in Flash Player 10.1
- Simple chat with P2P NetGroup in Flash Player 10.1
Flex and server side technologies
- Christophe Coenraets wrote about tuning client-side performance using Flex 4 and LiveCycle Data Services
- Ryan Stewart’s article on creating a basic CRUD application using Flex and PHP with Zend AMF
- If you prefer to use the Data Centric Development features of Flash Builder when working with Flex and PHP check out this article
- Debugging Flex and PHP projects with Flash Builder 4 and Eclipse PDT/XDebug
- Using Flash Builder 4 to build a Flex application that consumes a .NET-based web service written in C#
AIR 2
- Understanding the security changes in Flash Player 10.1 and AIR 2
- Creating a Web Server using the new Server Socket API in AIR 2
- Exploring the “open with default application” API
- Exploring the Native Processes API: here, here, here, and here
- Retrieving a list of network interfaces in Adobe AIR 2
- Creating a socket server in Adobe AIR 2
- Using drag-and-drop support of remote files in Adobe AIR 2
- Writing multiscreen AIR apps
- AIR 2 and Enterprise
- Developing AIR offline applications using the ColdFusion 9.0.1 ActionScript ORM Library
- Ten tips for building better Adobe AIR applications
AIR/Flash Player 10.1 and Android
- Mark Doherty’s P2P Video Calls on Android tutorial
- AIR 2.5 StageWebView demo
- Geolocation in AIR
- Video chat for Android using LiveCycle Collaboration Service and AIR
- Android apps that connects to desktop apps using Peer 2 Peer: here and here
- Setting up the tools for creating AIR for Android apps and accessing the camera from AIR
- Android Trader Desktop with Flex and AIR for Android
- “VoiceNotes for Android”: Sample App using Flex, AIR, and the Microphone API
- Serge Jespers’s native installers packager
Flex 4
- What’s new in Flex 4
- Differences between Flex 3 and Flex 4
- Skinning in Flex 4
- Introduction to Flex 4 (Spark) layouts
- New Animation Engine
- Michaël Chaize’s layout mirroring article
- Styling Flex 3 components with Flash Builder 4
- Image Zoom Effect and Animating Filters by Chet Haase
Other Flash Builder 4 related resources
- What’s new in Flash Builder 4
- Using Data-Centric features with Parsley (and other frameworks)
- Test Driven Development with Flash Builder 4 and FlexUnit
- Using Flash Builder’s Profiler
- Moving existing Flex projects from Flex Builder 3 to Flash Builder 4
Enjoy!
Flash Builder’s Lost Features: Profiler
Here is the second episode of the Flash Builder’s Lost Features show. This time I chose to talk about Flash Builder’s profiler and give you enough info to feel comfortable using it if it’s new to you. Profiler helps you to locate memory leaks, identify excessive object allocation, or analyze execution times.
With the extension of the Flash Platform on mobile devices, I think that it’s more important than ever to build Flash applications that run efficiently for a long time. Here is the video (you can watch the video in a higher resolution here).
If you want to read more about the “art” of profiling then please take the time to read the official (here and here) and Ilan Avigdor’s article.
Welcome to Hero – the next release of Flex SDK
Yesterday we announced Hero. This is the code-name for the next version of the Flex SDK. I think you’ll find the main themes for this release very interesting:
- Multi-Screen Development: Allow developers to build applications that target the web, desktop or mobile devices using a single unified framework.
- Spark Maturation: Polish and grow the Spark architecture by adding new Spark components and capabilities.
- Large-Application Development: Support developers building large applications by improving fundamental Flex infrastructure pieces.
Among the big news is that both mobile and desktop needs will be served by the same core Flex framework (Hero). Previously, we said that Slider (the code name for the Flex Mobile Framework we announced at Max 2009) would be a separate framework from the Flex SDK. I think this is excellent news; having one framework to target both worlds (mobile and desktop) means that you, the developer, have to spent less time learning and coding.
You can read more about these themes here.
For now there are no public builds for Hero. We are working on this and pretty soon we will have public builds. Keep an eye on this site for Hero white papers and builds.
Working with Doctrine 1.x, Zend Framework, and Flex
Later Update: If you are looking for an article rather on Doctrine 2 than Doctrine 1, then check this one.
This year I finally had the time to play with Doctrine (version 1.x) and Flex. Actually, it was more than playing; I’m using it for a real project that hopefully will enter production pretty soon. To summarize the experience in just a few words: it’s mind-blowing.
OK, I admit I may be exaggerating a little bit. Still, it is something that can change the way you build projects. Doctrine is an ORM (Object Relational Mapper) framework for PHP and it can really speed up the server side development when you have a lot of tables in your database.
In this article, I explore how to work with Doctrine on the server side, Flex on the client side, and remoting to communicate between Flex and PHP (using the Zend Framework for remoting on the PHP side). I also want to share with you some tools and workflows that can save you some time. While most things are fairly straightforward there are a number of tips and tricks that you may find useful if you decide to go down this road. (I will show you how to use plain vanilla value objects and how to handle dates just to give you two examples. Why reinvent the wheel?)
The application I’m going to build in this article is simple but the workflow is the same one I used with a much more complex application. Having said that let’s start by understanding the big picture.






