<?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; yui</title>
	<atom:link href="http://www.ooso.net/tag/yui/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ooso.net</link>
	<description>Linux + Apache + Mysql + Php + Flash</description>
	<lastBuildDate>Thu, 19 Jan 2012 01:21:44 +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>Yahoo yui host提供combo handler服务</title>
		<link>http://www.ooso.net/archives/458</link>
		<comments>http://www.ooso.net/archives/458#comments</comments>
		<pubDate>Thu, 17 Jul 2008 01:42:45 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/458</guid>
		<description><![CDATA[Yahoo之前提供了公开的YUI Hosting，现在又在这个基础上进一步提供了combo handler服务。这项服务的目的是尽可能减少http请求的数目，以提高web前端的展现速度，这也是高性能网页开发的14条军规之首。
此前，如果要使用YUI Rich Text Editor，需要引用若干外部js。共计6个http请求。
&#60;script type="text/javascript"
   src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"&#62;&#60;/script&#62;

				<span class="readmore"><a href="http://www.ooso.net/archives/458" title="Yahoo yui host提供combo handler服务">阅读全文（226字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ooso.net/index.php/archives/265">Yahoo之前提供了公开的YUI Hosting</a>，现在又在这个基础上进一步提供了combo handler服务。这项服务的目的是尽可能减少http请求的数目，以提高web前端的展现速度，这也是<a href="http://www.space007.com/post/129.html">高性能网页开发的14条军规</a>之首。</p>
<p>此前，如果要使用YUI Rich Text Editor，需要引用若干外部js。共计6个http请求。</p>
<pre><code>&lt;script type="text/javascript"
   src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"
   src="http://yui.yahooapis.com/2.5.2/build/container/container_core-min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"
   src="http://yui.yahooapis.com/2.5.2/build/menu/menu-min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"
   src="http://yui.yahooapis.com/2.5.2/build/element/element-beta-min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"
   src="http://yui.yahooapis.com/2.5.2/build/button/button-min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"
   src="http://yui.yahooapis.com/2.5.2/build/editor/editor-beta-min.js"&gt;&lt;/script&gt;</code></pre>
<p>如果使用combo handler，那么http请求数可以合并成一个，如下：   </p>
<pre><code>&lt;script type="text/javascript"
src="http://yui.yahooapis.com/combo?2.5.2/build/yahoo-dom-event/yahoo-dom-event.js&#038;
2.5.2/build/container/container_core-min.js&#038;2.5.2/build/menu/menu-min.js&#038;
2.5.2/build/element/element-beta-min.js&#038;2.5.2/build/button/button-min.js&#038;
2.5.2/build/editor/editor-beta-min.js"&gt;&lt;/script&gt;</code></pre>
<p>可惜这个host在国外，对国内的yui用户来说，没有什么帮助。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/458/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>基于yui grids的wordpress主题 &#8212; YUI Autogrid Minima</title>
		<link>http://www.ooso.net/archives/440</link>
		<comments>http://www.ooso.net/archives/440#comments</comments>
		<pubDate>Wed, 02 Jul 2008 22:54:34 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/440</guid>
		<description><![CDATA[在yuiblog上看到这个基于yui grids的主题，样式简单到了不行，可能正是某些人喜欢的类型。贴图为证：

YUI Autogrid Minima主题的特点


				<span class="readmore"><a href="http://www.ooso.net/archives/440" title="基于yui grids的wordpress主题 &#8212; YUI Autogrid Minima">阅读全文（186字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>在<a href="http://yuiblog.com/blog/2008/07/02/autogrid-wptheme/">yuiblog</a>上看到这个基于<a href="/?tag=yui">yui</a> grids的主题，样式简单到了不行，可能正是某些人喜欢的类型。贴图为证：</p>
<p><img src="http://www.ooso.net/wp-content/uploads/2008/07/yui_grids.gif" alt="yui_grids wordpress theme" title="yui_grids" width="500" height="278" class="alignnone size-full wp-image-441" /></p>
<h3>YUI Autogrid Minima主题的特点</h3>
<ul>
<li>干净简洁的html标签</li>
<li>布局会随着浏览器的大小自动调整，可以试着拖拽浏览器边框，会发现怎么也不出现横向滚动条，侧边栏会自适应宽度</li>
<li>固定不动的侧边栏，像某些对联广告一样</li>
<li>还是那句，样式朴素到了不行</li>
</ul>
<p>[<a href="http://yuiblog.com/assets/autogridminimal.zip">你可以点击这里下载这个主题</a>.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/440/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>我也试用YUI Uploader</title>
		<link>http://www.ooso.net/archives/405</link>
		<comments>http://www.ooso.net/archives/405#comments</comments>
		<pubDate>Fri, 30 May 2008 01:58:11 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[yui]]></category>
		<category><![CDATA[上传]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/405</guid>
		<description><![CDATA[早就知道YUI里面有Uploader这么一个上传组件，可以按住ctrl多选文件上传(就像flickr那样的上传)，并且可以支持进度条，这样对用户来说是相当方便的。
由于YUI Uploader是利用javascript + flash实现的，所以用户的浏览器上只要有flash player就可以使用，也不需要额外安装别的插件了，这显然也是YUI Uploader的一大优势。
我的YUI Uploader试用之旅


				<span class="readmore"><a href="http://www.ooso.net/archives/405" title="我也试用YUI Uploader">阅读全文（1128字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>早就知道<a href="http://developer.yahoo.com/yui/">YUI</a>里面有Uploader这么一个上传组件，可以按住ctrl多选文件上传(就像flickr那样的上传)，并且可以支持进度条，这样对用户来说是相当方便的。</p>
<p>由于YUI Uploader是利用javascript + <a href="/?tag=flash">flash</a>实现的，所以用户的浏览器上只要有flash player就可以使用，也不需要额外安装别的插件了，这显然也是YUI Uploader的一大优势。</p>
<h3>我的YUI Uploader试用之旅</h3>
<ul>
<li>首先<a href="http://developer.yahoo.com/yui/examples/uploader/assets/uploader-advanced.zip">下载Uploader批量上传页的html源文件</a></li>
<li>解压后放置在你的web服务器上，比如我就是在自己的台式机上安装了一个xampp</li>
<li>现在需要一个处理上传操作的后端程序，在这里我是用php简单的写了一个，如果你用别的语言也是不成问题的。在<b>uploader-advanced-source.html</b>的同一目录下放置<b>upload.php</b>，源文件如下：
<pre><code>foreach ($_FILES as $fieldName =&gt; $file) {
	$name = md5(microtime());
	move_uploaded_file($file['tmp_name'], "./" . $name . '.jpg');
	echo $fieldName . ' uploaded!';
}</code></pre>
</li>
<li>下载http://yui.yahooapis.com/2.5.1/build/uploader/assets/uploader.swf，然后把<b>uploader.swf</b>放在和<b>upload.php</b>的同一目录下，这是为了避免javascript和flash交互过程中出现跨域问题。</li>
<li>修改uploader-advanced-source.html
<ul>
<li>把&#8221;YOUR UPLOAD URL GOES HERE&#8221;替换成你的upload.php所在的url，比如我的就是http://localhost/yui/upload.php
<li>把YAHOO.widget.Uploader.SWFURL修改成你的uploader.swf实际url</li>
</ul>
</li>
<li>现在访问uploader-advanced-source.html，试试批量上传功能吧</li>
</ul>
<h3>试用的一点补充</h3>
<ul>
<li>这个例子里面的php源文件只是考虑上传n张jpg文件的情况，可根据实际情况调整。</li>
<li>上传后的文件名是md5随机加密的，在upload.php同一目录可见</li>
<li>由于flash的bug，运行在windows下的firefox无法正确获得flash传递过来的cookie，如果上传应用对cookie有依赖，可能会需要做额外的处理。</li>
<li><del>为了能够确切的显示上传进度条，可能需要php 5.2的<a href="http://pecl.php.net/package/APC">apc</a>扩展支持</del></li>
<li>上传进度由flash完成</li>
<li>YUI 2.5.2已经附上uploader.swf的actionscript，有一定的学习价值</li>
</ul>
<h3>贴一张Uploader使用效果图</h3>
<p><img src="http://developer.yahoo.com/yui/examples/uploader/assets/uploader-advanced.jpg" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/405/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>JQUERY和YUI混用出现的问题</title>
		<link>http://www.ooso.net/archives/347</link>
		<comments>http://www.ooso.net/archives/347#comments</comments>
		<pubDate>Sat, 22 Mar 2008 03:06:30 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/?p=347</guid>
		<description><![CDATA[有道是一山不容二虎，其实我本不该把JQUERY和YUI夹杂在一块使用，虽然它们各有长短，结合使用的确能够相得益彰，但是暗地里还存着什么矛盾和冲突，这就不是随便刷新一下网页能够看出来的。
列一下最近碰到的问题，备忘。
混用时，YUI的Event在ie6下表现异常
下面代码中，没能在window.onload事件中弹出一个alert弹出窗口。

				<span class="readmore"><a href="http://www.ooso.net/archives/347" title="JQUERY和YUI混用出现的问题">阅读全文（342字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>有道是一山不容二虎，其实我本不该把<a href="/index.php?tag=jquery">JQUERY</a>和<a href="/index.php?tag=yui">YUI</a>夹杂在一块使用，虽然它们各有长短，结合使用的确能够相得益彰，但是暗地里还存着什么矛盾和冲突，这就不是随便刷新一下网页能够看出来的。</p>
<p>列一下最近碰到的问题，备忘。</p>
<h3>混用时，YUI的Event在ie6下表现异常</h3>
<p>下面代码中，没能在window.onload事件中弹出一个alert弹出窗口。</p>
<pre><code>&lt;script&gt;
YAHOO.util.Event.on(window, 'load', function() {alert('hello');});
&lt;/script&gt;</code></pre>
<p>猜想是jQuery重写了window.onload事件引起冲突，解决办法，使用jQuery的event。</p>
<pre><code>&lt;script&gt;
jQuery.event.add(window, "load", function() {alert('hello');});
&lt;/script&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/347/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YUI 2.5.0发布</title>
		<link>http://www.ooso.net/archives/382</link>
		<comments>http://www.ooso.net/archives/382#comments</comments>
		<pubDate>Thu, 21 Feb 2008 07:02:46 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/382</guid>
		<description><![CDATA[YUI 2.5.0发布。
2月20日，YUI Team发布了YUI的最新版本2.5.0。增加了6个全新的组件：Layout Manager, Uploader(结合Flash和Javascript的多文件上传引擎), Resize Utility, ImageCropper, Cookie Utility和ProfilerViewer Control。同时这一版还提升了DataTable Control的功能和Slider Control增加了双滑块功能。
这个版本中的Uploader以及ImageCropper应该是相当有用的控件

				<span class="readmore"><a href="http://www.ooso.net/archives/382" title="YUI 2.5.0发布">阅读全文（432字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="/?tag=yui">YUI</a> 2.5.0发布。</p>
<blockquote><p>2月20日，YUI Team发布了YUI的最新版本2.5.0。增加了6个全新的组件：Layout Manager, Uploader(结合Flash和Javascript的多文件上传引擎), Resize Utility, ImageCropper, Cookie Utility和ProfilerViewer Control。同时这一版还提升了DataTable Control的功能和Slider Control增加了双滑块功能。</p></blockquote>
<p>这个版本中的Uploader以及ImageCropper应该是相当有用的控件</p>
<ul>
<li>Uploader采用<a href="/?tag=javascript">javascript</a>和flash，不仅支持多文件上传，更可以直观的查看上传进度，以前虽然有类似的代码，但是组件化的代码显然通用性和可用性更好。</li>
<li>ImageCroper可用于制作图片切片，基于YUI的Dragdrop和Resize</li>
</ul>
<h3>与YUI 2.5.0相关的链接</h3>
<ul>
<li><a href="http://developer.yahoo.com/yui">http://developer.yahoo.com/yui</a></li>
<li><a href="http://www.yuiblog.cn/2008/02/21/47/">yuiblog.cn</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/382/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>YUI中国本地版</title>
		<link>http://www.ooso.net/archives/370</link>
		<comments>http://www.ooso.net/archives/370#comments</comments>
		<pubDate>Sun, 20 Jan 2008 08:31:02 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[yahoo]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/370</guid>
		<description><![CDATA[去年yahoo提供了公开的yui主机，这样即便自己没有server也可以直接使用yui的便利。但是由于主机在国外，访问速度不是很理想。现在终于有了本地版的yui hosting，访问速度有大的飞跃。
2008年1月14日雅虎中国正式发布本地版的YUI 2.4.1，今后将与YUI保持同步更新。这对国内的YUI使用者来说绝对是一个好消息，本地版的YUI采用了本地CDN部署，对于国内用户来说访问速度更快(图一)，比较访问国际YUI主机的速度(图二)快了至少5倍以上。
使用firebug查看载入速度


				<span class="readmore"><a href="http://www.ooso.net/archives/370" title="YUI中国本地版">阅读全文（259字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>去年<a href="/index.php?tag=yahoo">yahoo</a>提供了公开的yui主机，这样即便自己没有server也可以直接使用yui的便利。但是由于主机在国外，访问速度不是很理想。现在终于有了本地版的yui hosting，访问速度有大的飞跃。</p>
<blockquote><p>2008年1月14日雅虎中国正式发布本地版的YUI 2.4.1，今后将与YUI保持同步更新。这对国内的YUI使用者来说绝对是一个好消息，本地版的YUI采用了本地CDN部署，对于国内用户来说访问速度更快(图一)，比较访问国际YUI主机的速度(图二)快了至少5倍以上。</p></blockquote>
<h2>使用<a href="/index.php?tag=firebug">firebug</a>查看载入速度</h2>
<p><img width="98%" src="http://www.yuiblog.cn/wp-content/uploads/2008/01/yui2_1_4_all_js_files.PNG" alt="cn yui host" /></p>
<p>原文：<a href="http://www.yuiblog.cn/2008/01/14/yui%e6%9c%ac%e5%9c%b0%e7%89%88%e5%8f%91%e5%b8%83/">YUI Blog China</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/370/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YUI 2.3.0的Rich Text Editor</title>
		<link>http://www.ooso.net/archives/367</link>
		<comments>http://www.ooso.net/archives/367#comments</comments>
		<pubDate>Sun, 05 Aug 2007 00:05:56 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/367</guid>
		<description><![CDATA[YUI 2.3.0正式发布了。这个版本新增了一些新的组件，其中最大的亮点是它的Rich Text Editor (beta)，样式见下图：


YUI Rich Text Editor的特点

				<span class="readmore"><a href="http://www.ooso.net/archives/367" title="YUI 2.3.0的Rich Text Editor">阅读全文（299字）</a></span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.yahoo.com/yui/">YUI</a> 2.3.0正式发布了。这个版本新增了一些新的组件，其中最大的亮点是它的Rich Text Editor (beta)，样式见下图：<br />
<img src='http://www.ooso.net/wp-content/uploads/2007/08/rte.gif' alt='YUI Rich Text Editor' /></p>
<ul>
<h1>YUI Rich Text Editor的特点</h1>
<li><a href="http://developer.yahoo.com/yui/articles/gbs/">标识为A级的浏览器</a>支持良好，跨浏览器也有很好的表现</li>
<li>扩充方便，可以添加你自己的button</li>
<li>从图片上看，这个编辑器还支持直接从flickr抓取图片——可惜flickr在国内已经被和谐&#8230;</li>
</ul>
<ul>
<h1>YUI 2.3.0另外新增的5个组件</h1>
<li>Base CSS</li>
<li>YUILoader Utility (beta)</li>
<li>ImageLoader Utility (experimental)</li>
<li>Color Picker Control (beta)</li>
<li>YUI Test Utility (beta)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/367/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ajax+PHP+YUI手工制作rss阅读器</title>
		<link>http://www.ooso.net/archives/307</link>
		<comments>http://www.ooso.net/archives/307#comments</comments>
		<pubDate>Thu, 05 Jul 2007 00:06:14 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/307</guid>
		<description><![CDATA[上次俺的简陋练习作品Ajax+json小有心得，这次继续尝试利用Ajax+PHP+YUI手工制作rss阅读器。
写一点html来展示RSS的内容
&#60;body&#62;
&#60;h1&#62;RSS阅读器&#60;/h1&#62;

				<span class="readmore"><a href="http://www.ooso.net/archives/307" title="Ajax+PHP+YUI手工制作rss阅读器">阅读全文（901字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>上次俺的<a href="http://www.ooso.net/index.php/archives/160">简陋练习作品Ajax+json</a>小有心得，这次继续尝试利用Ajax+PHP+YUI手工制作rss阅读器。</p>
<h1>写一点html来展示RSS的内容</h1>
<pre><code>&lt;body&gt;
&lt;h1&gt;RSS阅读器&lt;/h1&gt;
&lt;div id="rss_bd"&gt;内容待填补&lt;/div&gt;
&lt;/body&gt;</code></pre>
<p><span id="more-307"></span></p>
<h1>利用<a href="http://developer.yahoo.com/yui/">YUI</a>的Connection manager来处理XHR</h1>
<p><a href="http://yahoo.cn">yahoo</a>已经提供了在线的YUI Hosting,直接引用:</p>
<pre><code>&lt;script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/connection/connection-min.js"&gt;&lt;/script&gt; 

&lt;script type="text/javascript"&gt;
var sUrl = 'proxy.php';
var callback =
{
  success: function(o) {
     document.getElementById('rss_bd').innerHTML = o.responseText;
  },
  failure: function(o) {/*failure handler code*/}
}
var transaction = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback, null);
&lt;/script&gt;</code></pre>
<p>很困，这部分没写完整，下次来补齐。</p>
<h1>用php做一个proxy来避免跨站访问的问题</h1>
<p><strong>proxy的要点</strong><br />
一定要输出header，否则在解析的时候你可能会遇到莫名奇妙的问题。<br />
如果你的服务器不支持远程url open，可以考虑使用curl，比如说在dreamhost的主机上</p>
<pre><code>&lt;?php
$searchUrl = 'http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&#038;results=4&#038;output=json&#038;query=';
if(!empty($_POST['query']))
 echo file_get_contents($searchUrl . $_POST['query']);
?&gt;</code></pre>
<p>到这里，一个简陋的RSS阅读器的雏形已经完备了。</p>
<h1>什么是ajax</h1>
<p>在百度知道上面搜索的答案，一本正经的告诉你：</p>
<blockquote><p>Ajax（Asynchronous JavaScript and XML）是结合了Java技术、XML以及JavaScript等编程技术，可以让开发人员构建基于Java技术的Web应用，并打破了使用页面重载的惯例。 </p></blockquote>
<p>看了后立马一口茶水做雾状均匀喷洒到本本的屏幕上，Ajax本身和java有嘛关系？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/307/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>YUI 2.3.0 即将发布</title>
		<link>http://www.ooso.net/archives/318</link>
		<comments>http://www.ooso.net/archives/318#comments</comments>
		<pubDate>Mon, 11 Jun 2007 00:07:14 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/318</guid>
		<description><![CDATA[YUI 2.3.0 即将发布,最迟七月份可以看到。新的YUI组件和特点:

1.  Rich Text Editor
The YUI RTE beta comprises an editor window and toolbar, the latter of which has a simple, extensible plugin architecture.  It will feature full A-grade support.  (Dav Glass)

				<span class="readmore"><a href="http://www.ooso.net/archives/318" title="YUI 2.3.0 即将发布">阅读全文（2057字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>YUI 2.3.0 即将发布,最迟七月份可以看到。新的<a href="http://developer.yahoo.com/yui/">YUI</a>组件和特点:</p>
<blockquote><p>
1.  Rich Text Editor<br />
The <a href="index.php?tag=yui">YUI</a> RTE beta comprises an editor window and toolbar, the latter of which has a simple, extensible plugin architecture.  It will feature full A-grade support.  (Dav Glass)</p>
<p>2.  ImageLoader Utility<br />
Images often constitute the most data-heavy parts of a page, but many times users load images that they never see — because the image is below the fold, because it is in an obscured tab in a TabView, etc.  The YUI ImageLoader is a new, experimental component that allows you to defer the loading of images based on criteria you specify and to then load those images when a specific &#8220;trigger&#8221; is hit.  In some cases, use of ImageLoader can significantly reduce bandwidth and increase performance. (Matt Mlinac)</p>
<p>3.  Base CSS<br />
YUI&#8217;s Reset CSS normalizes browser CSS styles by stripping out browser-defined styles; this allows you to begin your CSS styles with all style decisions being intentional rather than inherited.  YUI&#8217;s Base CSS will help you begin the process of making your styles intentional by providing a common set of treatments that most implementations share. (Nate Koechley)</p>
<p>4.  Color Picker<br />
Previous versions of YUI shipped a Color Picker example as part of the Slider Control.  In 2.3, we&#8217;re formalizing Color Picker and completing its API to make it easier to implement this powerful control in your apps. (Adam Moore)</p></blockquote>
<p>Notable Changes to Existing Components:</p>
<blockquote><p>1.  Button<br />
Button remains in beta as we modify the architecture a bit.  As of 2.3, the SplitButton implementation will replace MenuButton and be generic — allowing you to implement Buttons that have Menus or any other sub-control you wish. (Todd Kloots)</p>
<p>2.  Connection Manager<br />
YUI&#8217;s XHR utility will be enhanced with a Custom Event API that adds granularity to the interesting moments you can pipe into on your XHR transactions. (Thomas Sha)</p>
<p>3.  DataTable<br />
DataTable will undergo a major rearchitecture as it evolves to its second beta.  Details on the DataTable evolution for 2.3 will be presented during an open conference call for all interested implementers during the second half of June.  An invitation to the call will be sent out to this list a week prior to that call. (Jenny Han)</p>
<p>4.  Browser History Manager<br />
Browser History Manager comes out of experimental status with 2.3 and is promoted to beta, accompanied by several bug fixes and some key enhancements requested by YUI implementers during the experimental phase. (Julien Lecomte)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/318/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo提供公开的YUI Hosting</title>
		<link>http://www.ooso.net/archives/265</link>
		<comments>http://www.ooso.net/archives/265#comments</comments>
		<pubDate>Sat, 24 Feb 2007 02:14:31 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/265</guid>
		<description><![CDATA[最近YUI出了2.20版,紧接着就在其主机上免费提供YUI里用到的css,javascript以及图片.
免费提供的资源

JavaScript files: These files provide the functional behavior of YUI utilities and UI controls.

				<span class="readmore"><a href="http://www.ooso.net/archives/265" title="Yahoo提供公开的YUI Hosting">阅读全文（820字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>最近<a href="http://developer.yahoo.com/yui/">YUI</a>出了2.20版,紧接着就在其主机上免费提供YUI里用到的css,<a href="http://www.ooso.net/index.php/archives/category/javascript/">javascript</a>以及图片.</p>
<h3>免费提供的资源</h3>
<ul>
<li>JavaScript files: These files provide the functional behavior of YUI utilities and UI controls.</li>
<li>CSS files: In some cases, YUI controls ship with predefined visual designs, enabling you to implement them more easily out of the box. In these cases, presentation information is included in CSS files accompanying the control.</li>
<li>Image files: Where YUI controls have default visual designs, those designs may be supported by image assets.</li>
</ul>
<p>试了一下,可惜在国内的访问过去速度比较慢,要不然自己的服务器上就可以直接引用YUI了.详情见<a href="http://developer.yahoo.com/yui/articles/hosting/">这里</a></p>
<h3>什么是YUI?</h3>
<blockquote><p>Yahoo! User Interface Library</p>
<p>The Yahoo! User Interface (YUI) Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. The YUI Library also includes several core CSS resources. All components in the YUI Library have been released as open source under a BSD license and are free for all uses.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/265/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connection Manager  Of YUI</title>
		<link>http://www.ooso.net/archives/242</link>
		<comments>http://www.ooso.net/archives/242#comments</comments>
		<pubDate>Mon, 11 Sep 2006 15:29:37 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/242</guid>
		<description><![CDATA[前些天试用了Yahoo! UI Library的Connection Manager工具，略有些心得，这里丢块板砖出来，能不能引到玉，那是后话。
Connection Manager能干什么
The Connection Manager is a utility that enables you to make in-page HTTP requests through a simplified interface to the XMLHttpRequest object. The Connection Manager handles cross-browser instantiation of XMLHttpRequest, negotiates the server response and uses a callback pattern to process the response data.

				<span class="readmore"><a href="http://www.ooso.net/archives/242" title="Connection Manager  Of YUI">阅读全文（992字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>前些天试用了Yahoo! UI Library的Connection Manager工具，略有些心得，这里丢块板砖出来，能不能引到玉，那是后话。</p>
<h3>Connection Manager能干什么</h3>
<blockquote><p>The Connection Manager is a utility that enables you to make in-page HTTP requests through a simplified interface to the XMLHttpRequest object. The Connection Manager handles cross-browser instantiation of XMLHttpRequest, negotiates the server response and uses a callback pattern to process the response data.</p></blockquote>
<p>没话说，这是一个<a href="http://www.ooso.net/index.php/archives/category/ajax/">ajax</a>的<a href="http://www.ooso.net/index.php/archives/category/javascript/">javascript</a>类库，<a href="http://www.yahoo.cn">Yahoo</a>出品，嘿嘿。</p>
<h3>使用心得</h3>
<ul>
<li>打开程序包的build/connection目录，下有connection.js,connection-debug.js,connection-min.js,这三个文件其实内容都一样，第一个是正儿八经的源代码，中间那个不用说可以用于debug,最后那个也不是废柴，它经过压缩处理，javascript代码仅仅只有8k，相对connection.js高达20k肥硕体积来说，显然更经济，可用于线上系统。</li>
<li>这三个文件最好都要的：
<pre><code>&lt;!-- Dependency --&gt;
&lt;script src="yahoo.js"&gt;&lt;/script&gt;  

&lt;!-- OPTIONAL: Required if using setForm() to upload files --&gt;
&lt;script src="event.js"&gt;&lt;/script&gt;  

&lt;!-- Source file --&gt;
&lt;script src="connection.js"&gt;&lt;/script&gt;</code></pre>
</li>
<li>最后说个特好用的方法 —— setForm，这功能可以解析某个表单的内容，自动拼凑出用于ajax提交的数据串，甚至可以用于文件上传，实在是居家旅行必备。
<pre><code>var formObject = document.getElementById('aForm');
YAHOO.util.Connect.setForm(formObject);
// This example facilitates a POST transaction.
var cObj = YAHOO.util.Connect.asyncRequest('POST', 'http://www.yahoo.com', callback);</code></pre>
</li>
</ul>
<h3>详细说明</h3>
<p>http://developer.yahoo.com/yui/connection/</p>
<p>这阵子犯懒，只字未写，惭愧惭愧</p>
<p><strong>版权声明：可以任意转载，转载时请务必以超链接形式标明文章原始出处和作者信息及本声明</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/242/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用ajax+json连接yahoo搜索web service打造本地搜索引擎</title>
		<link>http://www.ooso.net/archives/160</link>
		<comments>http://www.ooso.net/archives/160#comments</comments>
		<pubDate>Tue, 07 Mar 2006 09:18:39 +0000</pubDate>
		<dc:creator>Volcano</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://www.ooso.net/index.php/archives/160</guid>
		<description><![CDATA[今天写了一个demo,利用yahoo提供的Yahoo! UI Library调用search web service,实现本地搜索.下面是代码片断说明:
调用Yahoo! UI Library Connection Manager的必要代码:
[javascript]


				<span class="readmore"><a href="http://www.ooso.net/archives/160" title="用ajax+json连接yahoo搜索web service打造本地搜索引擎">阅读全文（1819字）</a></span>]]></description>
			<content:encoded><![CDATA[<p>今天写了一个demo,利用yahoo提供的<a href="http://developer.yahoo.net/yui/index.html" target="_blank">Yahoo! UI Library</a>调用search web service,实现本地搜索.下面是代码片断说明:</p>
<p>调用Yahoo! UI Library Connection Manager的必要代码:<br />
[javascript]<!-- Namespace source file --><br />
<script src = "js/YAHOO.js" ></script><br />
<!-- Connection Manager source file --><br />
<script src = "js/connection.js" ></script>[/javascript]</p>
<p>查询表单<br />
[html]<br />
<form id="form1" name="form1" action="">
  关键字<br />
  :</p>
<input type="text" id="query" name="query" value="photo" />
<input type="button" name="Submit" value="搜索" onclick="searchIt(document.getElementById('query').value)" />
</form>
<p>[/html]<br />
<span id="more-160"></span></p>
<p>yahoo提供的的web service,可以直接以json的格式返回数据,也支持xml格式,这里采用json<br />
[javascript]<script type="text/javascript">
//yahoo提供的的web service
var searchUrl = 'http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&#038;results=4&#038;output=json&#038;query=';</p>
<p>var resultWin = document.getElementById('result');</p>
<p>var responseSuccess = function(o){ //调用成功后执行的函数
 //transaction success case logic
 eval('var rs =' + o.responseText);
 var tmp;
 var j = 0;</p>
<p> //这里以js格式化数据内容
 var content = '</p>
<ul>';
 for(i in rs.ResultSet.Result) {
  tmp = rs.ResultSet.Result[i];
  content+= '</p>
<li class="cols"><a target="_blank" href="' + tmp.ClickUrl + '"><img src="' + tmp.Thumbnail.Url + '" width="60" border="0" alt="' + tmp.Title + '"/></a></li>
<p>';</p>
<p>  if(j == 4) {
   j = 0;
   content+= '</p>
<div class="rows"></div>
<p>';
  } else {
   j++;
  }
 }
 content+= '</ul>
<p>';</p>
<p> resultWin.innerHTML = content;
 document.getElementById('debug').innerText = o.responseText;
}</p>
<p>//callback定义,见<a href="http://developer.yahoo.net/yui/connection/index.html">http://developer.yahoo.net/yui/connection/index.html</a>
var callback =
{
 success:responseSuccess
}</p>
<p>//查询
function searchIt(query) {
 if(!query)
  return;
 resultWin.innerHTML = '查找ing.....
<img src="images/searching.gif"/>';
 YAHOO.util.Connect.asyncRequest('POST', searchUrl + query, callback, null);
}</p>
<p></script>[/javascript]</p>
<p>最开始使用了上面的代码片段,在本机能够成功调用yahoo的web service,但是经常报跨站警报,相当不便.<br />
于是采用代理模式,写了个很简单的proxy.php,如下:</p>
<pre><code>&lt; ?php
$searchUrl = 'http://api.search.yahoo.com/ImageSearchService/V1/imageSearch?appid=YahooDemo&#038;results=4&#038;output=json&#038;query=';
if(!empty($_POST['query']))
 echo file_get_contents($searchUrl . $_POST['query']);
?&gt;</code></pre>
<p>而js部分只要做个小小调整</p>
<p>[javascript]var searchUrl = &#8216;proxy.php&#8217;;</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</p>
<p>//查询<br />
function searchIt(query) {<br />
 if(!query)<br />
  return;<br />
 resultWin.innerHTML = &#8216;查找ing&#8230;..<br />
<img src="images/searching.gif"/>&#8216;;<br />
 YAHOO.util.Connect.asyncRequest(&#8216;POST&#8217;, searchUrl, callback, &#8216;query=&#8217; + query);<br />
}[/javascript]<br />
最后就以这段简单的代码实现了本地搜索,你可以在此demo的基础上进一步完善,例如翻页,调整每页显示的数目等等,具体参数请参考<a href="http://developer.yahoo.net/search/local/V3/localSearch.html">http://developer.yahoo.net/search/local/V3/localSearch.html</a></p>
<p>解压密码:www.ooso.net<br />
<a href="http://www.ooso.net/cache/search.rar" target="_blank">demo下载</a></p>
<p>参考文档:<br />
<a href="http://developer.yahoo.net/yui/connection/index.html">http://developer.yahoo.net/yui/connection/index.html</a><br />
<a href="http://developer.yahoo.net/php/howto-parseRestPhp.html">http://developer.yahoo.net/php/howto-parseRestPhp.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ooso.net/archives/160/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

