易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 :

[翻译]High Performance JavaScript(023)

Data Formats  数据格式
    When considering data transmission techniques, you must take into account several factors: feature set, compatibility, performance, and direction (to or from the server). When considering data formats, the only scale you need for comparison is speed.
    在考虑数据传输技术时,你必须考虑这些因素:功能集,兼容性,性能,和方向(发给服务器或者从服务器接收)。在考虑数据格式时,唯一需要比较的尺度的就是速度。
    There isn't one data format that will always be better than the others. Depending on what data is being transferred and its intended use on the page, one might be faster to download, while another might be faster to parse. In this section, we create a widget for searching among users and implement it using each of the four major categories of data formats. This will require us to format a list of users on the server, pass it back to the browser, parse that list into a native JavaScript data structure, and ......

[翻译]High Performance JavaScript(024)

Data Format Conclusions  数据格式总结
    Favor lightweight formats in general; the best are JSON and a character-delimited custom format. If the data set is large and parse time becomes an issue, use one of these two techniques:
    总的来说越轻量级的格式越好,最好是JSON和字符分隔的自定义格式。如果数据集很大或者解析时间成问题,那么就使用这两种格式之一:
• JSON-P data, fetched using dynamic script tag insertion. This treats the data as executable JavaScript, not a string, and allows for extremely fast parsing. This can be used across domains, but shouldn't be used with sensitive data.
  JSON-P数据,用动态脚本标签插入法获取。它将数据视为可运行的JavaScript而不是字符串,解析速度极快。它能够跨域使用,但不应涉及敏感数据。
• A character-delimited custom format, fetched using either XHR or dynamic script tag insertion and parsed using split(). This technique parses extremely large datasets slightly faster than the JSON-P technique, and ge ......

[翻译]High Performance JavaScript(025)

第八章  Programming Practices  编程实践
    Every programming language has pain points and inefficient patterns that develop over time. The appearance of these traits occurs as people migrate to the language and start pushing its boundaries. Since 2005, when the term "Ajax" emerged, web developers have pushed JavaScript and the browser further than it was ever pushed before. As a result, some very specific patterns emerged, both as best practices and as suboptimal ones. These patterns arise because of the very nature of JavaScript on the Web.
    每种编程语言都有痛点,而且低效模式随着时间的推移不断发展。其原因在于,越来越多的人们开始使用这种语言,不断扩种它的边界。自2005年以来,当术语“Ajax”出现时,网页开发者对JavaScript和浏览器的推动作用远超过以往。其结果是出现了一些非常具体的模式,即有优秀的做法也有糟糕的做法。这些模式的出现,是因为网络上JavaScript的性质决定的。
Avoid Double Evaluation  避免二次评估
    JavaSc ......

[翻译]High Performance JavaScript(026)

Use the Fast Parts  使用速度快的部分
    Even though JavaScript is often blamed for being slow, there are parts of the language that are incredibly fast. This should come as no surprise, since JavaScript engines are built in lower-level languages and are therefore compiled. Though it's easy to blame the engine when JavaScript appears slow, the engine is typically the fastest part of the process; it's your code that is actually running slowly. There are parts of the engine that are much faster than others because they allow you to bypass the slow parts.
    虽然JavaScript经常被指责缓慢,然而此语言的某些部分具有难以置信的快速。这不足为奇因为JavaScript引擎由低级语言构建。虽然JavaScript速度慢很容易被归咎于引擎,然而引擎通常是处理过程中最快的部分,实际上速度慢的是你的代码。引擎的某些部分比其它部分快很多,因为它们允许你绕过速度慢的部分。
Bitwise Operators  位操作运算符
    Bitwise operators are one of the most frequently misunderstoo ......

[翻译]High Performance JavaScript(027)

第九章
Building and Deploying High-Performance JavaScript Applications
创建并部署高性能JavaScript应用程序
    According to a 2007 study by Yahoo!'s Exceptional Performance team, 40%–60% of Yahoo!'s users have an empty cache experience, and about 20% of all page views are done with an empty cache (http://yuiblog.com/blog/2007/01/04/performance-research-part-2/). In addition, another more recent study by the Yahoo! Search team, which was independently confirmed by Steve Souders of Google, indicates that roughly 15% of the content delivered by large websites in the United States is served uncompressed.
    根据Yahoo!卓越性能团队在2007年进行的研究,40%-60%的Yahoo!用户没有使用缓存的经验,大约20%页面视图不使用缓存(http://yuiblog.com/blog/2007/01/04/performance-research-part-2/)。另外,由Yahoo!研究小组发现,并由Google的Steve Souders所证实的一项最新研究表明,大约15%的美国大型网站所提供的内容没有压缩。
    These facts emphasize the need ......

[翻译]High Performance JavaScript(028)

JavaScript Minification  JavaScript紧凑
    JavaScript minification is the process by which a JavaScript file is stripped of everything that does not contribute to its execution. This includes comments and unnecessary whitespace. The process typically reduces the file size by half, resulting in faster downloads, and encourages programmers to write better, more extensive inline documentation.
    JavaScript紧凑指的是剔除一个JavaScript文件中一切运行无关内容的过程。包括注释和不必要的空格。该处理通常可将文件尺寸缩减到一半,其结果是下载速度更快,并鼓励程序员写出更好,更详细的内联文档。
    JSMin (http://www.crockford.com/javascript/jsmin.html), developed by Douglas Crockford, remained the standard in JavaScript minification for a long time. However, as web applications kept growing in size and complexity, many felt it was time to push JavaScript minification a step further. This is the main reason behind the development of the YUI Compres ......
总记录数:40319; 总页数:6720; 每页6 条; 首页 上一页 [49] [50] [51] [52] 53 [54] [55] [56] [57] [58]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号