| During recent years, web applications have become more and more popular because of the abundant user interface and favorable maintainability they provided. However, the web applications of traditional mode are facing many problems with the practices, e.g. low response speed and relatively poor service performance. So, Ajax-- a new kind of web developing technology-- has gradually become the hotspot of the web application.Ajax adopts asynchronous call method to realize pages' partial refresh. So it can reduce network traffic through only sending and receiving the data it needed, provide web-based applications with higher instant responsibility, better interactive ability and more convenient customizable service. In a word, Ajax recreates the seamless user experience of most other desktop applications. Comparing with the traditional web technologies, e.g. Applet and Flash, Ajax can be applied directly in most popular browsers without special software supporting. Ajax synthesizes several key technologies, including JavaScript, Dom, XMLHttpRequest and XML: through Dom JavaScript accesses request parameters information and uses XMLHttpRequest to send the asynchronous request, the server handles the request, and then return ordinary text or XML document, finally browser use JavaScript explains XML, and Dom updated and adopted the relevant user interface.At present, most of popular web design frameworks are based on the MVC pattern. The kernel of MVC pattern is dividing the whole program codes into three relatively independent parts which can cooperate with each other as teamwork: model, view and controller. With the design pattern above, the web application systems have clearer structures, better maintainability and expansibilities.If we can apply the Ajax technique into the MVC design pattern, make them work together, it can take advantage of both prevalence to optimize the existing web applications and improve the system's service performance. And the emphasis of this article is the problem how to realize the seamless combination of Ajax and present MVC design patterns to build more efficient and reasonable web-based application framework. Firstly, the article researches and analyzes deeply into the component and realization principles of Ajax and web framework. Secondly, it discusses how to apply Ajax into MVC pattern, analyzes how to combine them seamlessly on the perspective of the system framework. In this part, it focuses on exploring the combination of DWR framework which implements Ajax and Struts framework which implements MVC pattern. Thirdly, with the application of practical project, the article designs and implements the web framework based on Ajax in detail. The most important point of this part is discussing how to realize the dynamic requesting and the dynamic submitting by using this framework. And the application proves that this kind of web application framework based on the Ajax technology has characteristics of clearer structure and higher efficiency. |