基于模板引擎的协同浏览系统的研究与实现

上传人:E**** 文档编号:114419792 上传时间:2019-11-11 格式:PDF 页数:66 大小:3.43MB
返回 下载 相关 举报
基于模板引擎的协同浏览系统的研究与实现_第1页
第1页 / 共66页
基于模板引擎的协同浏览系统的研究与实现_第2页
第2页 / 共66页
基于模板引擎的协同浏览系统的研究与实现_第3页
第3页 / 共66页
基于模板引擎的协同浏览系统的研究与实现_第4页
第4页 / 共66页
基于模板引擎的协同浏览系统的研究与实现_第5页
第5页 / 共66页
点击查看更多>>
资源描述

《基于模板引擎的协同浏览系统的研究与实现》由会员分享,可在线阅读,更多相关《基于模板引擎的协同浏览系统的研究与实现(66页珍藏版)》请在金锄头文库上搜索。

1、国防科学技术大学 硕士学位论文 基于模板引擎的协同浏览系统的研究与实现 姓名:姬一文 申请学位级别:硕士 专业:软件工程 指导教师:吴庆波 2010-10 国防科学技术大学研究生院工程硕士学位论文 第 i 页 摘 要 随着互联网的飞速发展,目前已经进入了 Web2.0 的时代。基于 Web2.0 技术 的应用,是以提升用户参与为特点,为用户参与内容创作和协作开发提供便利。 通过 Web 协同浏览技术将位于不同地区、研究不同领域的人们连在一起,共同参 与内容创作, 这种以协同浏览 JavaScript 引擎同步为代表的应用支撑技术已经成为 目前研究的热点。 本文针对现有协同浏览对动态页面支持较弱

2、的难题,首先,通过分析协同浏 览的架构及相关技术,结合 Web 动态页面加速方法,提出了基于模板引擎机制的 协同浏览架构,该架构由基于 DOM 级 JavaScript 引擎输入同步机制和模板引擎机 制两部分组成。采用模板引擎机制,有效地促进协同浏览的动态交互性;采用基 于 DOM 级 JavaScript 引擎输入同步机制实现用户间 UI 事件同步。与传统协同浏 览系统相比,该架构的实时交互性较强,共同浏览响应速度较快。 然后,通过对现有 Web 页面同步方法和页面渲染技术的分析,提出了基于 DOM 级 JavaScript 引擎输入同步机制。该同步机制能够较好的实现用户参与协同 浏览过程中

3、的 UI 事件同步,确保各参与者浏览器内页面同步显示。与传统同步机 制相比,该机制具有较好的可扩展性和较好的用户体验。 接着,针对协同浏览应用的模板文件大,而实时动态交互数据小且频繁等特 点,提出了基于服务器端和客户端相结合的模板引擎优化策略:将服务器端页面 生成任务分担迁移到客户端浏览器,突破了模板标记技术、客户端模板填充技术 和缓存验证机制等技术。改进后模板引擎能够有效提高了网络传输效率,降低了 Web 服务器负载。 最后,本文在国家 863 课题开源软件协同平台Trac 平台上实现了基于模 板引擎机制的协同浏览系统原型,并且针对系统的协同浏览响应时间、网络数据 传输量和服务器系统吞吐率等

4、方面进行了测试,结果表明基于模板引擎的协同浏 览系统在整体响应速度有较大提升。论文完成的工作成果是 863 课题项目“开源 软件 IP 资源库关键技术及系统”的重要组成部分,具有重要的理论意义和使用价 值。 关键词:协同浏览,事件同步机制,模板引擎 国防科学技术大学研究生院工程硕士学位论文 第 ii 页 ABSTRACT With the rapid development of the Internet, the Web2.0 has come to its age. The technology application which based on Web2.0 is characteri

5、zed by promoting the participation of users, and provided convenience between their creation and collaboration .By Web co-browsing technology, people from different region and field communicate and participate jointly the creation of content. And this kind of co-browsing technology and its represent

6、s supporting technology has become the hotspot of research. Based on the research of the co-browsing structure and relative technology, also combined with web dynamic pages acceleration technology, this article proposed a collaborative browsing structure which based on template engine mechanism, whi

