Font Size: a A A

The Research On Improvement And Application To Yaf Framework

Posted on:2018-05-06Degree:MasterType:Thesis
Country:ChinaCandidate:C JiangFull Text:PDF
GTID:2348330512497856Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
The quality of the project code is directly affected by the suitability of the project if the frame used by the project is in the context of the increasing pace of the product's iteration,which leads to the increasing urgency of the development schedule.Yaf framework is a high performance known PHP development framework,in Sina,Lianjia and Baidu and other companies have been widely used.However,according to the practical experience,when the lines number of code in the large-scale project reaches tens of thousands of lines,because of lack of making a more detailed division of the project architecture,the code quality is difficult to ensure,which is lack of level and encounters the data access code confusion caused by poor code maintenance problems,although the system performance has been met.Based on the existing shortcomings of Yaf framework and the current software architecture,this paper puts forward the improvement of Yaf framework to make it more suitable for the development of large-scale projects.The specific improvement work is as follows.(1)For the model to do a further level division,this paper first introduces the basic idea of the hierarchical architecture,and then combine with the characteristics of MVC and hierarchical architecture,makes the Model layered and divided into page service layer,data services Layer and data access object layer,which makes data access more clear.(2)For the class code expansion problem that may exist in the controller class,this paper extracts the action function into a single class,and the controller only acts as the "action navigation",so that the amount of the controller code and the lines number of action code file are kept low,which makes the code more readable.(3)This paper introduces the ORM framework,which makes the developers have a unified call to the database,and avoid writing their own operation functions which may contains complex and inefficient SQL statements.(4)In order to adapt the framework to the application of the improvement,this article makes certain program of refinement the directories,making the different code file which has different role put in the corresponding folder to facilitate the overall maintenance of the project.In this end of this paper,the improved Yaf will be used for developing a practical project application,and to monitor the time used to develop this project,the system performance and stability and the user visited times.Finally,we found the improved Yaf is suitable to shorten the development time,to maintain the performance and stability of system.According to the user traffic in log files,the user visited times was gradually increased,indicating that the improvement of Yaf is effective.
Keywords/Search Tags:Yaf framework, Architecture improvement, Layered structure, Code abstraction
PDF Full Text Request
Related items