摘要
针对现有Web Application开发中比较流行AJAX技术思想,其数据负载格式XM(LExtensible Markup Language,可扩展标记语言)需要通过DOM(Document Object Model,文件对象模型)进行解析,导致系统资源占用较多,对于性能不够强劲的浏览器来说文件解析资源消耗严重的问题,寻求了一种支持JavaScript的,较XML来说更为轻量级的数据负载格式JSON(JavaScript Object Notation,JavaScript对象标记),分析了其作为AJAX中的XML替代格式的优势。利用JSON作为AJAX中的数据负载格式,屏蔽了DOM解析XML文件的复杂性,更好的支持了JavaScript的数据读取,大大提高了页面呈现的实时性,实践证明,JSON在AJAX中的性能表现要大大优于XML。
To solve the problems in data load format XML of AJAX technology for using more system resource, being hard to parse for the browers which has a low performance, as it parses documents using DOM(Document Object Model), a even more light-weight data-interchange format JSON(JavaScript Object Motation) is explored, which is supportted by JavaScript, and as compared to XML. In this paper, the advantage of JSON as the substituting format of XML' s analyzed, and the complexity of parsing documents is reduced with DOM as a data format of AJAX, the supporting JavaScript in a more effective way, and improving the speed of page rendering greatly. Experiment indicates that JSON has a much better performance than XML in AJAX.
出处
《通信技术》
2009年第8期108-110,114,共4页
Communications Technology
关键词
可扩展标记语言
轻量级数据负载格式
性能优化
Extensible Markup Language(XML)
ligh-tweight data-interchange format
performance optimization