摘要
前端应用规模越来越庞大,其承担的业务复杂度也逐年攀升。为了提高前端代码的执行效率和可维护性,针对前端应用的软件复用技术研究越来越受到重视。使用软件复用技术,基于Ext JS框架的MVC模式,对成果管理系统进行了重构。在Model层构建抽象模型及其继承层次,在View层封装多个通用面板以供3类成果录入面板复用,在此基础上,设计封装了一个通用控制器,该控制器通过继承和组合机制,能够实现对多个成果视图的统一控制。该方案实现了代码的有效复用,降低了代码规模,在面对增加4种新成果的用户需求时,体现了较高的可维护性与可扩展性。
The application scale of the front-end becomes more and more huge, and its business complexity also increases year by year. In order to improve the efficiency and maintainability of front-end code, the research on software reuse technology for front-end applications is becoming more and more important. This paper uses software reuse technology to reconstruct the result management system based on the MVC mode of Ext JS framework. It builds an abstract Model and its inheritance hierarchy on the Model layer, and encapsulates multiple generic panels in the View layer to make the three categories of results input panel reused. Based on this, a common controller was designed, which can achieve the unit control of several result views through inheritance and composition mechanisms. This scheme can reuse code effectively, reduce code size, and reflect higher maintainability and extensibility when facing the user demand of adding four new results.
出处
《信息技术与网络安全》
2018年第2期46-50,共5页
Information Technology and Network Security