<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Becomin&#039; Charles &#187; ajax</title>
	<atom:link href="http://sexywp.com/tags/ajax/feed" rel="self" type="application/rss+xml" />
	<link>http://sexywp.com</link>
	<description>Building another myself~~</description>
	<lastBuildDate>Fri, 27 Jan 2012 16:00:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>使用FirePHP辅助AJAX应用开发</title>
		<link>http://sexywp.com/use-firephp-in-ajax-development.htm</link>
		<comments>http://sexywp.com/use-firephp-in-ajax-development.htm#comments</comments>
		<pubDate>Mon, 25 Oct 2010 08:56:00 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://sexywp.com/?p=387</guid>
		<description><![CDATA[FirePHP 一款非常方便强大的PHP、AJAX调试工具，基于Firebug的框架开发，可以算是Firebug的插件。该插件帮助用户将PHP的调试信息展示在Firebug的控制台标签内，而不是直接打印到页面上，这样就避免了在调试页面时破坏了页面的DOM结构。

FirePHP的调试信息主要通过HTTP的Response Headers来发送，所以不会和HTTP的包体混在一起，极大程度地方便了AJAX应用的开发调试，是AJAX开发调试的利器。

全文下载链接

<span class="readmore"><a href="http://sexywp.com/use-firephp-in-ajax-development.htm" title="使用FirePHP辅助AJAX应用开发">Keep Reading --- 168 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress 开发资源" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwordpress-developer-resource.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 开发资源</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用NetBeans IDE 6.5作为WordPress的开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-netbeans-to-develop-wp.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/06/02/10636076.png" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用NetBeans IDE 6.5作为WordPress的开发环境</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用Google AJAX Libraries API替换WordPress自带的js库" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Freplace-the-wp-js-lib-by-googleapi.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/23/9256004.png" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用Google AJAX Libraries API替换WordPress自带的js库</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="插件开发全攻略(11)---在你的WP插件中使用AJAX" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-write-a-wp-plugin-11.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">插件开发全攻略(11)---在你的WP插件中使用AJAX</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="无侵入与可用性层" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">无侵入与可用性层</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>FirePHP 一款非常方便强大的PHP、AJAX调试工具，基于Firebug的框架开发，可以算是Firebug的插件。该插件帮助用户将PHP的调试信息展示在Firebug的控制台标签内，而不是直接打印到页面上，这样就避免了在调试页面时破坏了页面的DOM结构。</p>
<p>FirePHP的调试信息主要通过HTTP的Response Headers来发送，所以不会和HTTP的包体混在一起，极大程度地方便了AJAX应用的开发调试，是AJAX开发调试的利器。</p>
<p><a href="http://download.csdn.net/source/2819249" target="_blank">全文下载链接</a><br />
<a href="http://wenku.baidu.com/view/04f50d2ce2bd960590c6771f.html" target="_blank">百度文库在线阅读</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress 开发资源" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwordpress-developer-resource.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress 开发资源</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用NetBeans IDE 6.5作为WordPress的开发环境" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-netbeans-to-develop-wp.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/06/02/10636076.png" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用NetBeans IDE 6.5作为WordPress的开发环境</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="使用Google AJAX Libraries API替换WordPress自带的js库" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Freplace-the-wp-js-lib-by-googleapi.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/site_images/2011/05/23/9256004.png" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">使用Google AJAX Libraries API替换WordPress自带的js库</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="插件开发全攻略(11)---在你的WP插件中使用AJAX" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-write-a-wp-plugin-11.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">插件开发全攻略(11)---在你的WP插件中使用AJAX</font>
                    </a>
                </td>
                <td width="86" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="无侵入与可用性层" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm&from=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="80px" height="80px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">无侵入与可用性层</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/ajax" title="ajax" rel="tag">ajax</a>, <a href="http://sexywp.com/tags/develop" title="develop" rel="tag">develop</a>, <a href="http://sexywp.com/tags/development" title="development" rel="tag">development</a>, <a href="http://sexywp.com/tags/php" title="PHP" rel="tag">PHP</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/use-firephp-in-ajax-development.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>无侵入与可用性层</title>
		<link>http://sexywp.com/non-intrusive-and-useability.htm</link>
		<comments>http://sexywp.com/non-intrusive-and-useability.htm#comments</comments>
		<pubDate>Thu, 25 Sep 2008 08:28:21 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[工作相关]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://www.charlestang.cn/?p=245</guid>
		<description><![CDATA[使用jQuery一段时间的感想

早在使用WP之前的很久，我就听说了jQuery了，那个时候，只是惊叹于jQuery的视觉效果，然后记住了这个名字，但是一直也没有开始学习。直到我开始折腾WP这个程序，模板，插件，我才开始更广泛深入地接触jQuery。

在学习jQuery的过程中，我也看了一些牛人关于js的观点，并且从内心深处对此表示深刻认同。

<span class="readmore"><a href="http://sexywp.com/non-intrusive-and-useability.htm" title="无侵入与可用性层">Keep Reading --- 1279 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">怎样增加AJAX的可靠性呢？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用FirePHP辅助AJAX应用开发</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fie7-donnot-support-focus.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">IE7不支持focus伪类的解决办法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">jQuery里面用到“打包盒”</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<h3>使用jQuery一段时间的感想</h3>
<p>早在使用WP之前的很久，我就听说了jQuery了，那个时候，只是惊叹于jQuery的视觉效果，然后记住了这个名字，但是一直也没有开始学习。直到我开始折腾WP这个程序，模板，插件，我才开始更广泛深入地接触jQuery。</p>
<p>在学习jQuery的过程中，我也看了一些牛人关于js的观点，并且从内心深处对此表示深刻认同。</p>
<p><span id="more-245"></span></p>
<h3>无侵入</h3>
<p>js代码应该单独的放在一个文件里面，而不应该混杂在html代码中。现在的页面设计也要遵循数据，表现，行为（动作？）分离的原则。html代码就是纯数据，按照数据本身的逻辑关系来组织，而页面外观，则是纯表现，使用css来指定，最后是行为（动作？或者事件响应？），使用js来实现。</p>
<p>三者的分离，有多种好处，更清晰的逻辑结构，更纯粹的数据，更好的可维护性，而且还对搜索引擎非常友好。外部引入的js和css不会对爬虫分析页面内容造成太大的影响。</p>
<p>所以，在编写js的时候，就要竭尽全力地去将js代码与页面完全剥离开来，至少要做到在&lt;body&gt;内部，完全不出现js代码。</p>
<p>这种代码编写方式，就要求我们写js的时候改变一些陋习，并且更加地依赖于文档对象模型DOM。好，说道这里，问题就来了，使用DOM模型的话，遍历DOM树，就是关键了，如果不使用框架的话，就要自己写代码遍历，但是，由于那个恶心的问题，就是浏览器兼容性问题，各个浏览器实现的DOM模型和支持的js语法有着细微的差别，自己遍历DOM会痛苦无比。jQuery在这个方面，做得非常出色，基本上包揽了一切肮脏的工作。让人写起代码来格外愉快。</p>
<p>实在是很喜欢jQ在DOM遍历中的便捷。</p>
<h3>可用性层</h3>
<p>关于可用性层，是又一个现在很流行的概念。在十分关注用户体验的Web 2.0时代，页面可用性，已经成为了考量一个页面的质量的关键标准。</p>
<p>但是js由于其巨大的不稳定性，经常失效；还有就是早先对于js的滥用（如该死的弹出广告，漂浮广告，恶意浏览器插件），使得很多用户对js深具戒心，经常有些极端的用户干脆关闭js，斩草除根。</p>
<p>在这种环境下，js的应用只能在夹缝中艰难求存。于是乎，js成了一个附加的可用性层。“附加”代表可有可无。我现在设计页面，写js，也是在这么一种假设下写的，即“用户可能禁用了js”。追求的效果就是，如果用户没有开启js，那么你能看到全部内容，保证了页面可访问性，牺牲了可用性。而如果开启了js，那么用户将得到更加有趣的体验。</p>
<p>于是乎，我就产生了这么一种感觉，页面上附加的所有js应用，有一种“事务”的特征。我们的术语叫做“transaction”。主要就是其中原子性的特点。如果支持js，那么你觉得这个页面是一个功能丰富的ajax应用，非常炫目。如果不开启js，那么你觉得这是一个普通页面，你甚至没法觉察到这个页面背后其实有着大量的js代码。他们只是简单的被完全的，干干净净的，彻彻底底的拿掉了。</p>
<p>关于这一点，我使用jQ的体验，还是由于jQ那操纵DOM的优秀能力，使得这种理念或者这种理念指导下的开发成为了一件让人愉快的事情。</p>
<h3>总结</h3>
<p>上面两点是我在学习使用jQ的过程中的一些感想，写出来与大家分享一下。我接触Web开发的时间非常短，基本上没有什么经验可以谈的，上面的很多的观点，来自很多我认为牛的人，包括ppk（这个人让我对js的认识更深了一层），以及我订阅的一些牛人的博客里面展示的代码片段所传达的思想。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">怎样增加AJAX的可靠性呢？</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用FirePHP辅助AJAX应用开发</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fie7-donnot-support-focus.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">IE7不支持focus伪类的解决办法</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">jQuery里面用到“打包盒”</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&from=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">视频教程：使用Yii框架开发Blog</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/ajax" title="ajax" rel="tag">ajax</a>, <a href="http://sexywp.com/tags/develop" title="develop" rel="tag">develop</a>, <a href="http://sexywp.com/tags/javascript" title="javascript" rel="tag">javascript</a>, <a href="http://sexywp.com/tags/jquery" title="jQuery" rel="tag">jQuery</a>, <a href="http://sexywp.com/tags/opinion" title="opinion" rel="tag">opinion</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/non-intrusive-and-useability.htm/feed</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>怎样增加AJAX的可靠性呢？</title>
		<link>http://sexywp.com/how-to-use-ajax-correctly.htm</link>
		<comments>http://sexywp.com/how-to-use-ajax-correctly.htm#comments</comments>
		<pubDate>Sat, 14 Jun 2008 08:19:20 +0000</pubDate>
		<dc:creator>Charles</dc:creator>
				<category><![CDATA[日　　记]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.charlestang.cn/?p=93</guid>
		<description><![CDATA[本篇文章不是我的经验介绍，而是我的疑问。我写在这里，希望高手看到了能指点一二，而同样迷惑的人看到了，能参与讨论。

我没有系统地学过javascript，也没有系统地学习过ajax，我只是在兴趣的驱使下，在学习一些jQuery的使用。所以，我几乎对任何问题都很迷惑，而在这些问题中，我最迷惑的就是ajax的可靠性问题。



<span class="readmore"><a href="http://sexywp.com/how-to-use-ajax-correctly.htm" title="怎样增加AJAX的可靠性呢？">Keep Reading --- 784 words totally</a></span><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用FirePHP辅助AJAX应用开发</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">无侵入与可用性层</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fprogress-enhancement-of-comment-form.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">也说用jQuery改进WP评论表单</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">jQuery里面用到“打包盒”</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fshare-this-jquery.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress插件修改：Share This (jQuery)</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>本篇文章不是我的经验介绍，而是我的疑问。我写在这里，希望高手看到了能指点一二，而同样迷惑的人看到了，能参与讨论。</p>
<p>我没有系统地学过javascript，也没有系统地学习过ajax，我只是在兴趣的驱使下，在学习一些jQuery的使用。所以，我几乎对任何问题都很迷惑，而在这些问题中，我最迷惑的就是ajax的可靠性问题。<br />
<span id="more-93"></span></p>
<p>我说的可靠性问题不是指安全问题，而是说，怎么确保一个页面以设计师希望的那种模样出现在用户的面前。就比如我的页面上使用了Ajax加载了部分内容，但是，是否每个人都能正确地看到我的完整页面呢？这个问题，我是回答不了的。其实，我自己使用IE7浏览器，就总是不能看到我自己的页面正确地全部加载。那么，在真正的商用应用中，这种可靠性是怎么被保证的呢？或者说极大程度的保证。</p>
<p>重试机制，如果ajax加载的内容失效，那么应该捕获这个错误，然后进行重试。我在网上看到过关于这个的介绍。但是，我的疑问是，重试多少次呢？5次？10次？不停地重试？要知道，一次ajax加载失败的原因是多种多样的，有可能是刚巧这个时候网络不畅，有可能这个地方的网络总是不畅，比如我自己所在的地方，还有可能是碰巧超时……有些情况，重试个一两次就能解决，但是也不知道到底是几次，还有些地方是根本解决不了的。怎样区分对待这些情况，给用户最好的体验呢？</p>
<p>如果禁止javascript，又怎样保证用户的体验不会太差呢？这又是一个难题，对待这个问题，我目前的看法是，这个问题最后再去考虑，其实大多数用户都是启用了javascript的，虽说现在很多网页的流氓软件都是在看网页的时候用js干坏事的，但是javascript只是被坏人利用了，没必要一棍子打死，我想大多数用户也应该不愿意看到一个因为缺少了js而变得枯燥乏味的互联网。所幸的是，很多杀毒软件，防流氓软件的出现，都有了区别对待的机制，一般都允许打开js，而在危险的时候预警。不过，这个社会总是少不了“别里科夫”的，对于技术和时间都实在有限的我，只有最后再去关心他们的感受啦……</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-firephp-in-ajax-development.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">使用FirePHP辅助AJAX应用开发</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fnon-intrusive-and-useability.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">无侵入与可用性层</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fprogress-enhancement-of-comment-form.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">也说用jQuery改进WP评论表单</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">jQuery里面用到“打包盒”</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fshare-this-jquery.htm&from=http%3A%2F%2Fsexywp.com%2Fhow-to-use-ajax-correctly.htm">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">WordPress插件修改：Share This (jQuery)</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>
	标签：<a href="http://sexywp.com/tags/ajax" title="ajax" rel="tag">ajax</a>, <a href="http://sexywp.com/tags/javascript" title="javascript" rel="tag">javascript</a>, <a href="http://sexywp.com/tags/jquery" title="jQuery" rel="tag">jQuery</a><br />
]]></content:encoded>
			<wfw:commentRss>http://sexywp.com/how-to-use-ajax-correctly.htm/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

