<?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>花儿开了 &#187; xajax</title>
	<atom:link href="http://blog.istef.info/tag/xajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.istef.info</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 04 Mar 2010 08:11:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom:link rel='hub' href='http://blog.istef.info/?pushpress=hub'/>
		<item>
		<title>Ajax 习作：iReader</title>
		<link>http://blog.istef.info/2005/10/04/ajax-work-ireader/</link>
		<comments>http://blog.istef.info/2005/10/04/ajax-work-ireader/#comments</comments>
		<pubDate>Tue, 04 Oct 2005 15:23:49 +0000</pubDate>
		<dc:creator>iStef</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[magpierss]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[xajax]]></category>

		<guid isPermaLink="false">http://blog.istef.info/2005/10/04/ajax-work-ireader/</guid>
		<description><![CDATA[Ajax 是最近很“火”的一项技术。平时也没时间认真研究一下，趁着十一七天乐，在家里花了一天的时间做了这么一个小东西。不仅实践了 Ajax 技术，而且体验到了“搭积木”式写程序的快感。]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.istef.info/wp-content/uploads/2005_10_4.png" title="iReader" target="_blank"><img src="http://blog.istef.info/wp-content/uploads/2005_10_4.png" width="240" height="148" alt="iReader" style="float:left" /></a>Ajax 虽然不是一种什么新技术，但自从 Google 开始广泛采用 Ajax，特别是 Gmail 的成功，将这一曾经不被看好的技术重新时髦起来。当今，使用 Ajax 的网站越来越多，特别是最近各种个人门户类网站、在线即时通信网站，基本上都是以 Ajax 技术为核心的。</p>
<p>Ajax 原理就是通过浏览器的 XMLHTTP 对象（各种浏览器有所不同），通过 Javascript 在不刷新页面的情况下向服务器提交页面信息，接收服务器反馈并呈现的一种技术。Ajax 最大优势就在于“无刷新”。这就意味着我们在提交页面信息时不需要刷新浏览器页面。通过这种方式，可以根据用户的浏览行为，实时变更页面上的信息，提供用户最佳的浏览体验。Gmail 就是一个非常出色的 Ajax 程序，<a href="http://gmail.google.com">Gmail</a> 借助于浏览器，给我们带来接近传统邮件客户端的体验，离开 Ajax 是很难做到的。</p>
<p>实现 Ajax 的方法很多，大家可以自己 Google 一下。如果用 PHP 的话，开源项目 <a href="http://xajax.sourceforge.net">xajax</a>会大大降低开发工作的负担。xajax 有非常好的跨浏览器支持，据我测试对同时发出的多个 XMLHTTP 请求的处理情况也令人满意。</p>
<p>学习一种技术，实践是最好的方法。题图中就是我的第一个 Ajax 作品：<a href="http://istefliu.512j.com/iReader/">iReader</a>。iReader 是一个在线的 RSS 阅读器。借助于 Ajax 技术，使页面在无刷新的情况下便可以实时读取 RSS Feed 并将其格式化好并呈现给用户。仿照 Gmail，我也做了一个类似“应用软件”的界面，没想到做这个界面还是费了一番周折。纯 CSS 很难实现这种效果，最后还是借助了 Javascript 来实现效果。这个程序存储 Feeds 的文件为 <a href="http://www.opml.org">OPML</a> 格式，为此我还写了一个小小的 OPML 解析的类。</p>
<p>值得一提的是，写这个程序我只有很少的代码是自己写的，其余均使用开源代码。Ajax 使用 <a href="http://xajax.sourceforge.net">xajax</a>，RSS 读取和解析使用的是 <a href="http://magpierss.sourceforge.net">MagpieRSS</a>。此外我还使用了一个开源的 Tree 控件。写程序的整个过程就像搭积木一样，感觉有点从前用 Visual Basic 写程序的感觉。</p>
<p>最后，提供 iReader 代码的下载：<a href="http://blog.istef.info/files/iReader.rar">iReader 0.1 Alpha</a>，基于 GNU/GPL 协议发布，<a href="http://istef.info/iReader/">演示</a>。</p>
<p>ps: 谁能推荐一款国内外的 CPanel 空间？现在用这个太慢了，无语了……
<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.istef.info%2F2005%2F10%2F04%2Fajax-work-ireader%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.istef.info%2F2005%2F10%2F04%2Fajax-work-ireader%2F&amp;style=compact&amp;service=bit.ly" height="61" width="50" /><br />
			</a>
		</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.istef.info/2005/10/04/ajax-work-ireader/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
	</channel>
</rss>
