基于MVC模式的Web前端框架關(guān)鍵技術(shù)研究與實(shí)現(xiàn)
[Abstract]:With the advent of the Internet Web2.0 era, a large number of Web applications have emerged in the front end of the web site has produced earth-shaking changes, web pages no longer simply display basic text and pictures. The use of a variety of rich media elements makes the content of web pages more vivid, The interactive form of web pages enhances the user experience of Web application and the technology of web front end is more and more widely used in the process of application development. The popularity of Web application makes users expect more and more sites. As a direct result of the continuous expansion of the front-end scale of the website, more and more front-end script code is added to the application system. The front-end development has many problems, such as large code scale, difficult organization and maintenance, low reusability of code, poor expansibility and so on. It will be more and more important to establish a reasonable front-end development architecture and follow development standards and specifications. This paper draws lessons from the back-end architecture of MVC mode, by analyzing the problems in the traditional front-end development and maintenance process, combining with the popular front-end design pattern, relying on the front-end technology such as JavaScript,jQuery,DOM,Ajax,JSON, and adopting the combination of theory and practice. The coding implements the front-end frame based on MVC mode. The front-end framework of this paper makes the front-end development follow the modular development mode, separates the different types of logic, reduces the dependency, realizes the decoupling and reuse of the front-end code, and reduces the complexity of application extension and maintenance. The specific research process is as follows: firstly, according to the idea of hierarchical architecture, each part of the front-end frame is designed. The front-end frame consists of five parts: model object, set object, controller object, view object and asynchronous request object. The functions of each object are analyzed, and the attributes and methods involved in the object are designed. Secondly, the initialization of the object in the front-end frame and the methods contained in the framework are coded. One of the innovations in this framework is the implementation of the template engine in the view object, which separates the JavaScript code from the HTML code fragment. The page view is rendered by template engine, which makes the code easy to maintain and improves the efficiency of page rendering. Another innovation is that the Ajax request scheduling mode is optimized in asynchronous request object, and the request priority queue and the strategy of increasing the priority based on waiting time are proposed to reduce the waiting time of user request. Prevent user requests from being answered for long periods of time. Finally, the rendering efficiency of the template engine of the front-end framework is compared with that of the current popular template engine, and the response time of the request using the Ajax asynchronous request scheduling strategy is compared with the response time of the ordinary Ajax request. In the case of the same number of requests, the completion time of the request response of the front-end framework is compared with that of the other front-end frameworks. The test results show that the efficiency of page rendering and request response has been greatly improved. Then the application of the front-end frame in the news management system describes the flow and feasibility of the whole framework.
【學(xué)位授予單位】:中國海洋大學(xué)
【學(xué)位級別】:碩士
【學(xué)位授予年份】:2014
【分類號】:TP393.09
【參考文獻(xiàn)】
相關(guān)期刊論文 前10條
1 Dino Esposito;羅小平;;小議JavaScript庫——Dojo、jQuery和PrototypeJS的比較[J];程序員;2008年08期
2 王保平;;對JavaScript框架的再思考[J];程序員;2008年11期
3 芮素娟;丁曉明;;Web應(yīng)用性能測試進(jìn)展[J];計(jì)算機(jī)科學(xué);2006年08期
4 黎永良,崔杜武;MVC設(shè)計(jì)模式的改進(jìn)與應(yīng)用[J];計(jì)算機(jī)工程;2005年09期
5 李周志;王曉東;王真之;馮志敏;周宇;;基于多優(yōu)先級緩存隊(duì)列的遠(yuǎn)程數(shù)據(jù)傳輸技術(shù)[J];計(jì)算機(jī)工程;2010年18期
6 毛峰;劉婷;劉仁義;劉南;張豐;;基于REST面向資源的地理信息服務(wù)設(shè)計(jì)[J];計(jì)算機(jī)工程;2011年08期
7 呂林濤;萬經(jīng)華;周紅芳;;基于AJAX的Web無刷新頁面快速更新數(shù)據(jù)方法[J];計(jì)算機(jī)應(yīng)用研究;2006年11期
8 浦云明;范明紅;許明娜;;Web應(yīng)用系統(tǒng)負(fù)載測試[J];計(jì)算機(jī)應(yīng)用與軟件;2009年11期
9 周玲余;;基于jQuery框架的頁面前端特效的設(shè)計(jì)與實(shí)現(xiàn)[J];計(jì)算機(jī)與現(xiàn)代化;2013年01期
10 劉秀芹;;基于STRUTS的EXT技術(shù)應(yīng)用研究[J];軟件導(dǎo)刊;2009年07期
本文編號:2243081
本文鏈接:http://sikaile.net/guanlilunwen/ydhl/2243081.html