2. Developing mobile and multiscreen applications Accelerated coding for Flex and ActionScript projects Improved designer/developer workflow Updated platform support and improved performance
3. Improving load time Startup module, local cache and storage, Externalizing skins and assets 20% faster for compilation 65% faster for large projects
4. Loading style sheets at run time Three-step process: Write a CSS file for your application. Compile the CSS file into a SWF file. Call the styleManager.loadStyleDeclarations() method in your application. This method loads the CSS-based SWF file into your application.
5. Reducing SWF file sizes Larger SWF files take longer to unpack in Flash Player. Using the bytecode optimizer The bytecode optimizer can reduce the size of the application’s SWF file by using bytecode merging and peephole optimization Peephole optimization removes redundant instructions from the bytecode.
6. In Flash Builder or the mxmlc command-line compiler, you can set the optimize compiler option to true mxmlc -optimize=true MyApp.mxml
7. Disabling debugging Disabling debugging can make your SWF files smaller. When debugging is enabled, the Flex compilers include line numbers and other navigational information in the SWF file To disable debugging when using the command-line compiler, set the debug compiler option to false. The default value for the compc compiler is true.
8. Externalizing assets Advantage: reducing the SWF file size is to externalize assets; To load the assets at run time rather than embed them at compile time. You can do this with assets such as images, SWF files, and sound files. Disadvantage: (Embedded assets ) It add to the size of your application and slow down the application initialization process Advantage: Embedded assets load immediately, because they are already part of the Flex SWF file.
9. Optimizing Performance Keep some facts in the back of your mind when developing. Prioritize on what to optimize based on how the user sees it.
10. ActionScript Tips Minimize work in constructor, static initializers as they are not JITed. Use int or uint instead of Number where appropriate (promotion).
11. If type is known, cast before using it. Writing to local var is 15x faster than class var. Minimize access to getter/setter, loop counter, etc.
12.
13. int main() { if ((1*2) == (1 << 1)) printf("you certainly can!"); else printf("doesn't work that way");}
15. Use strongly typed code. Make methods final. Clear and re-use arrays – arr.length = 0; Cast to int is faster than Math.floor()
16.
17.
18. Deletion is expensive (about 20x slower then reading or writing) It’s cheaper to write NaN, null, or -1 instead of deleting the element
19. Difference between Vector and ArrayList: 1)Vector is synchronized therefore it is thread safe while ArrayList is not. 2)Vector can increment the size by double while arraylist can increment it by 50%. 3)Vector is legacy class while ArrayList is newly added. 4)Default ArrayList capacity is 0 where as Vector intial capacity is 10.out vector and examples
21. Array < ArrayList < ArrayCollection. Event Dispatching Use custom event name in [Bindable] for better performance. (so that you can optimize dispatching in setter).
36. Code faster Code generation Use QuickAssist/Fix to rename and manipulate variables, generate getters/setters and event handlers, organize imports, and more. Use the override/implements feature to define methods from a superclass or interface.
37. Refactoring and ASDoc support Quickly navigate through code or restructuring by renaming all references to a class, method, or variable. Display comments in MXML and ActionScript editors using ASDoc.
38. Code templates Use over 100 new best-practice code templates (aka snippets) for ActionScript, MXML, and CSS. Review and insert templates using code assist. Create custom templates and import or export them for sharing within teams.
39.
40. More productivity, more power Accelerate coding and testing of Flex and ActionScript projects using extensive new and improved tooling features.
41. Large project development Improved large-application performance See up to a 65% reduction for refactoring operations on projects with a large number of dependent libraries, a significant reduction in memory used when profiling complex applications, and improved profiler responsiveness.
42. Command-line build Use the command-line build capability to automate your build process.
43. Expanded platform support Updated platform support Take advantage of new platform support for Eclipse™ 3.6 (Helios) and the standard Eclipse for Java™ distribution; the Cocoa version of Eclipse on Mac OS X; and Adobe Flash Player 10.1, Adobe AIR 2.5, and Flex SDK 4.5.
44. Interactive data visualization Create data dashboards and interactive data analysis by dragging and dropping a chart type and linking it to a data source. Use the powerful Advanced Datagrid to enable users to explore complex data.
45. Rich expressive experiences Create more intuitive, engaging applications to help people understand and use data to support key business activities, leading to increased levels of productivity and effectiveness.