Developing Android Applications with Adobe AIR [111]
The ViewNavigator helps in the development and management of screens and offers transition animations. The TabNavigator is used for subnavigation. The ActionBar is used for global navigation and messaging. We will come back to this in more detail in Chapter 19.
Using ActionScript and bitmaps is recommended over MXML and FXG at runtime.
If you like the convenience of components but prefer pure ActionScript development, Keith Peters has created lightweight and easy-to-use components (see http://www.minimalcomps.com/ and http://www.bit-101.com/blog/?p=2979).
Conclusion
These are just some of the areas to look at to best design and develop your application.
Mobile devices have their own form factor and real estate, and are therefore unique. Treat them as special citizens and their applications as a new, upcoming niche. Here are some resources to reference for good graphic and interaction design:
http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/Introduction/Introduction.html
http://www.androidpatterns.com
Chapter 19. Best Practices for Development
Make everything as simple as possible, but not simpler.
—Albert Einstein
Best practices and optimization are popular topics, especially with today’s focus on mobile development. Rather than trying to cover everything in this chapter, I will point you to some good resources and limit the text to a few key points and some less frequently discussed topics.
If you are reading this, you are already a committed developer who spends time doing research. Understanding the mechanics of the AIR runtime and the ActionScript APIs will empower you as a coder both in quality and in speed, not to mention in marketability in the workplace and in popularity among your peers.
Resources on Optimization
In a document titled “Application Design Goals,” Google provides objectives with three areas of focus: performance, responsiveness, and seamlessness. It also provides a short list of recommendations: don’t drop data, don’t interrupt the user, design your UI to work with multiple screen resolutions, assume the network is slow, don’t assume the touchscreen or keyboard exists (i.e., write logic to detect them), and conserve the device’s battery. Even though this document is targeted at Android development, it is insightful to ActionScript developers as well. Read it at http://developer.android.com/guide/practices/design/index.html.
Adobe offers a white paper titled “Optimizing Performance for the Flash Platform” with a special focus on mobile. It is a 90-page document with practical topics and code snippets. You can read it as a PDF document or online, at http://help.adobe.com/en_US/as3/mobile/index.html.
For ongoing articles and announcements, visit the Adobe AIR Developer Center, at http://www.adobe.com/devnet/air.html.
Where to Find Help
You can get help and information from a variety of areas.
Documentation
Launch the language reference help from within your editor for language-specific information. I do not recommend using the search capability at http://help.adobe.com directly, as it directs you to the Adobe Support page, which is not specific enough for our purposes.
Type in a class name in the IDE text editor, and then select it. In Flash Professional, click the question mark on the top right. In Flash Builder, press Shift-F2. As shown in Figure 19-1, the information is presented in ASDoc style as HTML frames. The upper left frame lists packages, language elements, and appendixes. The lower left frame lists classes in the package in context. The right frame displays the class you are searching for. The content comprises an introductory paragraph and the list of properties, methods, and events.
Figure 19-1. Language reference help
The Internet
Use the Google search engine to find undocumented material starting with “as3” or “AIR”, especially now that you know the syntax of the class or API you are interested in. The Flash community is vibrant and posts solutions and examples,