This paper discusses design and implementation method of Business Application Framework based on software patterns, and then presents MVC pattern of architecture and the method of dynamical update promulgation for Bus...This paper discusses design and implementation method of Business Application Framework based on software patterns, and then presents MVC pattern of architecture and the method of dynamical update promulgation for Business Application Framework. We discuss adaptation of Abstract Factory for the kernel functionality of Business Application Framework, such as data creation, manipulation, composition, etc. It also presents class model and its class structure of Abstract Factory pattern. Finally, we briefly discuss the update, modification, and reconstruction method of Business Application Framework.展开更多
Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional s...Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.展开更多
基金Supported by Middleware Software Division of Software Group of F ujitsu L imitedJapanthe Project Tackling KeyProblem of Wuh
文摘This paper discusses design and implementation method of Business Application Framework based on software patterns, and then presents MVC pattern of architecture and the method of dynamical update promulgation for Business Application Framework. We discuss adaptation of Abstract Factory for the kernel functionality of Business Application Framework, such as data creation, manipulation, composition, etc. It also presents class model and its class structure of Abstract Factory pattern. Finally, we briefly discuss the update, modification, and reconstruction method of Business Application Framework.
文摘Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.