7、ch consists of two parts: he DOM-level-based JavaScript engine input synchronization mechanism and template engine mechanism. By using template engine mechanism, which promote the dynamic interaction of co-browsing effectively , Users UI event synchronization realized by DOM-level based JavaScript e

8、ngine input synchronization mechanism. Compare with traditional co-browsing system, this structure has a more real-time interactive, and the common response is also faster. Then, Based on the research and analysis of the existing Web page synchronization solution and the page rendering technology, t

9、he article proposes a DOM-level-based JavaScript engine input synchronization mechanism. By this it can achieve a better UI events synchronization among participants in the co-browsing, and ensure all co-browsing participants page synchronization. Compare with the traditional synchronization mechani

10、sms, this synchronization has better scalability and better user experience. Then, Based on the study of the traditional template engine mechanisms, the article proposed an optimization strategy on template engine mechanism: migration the server-side page generation task to the client browser. the a

11、rticle has breaking the template tag technology, client template filling technology, cache validation mechanism and assistive technology. Through the implementation of this strategy, we found it can effectively improve the network transmission and reduce Web server load. Finally, the article impleme

12、nted the co-browsing system in the 863 subjects project of collaborative platform for open source - Trac, and selected three evaluation aspects of system response time, network data traffic and server throughput to evaluate the performance of the system. The results show that the co-browsing system

13、has greatly improvement over the response rate. The work and contributions of this paper are parts of 863 project “the key technology and system of open source software IP resources library“, and have useful theoretical and operational value. 国防科学技术大学研究生院工程硕士学位论文 第 iii 页 Key Words:collaborative brow

14、sing, event synchronization mechanism, the template engine 国防科学技术大学研究生院工程硕士学位论文 第 IV 页 表 目 录 表 4.1 两种基于JavaScript引擎同步机制对比 . 23 表 6.1 协同浏览事件触发响应时间对比 50 表 6.2 页面数据传输量对比 50 表 6.3 Requests per second指标对比 51 国防科学技术大学研究生院工程硕士学位论文 第 V 页 图 目 录 图 2.1 协同浏览实现数据同步机制方案的总体概况 8 图 2.2 模板引擎功能 9 图 2.3 模板引擎工作流程图 10 图

15、2.4 传统模板引擎的客户端与服务器交互序列图 11 图 3.1 协同浏览架构结构图 15 图 3.2 客户端缓存机制交互过程 17 图 4.1 基于同步JavaScript引擎输入的UI事件同步方案. 21 图 4.2 基于同步JavaScript引擎输出的UI事件同步方案. 22 图 4.3 浏览器渲染页面总体描述 25 图 4.4 以JavaScript引擎的角度的浏览器模型 . 26 图 4.5 UI事件采集和过滤排序处理. 28 图 4.6 阻止本地鼠标单击事件处理的伪代码 29 图 4.7 生成 JavaScript UI 事件的伪代码 29 图 4.8 鼠标单击事件的 XML 序

16、列化描述. 30 图 4.9 通过BOM的JavaScript引擎间交互 32 图 4.10 同步函数 window.setTimeout()的重定义代码片段. 31 图 5.1 模板引擎整体结构图 35 图 5.2 改进后模板引擎的客户端与服务器端交互序列图 36 图 5.3 模板文件有效性验证 38 图 5.4 客户端缓存验证机制流程图 38 图 5.5 模板填充 JavaScript 代码片段 . 40 图 5.6 传统的协同浏览结构图(上)和基于模板引擎的协同浏览结构(下) 42 图 6.1 基于Trac平台的协同浏览应用场景. 44 图 6.2 协同浏览实现框图 45 图 6.3 UI事件采集模块流程. 46 图 6.4 UI事件排序模块流程. 47 图 6.5 模板填充机制模块工作流程 48 图 6.6 系统测试环境图 49 图 6.7 协同浏览事件触发响应时间对比 50 图 6.8 页面数据传输量对比柱形图 51 图 6.9 Requests per second指标对比 52 国防科学技术大学研究生院工程硕士学位论文 第 1 页 第一章 绪论 1.1 引言引言

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号