Research and Practice of Actionscript Code Refactoring

Author
YangFan
Advisor
SongMaoQiang
School
Beijing University of Posts and Telecommunications
Major
Software Engineering
Classification
TP311.52 Software Development
Degree
Master's thesis
Year
2012
Downloads
57
Citations
0

Request the full text

Abstract

Developing Rich Internet Application and web games with ActionScritp, the development process is not always like build from the wheelse. It requirs developers reuse code as much as possible. Developers.most times,would prefer to build from the wheels.although functionalities which has little difference from the requirements has been realized already. It is code has not been well refactored that makes themselves hard to understand and reuse.ActionScritp is a common technology for building Rich Internet Applications. Flash programmers usually specialize in graphic design rather than programming; yet, to enhance Flash users’experiences, writing efficient ActionScript code is a key requirement. Therefore, Flash programmers require automated support to assist with this key requirement.In this paper best practices, tips, tricks, and other useful information to help to create optimized Flash applications is covered. Through code examples ans use cases, the paper outlines best practices for developer deploying RIA applications.Two main topics, Code Refactoring and Performance Optimization are discussed.

Table of contents

Summary 4-5 ABSTRACT 5-9 Chapter 1 Introduction 9-12 1.1 subject background 9-10 1.2 topics task 10 1.2.1 subject content 10 1.2.2 I assume the task of 10 1.3 thesis structure 10-12 chapter code refactoring methods outlined basic concepts of 12-19 2.1 reconstructed 12-13 2.1.1 remodeling is What 12 2.1.2 Why do we need reconstruction 12-13 2.2 Reconstruction and design 13-14 2.3 Reconstruction and performance Optimization 14-15 2.3.1 reconstruct the timing 14-15 2.3.2 where reconstruction 15 2.4 ACTIONSCRIPT code re- constitutive features 15-18 2.4.1 ActionScript basic concepts 15 2.4.2 ActionScript code refactoring necessity 15-16 2.4 .3 ActionScript code refactoring strategy 16-18 2.5 Summary 18-19 Chapter III study ACTIONSCRIPT code refactoring methods 19-39 <br / > 3.1 found in the code bad taste 19-21 3.2 code in bad taste and common solutions 21-36 3.2.1 a lot of duplicate code 21-22 3.2.2 bad name 22-23 3.2.3 oversized constructor 23-24 3.2.4 custom Events class does not implement its own clone () method 24-25 3.2.5 improper use of dynamic class 25-27 3.2.6 long function 27-32 3.2.7 parameter assignment 32-33 3.2.8 oversized classes 33-36 3.3 to build a test system to ensure reconstruction quality 36-38 3.3.1 unit Testing 36-37 3.3.2 UI test 37-38 3.4 Summary 38-39 Chapter IV ACTIONSCRIPT code refactoring practice 39-74 4.1 perceived performance and actual performance 39-40 4.2 summary of analysis tools 40-42 4.3 ACTIONSCRIPT performance optimization methods 42-73 4.3.1 write code in line with the garbage collection mechanism to prevent memory leaks 42-47 4.3.2 select the appropriate display object 47 4.3.3 Vector type used as an alternative type Array 47-48 4.3.4 avoid using brackets operator Fu 48-49 4.3.5 for TextField objects , use appendText () method to append text 49-50 4.3.6 reuse objects as much as possible , to create objects alternative 50-51 4.3.7 to avoid creating an instance in the loop 51-54 4.3.8 consider using a callback function on behalf of the incidents flow 54-55 4.3.9 in demand allows, disable mouse interaction 55-56 4.3.10 can use event capture and bubbling minimizes the event handler 56 - 59 4.3.11 try to avoid using the alpha property 59 4.3.12 will be time-consuming synchronization operations into asynchronous operation 59-64 4.3.13 rational use of weak references 64-65 4.3.14 reduce redraw 65 4.3.15 Whenever possible, use depends on the Vector object API to access pixels 65 -66 4.3.16 network optimization 66-69 4.3.17 reduce the size of the first frame , load faster 69-70 4.3. 18 Flash Player update to use the new API 70-71 4.3.19 use PixelBender 71-73 4.4 Summary 73-74 Article Conclusion chapters 74-75 5.1 summarizes the thesis work 74 5.2 problems and prospects 74-75 References 75 - 76 Thanks 76

Related dissertations

  1. Research on the Improvement of the Performance Appraisal System for the Dispatching Labors of Changsha Mobile Communication Company
    SuHang ·Hunan University ·2013 ·Master's thesis
  2. Research on Performance Management of the Credit Cooperation in Shandongacounty
  3. The Research of Data Warehouse Performance Optimization Technology Based on the Coupling Index and Materialized View
    MaYingYing ·Hunan University ·2013 ·Master's thesis
  4. Uncertain Construction and Optimization of Reverse Logistics System
    ZhangLing ·Zhejiang University ·2014 ·Doctoral dissertation
  5. Research on Parallel Computing Technology in Loudi Region Analysis of Soil and Water Loss in the Processing of Application
    WangXiuLin ·Hunan University ·2013 ·Master's thesis
  6. Research on Performance Testing and Optimization Based on Massive Data Storage
  7. Research on Key Techniques on Design of Data-driven Asynchronous Microprocessors
  8. Optimization Design and Implementation of the ICS Terminal
  9. A Theoretical Analysis of the Lifetime and Energy Hole in Cluster Based Wireless Sensor Networks
  10. The Research of of ZigBee Network Structure of the Network Construction and the Method of Performance Optimization
    MouWeiQing ·Qilu Industrial University ·2013 ·Master's thesis
  11. Heat Transfer Characteristics and Mechanism Research of the Rmoelectric Generator
    ZhouZeGuang ·South China University of Technology ·2013 ·Doctoral dissertation
  12. Research on the Recovery of the Waste Heat of Condensation Water in Power Plant
    HanXueWei ·Harbin Institute of Technology ·2013 ·Master's thesis
  13. Component Based Highway E-information Management System
    SuDeZuo ·Harbin Engineering University ·2013 ·Master's thesis
  14. Research on Preparation and Performance of New Type High Performance Lightweight Aggregate Concrete Based on Inorganic Polymer Cement
    MaZuo ·Central South University ·2012 ·Doctoral dissertation
  15. Design and Experimental Study of Four-effect Distillation Solar Desalination System
    LiuZuo ·Harbin Institute of Technology ·2012 ·Master's thesis
  16. Optimization of purchasing logistics management system case study of Jiangsu Mobile
  17. Research on Incurrence-Effect of Firm Performance Optimization Based on Panel Model
    XuJingXiao ·Xi'an University of Engineering ·2011 ·Master's thesis
  18. Study on Performance Evaluation and Optimization of University Industry Cooperation in Rizhao City——Revenue Maximization as Driven Sources
    ZhuRuoZuo ·Ocean University of China ·2012 ·Master's thesis
  19. Research on Optimization and Fault Diagnosis of Wireless Sensor Networks Based on Artificial Immune System
  20. Piecewise Aggregation and Optimized Design of Switched Linear Systems
    ZhuGeng ·South China University of Technology ·2012 ·Doctoral dissertation