<?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>Rainux's Journal &#187; Web Development 织网 Archives  &laquo; Rainux&#039;s Journal</title>
	<atom:link href="http://rainux.org/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://rainux.org</link>
	<description>Rubyist of Vimmer</description>
	<lastBuildDate>Sat, 23 Jul 2011 12:09:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Configure capybara-webkit to run acceptance specs with Javascript/AJAX</title>
		<link>http://rainux.org/configure-capybara-webkit-to-run-acceptance-specs-with-javascript-ajax</link>
		<comments>http://rainux.org/configure-capybara-webkit-to-run-acceptance-specs-with-javascript-ajax#comments</comments>
		<pubDate>Sat, 23 Jul 2011 12:09:18 +0000</pubDate>
		<dc:creator>Rainux</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development 织网]]></category>
		<category><![CDATA[Capybara]]></category>
		<category><![CDATA[capybara-webkit]]></category>
		<category><![CDATA[RSpec]]></category>

		<guid isPermaLink="false">http://rainux.org/?p=272</guid>
		<description><![CDATA[Add capybara-webkit to your Gemfile and let Guard::Bundler install it automatically (or manually via bundle install if you don't use Guard). gem 'capybara-webkit', '&#62;= 1.0.0.beta4' Set Javascript driver to :webkit for Capybara in spec_helper.rb. Capybara.javascript_driver = :webkit Configure RSpec use non-transactional fixtures, configure Database Cleaner in spec_helper.rb. Notice with this setup, we'll only use truncation [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li><p>Add <code>capybara-webkit</code> to your <code>Gemfile</code> and let <a href="https://github.com/guard/guard-bundler" rel="nofollow" >Guard::Bundler</a> install it automatically (or manually via <code>bundle install</code> if you don't use <a href="https://github.com/guard/guard" rel="nofollow" >Guard</a>).</p>

<pre name="code" class="ruby">gem 'capybara-webkit', '&gt;= 1.0.0.beta4'
</pre></li>
<li><p>Set Javascript driver to <code>:webkit</code> for Capybara in <code>spec_helper.rb</code>.</p>

<pre name="code" class="ruby">Capybara.javascript_driver = :webkit
</pre></li>
<li><p>Configure RSpec use non-transactional fixtures, configure <a href="https://github.com/bmabey/database_cleaner" rel="nofollow" >Database Cleaner</a> in <code>spec_helper.rb</code>.</p>

<p>Notice with this setup, we'll only use truncation strategy when driver is not <code>:rack_test</code>. this will make normal specs run faster.</p>

<pre name="code" class="ruby">config.use_transactional_fixtures = false

config.before :each do
  if Capybara.current_driver == :rack_test
    DatabaseCleaner.strategy = :transaction
    DatabaseCleaner.start
  else
    DatabaseCleaner.strategy = :truncation
  end
end

config.after :each do
  DatabaseCleaner.clean
end
</pre></li>
<li><p>Tag your scenarios in <code>spec/acceptance/*_spec.rb</code> to use Javascript driver if necessary.</p>

<pre name="code" class="ruby">scenario 'Create a lolita via AJAX', :js =&gt; true do
end
</pre></li>
<li><p>Wait for any AJAX call to be completed in your specs. This is very important, or you will get many strange issues like no database record found, AJAX call get empty response with 0 status code, etc.</p>

<p>For example if you have a simple AJAX form, the <code>success</code> callback will simply redirect browser to another page via <code>location.href = '/yet_another_page';</code>. You can use the following code to wait for it done.</p>

<pre name="code" class="ruby">scenario 'Create a lolita via AJAX', :js =&gt; true do
  visit new_lolita_path

  click_on 'Submit'

  wait_until { page.current_path == lolita_path(Lolita.last) }

  # Your expections for the new page
end
</pre></li>
</ul>

	标签：<a href="http://rainux.org/tag/capybara/" title="Capybara" rel="tag">Capybara</a>, <a href="http://rainux.org/tag/capybara-webkit/" title="capybara-webkit" rel="tag">capybara-webkit</a>, <a href="http://rainux.org/tag/rspec/" title="RSpec" rel="tag">RSpec</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rainux.org/configure-capybara-webkit-to-run-acceptance-specs-with-javascript-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>推荐一些 Ruby on Rails 学习资料</title>
		<link>http://rainux.org/tutorials-and-references-for-ruby-on-rails-learning</link>
		<comments>http://rainux.org/tutorials-and-references-for-ruby-on-rails-learning#comments</comments>
		<pubDate>Tue, 11 Jan 2011 18:04:34 +0000</pubDate>
		<dc:creator>Rainux</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://rainux.org/?p=265</guid>
		<description><![CDATA[Ruby 开始之前应该看看 Ruby 官方网站 上的 About Ruby、Ruby in Twenty Minutes 和 Ruby From Other Languages 得到初步的印象和感性认识。在页面底部可以选择语言查看中文版。 经验比较丰富的开发者可以通过 Ruby User's Guide [注1] 快速入门 Ruby，之后应该准备一本 The Ruby Programming Language 作为日常参考。因为作为 Ruby 语言创始人松本行弘参与编写的书籍，它对 Ruby 语言的介绍最完整。而世界上第一本介绍 Ruby 语言的英文书籍 Programming Ruby 大概是最多人用于入门 Ruby 的书籍，虽然对于有经验的开发者来说它稍显啰嗦。Programming Ruby 第一版有提供免费的在线版本。如果你还没有任何程序设计经验，Ruby Programming: 向Ruby之父学程序设计 应该是不错的选择，作者高桥征义是日本 Ruby 协会会长。 Rails 同样，有经验的开发者可以直接通过 Ruby on Rails Guides 入门 Rails。而 Agile [...]]]></description>
			<content:encoded><![CDATA[<h2>Ruby</h2>

<p>开始之前应该看看 <a href="http://www.ruby-lang.org/" rel="nofollow" >Ruby 官方网站</a> 上的 <a href="http://www.ruby-lang.org/en/about/" rel="nofollow" >About Ruby</a>、<a href="http://www.ruby-lang.org/en/documentation/quickstart/" rel="nofollow" >Ruby in Twenty Minutes</a> 和 <a href="http://www.ruby-lang.org/en/documentation/ruby-from-other-languages/" rel="nofollow" >Ruby From Other Languages</a> 得到初步的印象和感性认识。在页面底部可以选择语言查看中文版。</p>

<p>经验比较丰富的开发者可以通过 <a href="http://www.rubyist.net/~slagell/ruby/" rel="nofollow" >Ruby User's Guide</a> [注1] 快速入门 Ruby，之后应该准备一本 <a href="http://books.google.com/books?id=jcUbTcr5XWwC" rel="nofollow" >The Ruby Programming Language</a> 作为日常参考。因为作为 Ruby 语言创始人松本行弘参与编写的书籍，它对 Ruby 语言的介绍最完整。而世界上第一本介绍 Ruby 语言的英文书籍 <a href="http://ruby-doc.org/docs/ProgrammingRuby/" rel="nofollow" >Programming Ruby</a> 大概是最多人用于入门 Ruby 的书籍，虽然对于有经验的开发者来说它稍显啰嗦。Programming Ruby 第一版有提供免费的在线版本。如果你还没有任何程序设计经验，<a href="http://www.china-pub.com/195252" rel="nofollow" >Ruby Programming: 向Ruby之父学程序设计</a> 应该是不错的选择，作者高桥征义是日本 Ruby 协会会长。</p>

<h2>Rails</h2>

<p>同样，有经验的开发者可以直接通过 <a href="http://guides.rubyonrails.org/" rel="nofollow" >Ruby on Rails Guides</a> 入门 Rails。而 <a href="http://pragprog.com/titles/rails4/agile-web-development-with-rails" rel="nofollow" >Agile Web Development with Rails</a> 则大概是最多人用于入门 Rails 的书籍，它的第四版已经使用目前最新的 Rails 3。</p>

<h2>中文资料</h2>

<p><a href="http://twitter.com/ihower" rel="nofollow" >@ihower</a> 组织的 <a href="http://ruby.tw" rel="nofollow" >Ruby Taiwan</a> 社区有提供 <a href="http://guides.ruby.tw/ruby/" rel="nofollow" >Ruby User's Guide</a> 的繁体中文翻译以及 <a href="http://guides.ruby.tw/rails3/" rel="nofollow" >Ruby on Rails Guides</a> 前两章的繁体中文翻译。<a href="http://twitter.com/ihower" rel="nofollow" >@ihower</a> 自己编写的 <a href="http://ihower.tw/rails3/" rel="nofollow" >Ruby on Rails 實戰手冊</a> 也是一部很不错的面向有一定经验开发者的在线书籍。</p>

<h2>其它</h2>

<p>Ruby on Rails 社区非常注重代码的美观及可读性。使用相同的 coding style 是保证代码美观可读的有效措施之一，所以在自己尝试写代码时应该看看 <a href="https://github.com/chneukirchen/styleguide/blob/master/RUBY-STYLE" rel="nofollow" >Ruby Coding Style Guide</a>。</p>

<p>真正开始使用 Ruby on Rails 之后，<a href="http://www.railsapi.com/" rel="nofollow" >Rails Searchable API Doc</a> 和 <a href="http://rdoc.info/" rel="nofollow" >RubyDoc.info</a> 一定会是最常用的两个在线文档服务。</p>

<p>注1: Ruby User's Guide 写于 Ruby 1.8.3 时代，现在建议使用的 Ruby 版本是 1.8.7。文中提到的 eval.rb 应该使用 irb 取代，另外可以使用 <a href="https://github.com/janlelis/irbtools" rel="nofollow" >irbtools</a> 大幅度增强 irb。Ruby Taiwan 的繁体中文翻译版本对类似问题有提供译注，建议参考。</p>
该日志未加标签。]]></content:encoded>
			<wfw:commentRss>http://rainux.org/tutorials-and-references-for-ruby-on-rails-learning/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>禁止浏览器发送 HTTP_REFERRER header 保护私密网站 URL</title>
		<link>http://rainux.org/disable-browser-to-send-http_referrer-header-to-protect-private-url</link>
		<comments>http://rainux.org/disable-browser-to-send-http_referrer-header-to-protect-private-url#comments</comments>
		<pubDate>Sat, 16 Jan 2010 15:37:56 +0000</pubDate>
		<dc:creator>Rainux</dc:creator>
				<category><![CDATA[Software 软件]]></category>
		<category><![CDATA[Web Development 织网]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://rainux.org/?p=254</guid>
		<description><![CDATA[今天看到 Twitter 上有人讨论浏览器发送 HTTP&#95;REFERRER header 导致民间 Twitter Web 客户端地址被泄露的问题。研究了一下，这个问题的最终解决都需要依靠浏览器，网站自己没有办法强制禁止浏览器发送 HTTP_REFERRER header。 Chrome/Chromium Chrome/Chromium 的 WebKit 内核最新版支持 HTML5 里的 noreferrer link relation。这个功能允许网页作者在 a 和 area 元素里简单地使用值为 noreferrer 的 rel 属性来禁止浏览器向链接目标发送 HTTP&#95;REFERRER header。例如： &#60;a href="http://evil.com" rel="noreferrer"&#62;Evil&#60;/a&#62; 当用户点击这个链接访问 evil.com 时，对方只会收到一个空白的 HTTP&#95;REFERRER header。在 Windows 版的 Chrome 4.0.295.0 dev 上测试通过。 Firefox Firefox 的扩展 Adaptive Referer Remover 可以禁止指定的 URL 出现在 HTTP&#95;REFERRER [...]]]></description>
			<content:encoded><![CDATA[<p>今天看到 Twitter 上有人讨论浏览器发送 HTTP&#95;REFERRER header 导致民间 Twitter Web 客户端地址被泄露的问题。研究了一下，这个问题的最终解决都需要依靠浏览器，网站自己没有办法强制禁止浏览器发送 HTTP_REFERRER header。</p>

<h2>Chrome/Chromium</h2>

<p>Chrome/Chromium 的 WebKit 内核最新版支持 HTML5 里的 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#link-type-noreferrer" rel="nofollow" >noreferrer link relation</a>。这个功能允许网页作者在 a 和 area 元素里简单地使用值为 noreferrer 的 rel 属性来禁止浏览器向链接目标发送 HTTP&#95;REFERRER header。例如：</p>

<pre name="code" class="html">&lt;a href="http://evil.com" rel="noreferrer"&gt;Evil&lt;/a&gt;
</pre>

<p>当用户点击这个链接访问 evil.com 时，对方只会收到一个空白的 HTTP&#95;REFERRER header。在 Windows 版的 Chrome 4.0.295.0 dev 上测试通过。</p>

<h2>Firefox</h2>

<p>Firefox 的扩展 <a href="https://addons.mozilla.org/en-US/firefox/addon/1093" rel="nofollow" >Adaptive Referer Remover</a> 可以禁止指定的 URL 出现在 HTTP&#95;REFERRER header 里。它使用正则表达式来匹配要保护的 URL。普通的 URL 转换成它需要的正则表达式很简单，只需要在前面加 ^ 并把 . 改成 &#46; 即可。例如：</p>

<pre><code>^http://rainux.org
^http://search\.twitter\.com
</code></pre>

<p>另一个更简单但比较极端的做法是在 about:config 里将 <a href="http://kb.mozillazine.org/Network.http.sendRefererHeader" rel="nofollow" >network.http.sendRefererHeader</a> 设置为 0，这样会完全禁止 Firefox 向任何网站发送 HTTP&#95;REFERRER header。</p>

<h2>Opera</h2>

<p>Tools-> Preferences-> Advanced-> Network-> Send referrer information 去掉勾选。（感谢 <a href="http://vvoody.org" rel="nofollow" >vvoody</a> 补充）</p>

<h2>Internet Explorer</h2>

<p>别开玩笑了，<a href="http://news.bbc.co.uk/2/hi/technology/8460819.stm" rel="nofollow" >IE 的漏洞都导致 Google 重要服务被攻破</a> 而被迫退出中国了，你还敢用它？</p>

	标签：<a href="http://rainux.org/tag/twitter/" title="Twitter" rel="tag">Twitter</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rainux.org/disable-browser-to-send-http_referrer-header-to-protect-private-url/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>使用 Function.apply.apply() 为 IE 里的原生函数添加 .apply() 方法</title>
		<link>http://rainux.org/%e4%bd%bf%e7%94%a8-function-apply-apply-%e4%b8%ba-ie-%e9%87%8c%e7%9a%84%e5%8e%9f%e7%94%9f%e5%87%bd%e6%95%b0%e6%b7%bb%e5%8a%a0-apply-%e6%96%b9%e6%b3%95</link>
		<comments>http://rainux.org/%e4%bd%bf%e7%94%a8-function-apply-apply-%e4%b8%ba-ie-%e9%87%8c%e7%9a%84%e5%8e%9f%e7%94%9f%e5%87%bd%e6%95%b0%e6%b7%bb%e5%8a%a0-apply-%e6%96%b9%e6%b3%95#comments</comments>
		<pubDate>Sun, 13 Dec 2009 09:14:20 +0000</pubDate>
		<dc:creator>Rainux</dc:creator>
				<category><![CDATA[Programming 编程]]></category>
		<category><![CDATA[Web Development 织网]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://rainux.org/?p=246</guid>
		<description><![CDATA[IE 里有很多原生的 Javascript 函数实际上都不是一个标准的 Function 对象，例如 window.alert，window.setTimeout 以及 IE8 的 window.console.log 等。在需要对这样的函数进行包装的时候，会因为它们都没有 Function 对象应该有的 .apply() 及 .call() 方法而难以做到。 这段代码为了兼容旧版本没有 console 的浏览器，尝试将 console.log 包装为 $.log，但是基于上述原因它在 IE 里无法执行。 $ = {}; if (console &#38;&#38; console.log) { $.log = function() { console.log.apply(console, arguments); }; } else { $.log = function() {}; } 由于 window 和 console 这样的原生对象都是只读的，所以无法使用类似这样的代码简单地为其添加 .apply() [...]]]></description>
			<content:encoded><![CDATA[<p>IE 里有很多原生的 Javascript 函数实际上都不是一个标准的 Function 对象，例如 window.alert，window.setTimeout 以及 IE8 的 window.console.log 等。在需要对这样的函数进行包装的时候，会因为它们都没有 Function 对象应该有的 .apply() 及 .call() 方法而难以做到。</p>

<p>这段代码为了兼容旧版本没有 console 的浏览器，尝试将 console.log 包装为 $.log，但是基于上述原因它在 IE 里无法执行。</p>

<pre name="code" class="javascript">$ = {};

if (console &amp;&amp; console.log) {
    $.log = function() {
        console.log.apply(console, arguments);
    };
} else {
    $.log = function() {};
}
</pre>

<p>由于 window 和 console 这样的原生对象都是只读的，所以无法使用类似这样的代码简单地为其添加 .apply() 方法。</p>

<pre name="code" class="javascript">console.log.apply = Function.apply;
</pre>

<p>解决办法是使用 Function.apply.apply() 将 Function.apply 函数对象 apply 到 console.log 上。</p>

<pre name="code" class="javascript">$ = {};

if (console &amp;&amp; console.log) {
    $.log = function() {
        Function.apply.apply(console.log, [console, arguments]);
    };
} else {
    $.log = function() {};
}
</pre>

<p>这段代码和第一段代码完全等价。</p>

<p>如果觉得不容易理解，可以看看这个 .apply() 函数比较清晰的例子。这两行代码也完全等价。</p>

<pre name="code" class="javascript">[1, 2, 3, 4].slice(0, 2);
Array.prototype.slice.apply([1, 2, 3, 4], [0, 2]);
</pre>

	标签：<a href="http://rainux.org/tag/javascript/" title="Javascript" rel="tag">Javascript</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rainux.org/%e4%bd%bf%e7%94%a8-function-apply-apply-%e4%b8%ba-ie-%e9%87%8c%e7%9a%84%e5%8e%9f%e7%94%9f%e5%87%bd%e6%95%b0%e6%b7%bb%e5%8a%a0-apply-%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>六月真是个好时节啊</title>
		<link>http://rainux.org/%e5%85%ad%e6%9c%88%e7%9c%9f%e6%98%af%e4%b8%aa%e5%a5%bd%e6%97%b6%e8%8a%82%e5%95%8a</link>
		<comments>http://rainux.org/%e5%85%ad%e6%9c%88%e7%9c%9f%e6%98%af%e4%b8%aa%e5%a5%bd%e6%97%b6%e8%8a%82%e5%95%8a#comments</comments>
		<pubDate>Thu, 05 Jun 2008 02:44:46 +0000</pubDate>
		<dc:creator>Rainux</dc:creator>
				<category><![CDATA[Software 软件]]></category>
		<category><![CDATA[Web Development 织网]]></category>
		<category><![CDATA[Software_软件]]></category>
		<category><![CDATA[Web_Development_织网]]></category>

		<guid isPermaLink="false">http://www.rainux.org/2008/06/05/228</guid>
		<description><![CDATA[Ruby 1.8.7 和 Rails 2.1.0 前两天相继发布。Firefox 3.0 昨天进入 rc2 阶段，并且将在六月中旬发布 3.0 正式版。开发了十五年的 Wine 终于进入 1.0 的 rc 阶段，并且即将发布 1.0 正式版。 看来是时候更新 SCV Selector 了，可惜预想了很久的 rep 版本识别还是没有时间去研究…… 标签：Software_软件, Web_Development_织网]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/" rel="nofollow" >Ruby 1.8.7</a> 和 <a href="http://blog.rubyonrails.org/2008/6/1/rails-2-1-time-zones-dirty-caching-gem-dependencies-caching-etc" rel="nofollow" >Rails 2.1.0</a> 前两天相继发布。<a href="http://www.mozilla.com/en-US/firefox/3.0rc2/releasenotes/" rel="nofollow" >Firefox 3.0 昨天进入 rc2 阶段</a>，并且将在六月中旬发布 3.0 正式版。开发了十五年的 <a href="http://wiki.winehq.org/WineReleasePlan" rel="nofollow" >Wine 终于进入 1.0 的 rc 阶段</a>，并且即将发布 1.0 正式版。</p>

<p>看来是时候更新 SCV Selector 了，可惜预想了很久的 rep 版本识别还是没有时间去研究……</p>

	标签：<a href="http://rainux.org/tag/software_%e8%bd%af%e4%bb%b6/" title="Software_软件" rel="tag">Software_软件</a>, <a href="http://rainux.org/tag/web_development_%e7%bb%87%e7%bd%91/" title="Web_Development_织网" rel="tag">Web_Development_织网</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rainux.org/%e5%85%ad%e6%9c%88%e7%9c%9f%e6%98%af%e4%b8%aa%e5%a5%bd%e6%97%b6%e8%8a%82%e5%95%8a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>很爽的 Rails CHM Documentation 2.0.2</title>
		<link>http://rainux.org/%e5%be%88%e7%88%bd%e7%9a%84-rails-api-documentation-chm-%e7%89%88%e6%9c%ac</link>
		<comments>http://rainux.org/%e5%be%88%e7%88%bd%e7%9a%84-rails-api-documentation-chm-%e7%89%88%e6%9c%ac#comments</comments>
		<pubDate>Fri, 30 May 2008 07:49:52 +0000</pubDate>
		<dc:creator>Rainux</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.rainux.org/2008/05/30/225</guid>
		<description><![CDATA[delynn 老兄终于发布了他的 Rails CHM Documentation 的 2.0.2 版，再也不用忍受 RailsBrain.com 那个 Rails API with the AJAX flavor 糟糕的目录结构了。 网上流传的所有 Rails 文档都是用 rdoc 从 Rails 源代码里的 RDoc 注释自动生成的，内容都完全一样。但只有这位 delynn 老兄的 Rails CHM Documentation 目录是手工整理的，按照 Module 分类，结构非常清晰。 标签：Ruby on Rails]]></description>
			<content:encoded><![CDATA[<p><a href="http://delynnberry.com/" rel="nofollow" >delynn</a> 老兄终于发布了他的 <a href="http://delynnberry.com/projects/rails-chm-documentation/" rel="nofollow" >Rails CHM Documentation</a> 的 2.0.2 版，再也不用忍受 <a href="http://www.railsbrain.com/" rel="nofollow" >RailsBrain.com</a> 那个 <a href="http://www.railsbrain.com/api/rails-2.0.2/doc/index.html" rel="nofollow" >Rails API with the AJAX flavor</a> 糟糕的目录结构了。</p>

<p>网上流传的所有 Rails 文档都是用 rdoc 从 Rails 源代码里的 RDoc 注释自动生成的，内容都完全一样。但只有这位 delynn 老兄的 Rails CHM Documentation 目录是手工整理的，按照 Module 分类，结构非常清晰。</p>

	标签：<a href="http://rainux.org/tag/ruby-on-rails/" title="Ruby on Rails" rel="tag">Ruby on Rails</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rainux.org/%e5%be%88%e7%88%bd%e7%9a%84-rails-api-documentation-chm-%e7%89%88%e6%9c%ac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>第一次做网站</title>
		<link>http://rainux.org/%e7%ac%ac%e4%b8%80%e6%ac%a1%e5%81%9a%e7%bd%91%e7%ab%99</link>
		<comments>http://rainux.org/%e7%ac%ac%e4%b8%80%e6%ac%a1%e5%81%9a%e7%bd%91%e7%ab%99#comments</comments>
		<pubDate>Thu, 24 Mar 2005 19:18:55 +0000</pubDate>
		<dc:creator>Rainux</dc:creator>
				<category><![CDATA[Personal 个人]]></category>
		<category><![CDATA[Web Development 织网]]></category>
		<category><![CDATA[Personal_个人]]></category>
		<category><![CDATA[Web_Development_织网]]></category>

		<guid isPermaLink="false">http://www.rainux.org/2005/03/25/103</guid>
		<description><![CDATA[给朋友的公司做的网站刚刚完工，心中窃喜不已。 接触 HTML 已经是很久以前的事了，却从来不曾做过比一张极其简单的网页更多的东西。听说 CSS 也是在很久以前了，但是在架设/维护我的这个 Blog 之前，对 CSS 的认识也没有超过“能够设置固定大小的漂亮的 9pt 字”这个范围。一直以为自己没有真正的学过 HTML，一直不敢在 Dreamweaver 里闲逛，总觉得他们都是那么深奥和高不可攀。 在答应朋友“只是修改一下页面，添加一些内容”的要求后，我都一直心里没底，不敢随便承诺完工时间。用 DW 看了一番他的网站以前的页面代码，发现这些用表格布局的页面代码糟糕透了。再加上页面设计也不符合我的审美观，如果要改可能要花费很多时间而且还会搞得心情不好 (代码实在太乱) ，想了半天还是决定仿照现有的布局用 DIV + CSS 完全重新做一个。 到 Tinyfool 推荐的网站网页设计师去看了一下，盗用了一篇文章里的三行二列居中高度自适应布局的 CSS。又到桑葚的桑林志去打劫了他的导航菜单 CSS 和 JS。OK，该开始了，工具自然是三大利器/名器 Dreamweaver MX 2004、TopStyle 和 EditPlus 了 (我暂时还无法用 vim 取代 EditPlus)。 没想到真正开始了并不如我想象中难。虽然以前几乎没正式用过 DW，但是一切的感觉都是那么的自然。定义站点，使用模板，手工编写代码…… 突然发现原来我还是会 HTML 的，CSS 也并不是那么复杂，常用的也不过就是盒式模型的几个基本属性。 当然事情不可能总是很顺利的，何况 DIV + CSS 布局某些地方本来就比表格难一些。好在我几乎没做过东西，对表格没有依恋。也看过一些文章和代码，知道表格布局的坏处。这样一来反倒比熟悉了表格的人适应 DIV + CSS [...]]]></description>
			<content:encoded><![CDATA[<p>给<a href="http://www.cdbroad.com" rel="nofollow" >朋友的公司</a>做的网站刚刚完工，心中窃喜不已。</p>

<p>接触 HTML 已经是很久以前的事了，却从来不曾做过比一张极其简单的网页更多的东西。听说 CSS 也是在很久以前了，但是在架设/维护我的这个 Blog 之前，对 CSS 的认识也没有超过“能够设置固定大小的漂亮的 9pt 字”这个范围。一直以为自己没有真正的学过 HTML，一直不敢在 Dreamweaver 里闲逛，总觉得他们都是那么深奥和高不可攀。</p>

<p>在答应朋友“只是修改一下页面，添加一些内容”的要求后，我都一直心里没底，不敢随便承诺完工时间。用 DW 看了一番他的网站以前的页面代码，发现这些用表格布局的页面代码糟糕透了。再加上页面设计也不符合我的审美观，如果要改可能要花费很多时间而且还会搞得心情不好 (代码实在太乱) ，想了半天还是决定仿照现有的布局用 DIV + CSS 完全重新做一个。<span id="more-103"></span></p>

<p>到 <a href="http://www.tinydust.net" rel="nofollow" >Tinyfool</a> 推荐的网站<a href="http://www.w3cn.org" rel="nofollow" >网页设计师</a>去看了一下，盗用了一篇文章里的<a href="http://www.w3cn.org/article/layout/2004/88.html" rel="nofollow" >三行二列居中高度自适应布局</a>的 CSS。又到桑葚的<a href="http://yanfeng.org/blog" rel="nofollow" >桑林志</a>去打劫了他的导航菜单 CSS 和 JS。OK，该开始了，工具自然是三大利器/名器 Dreamweaver MX 2004、TopStyle 和 EditPlus 了 (我暂时还无法用 vim 取代 EditPlus)。</p>

<p>没想到真正开始了并不如我想象中难。虽然以前几乎没正式用过 DW，但是一切的感觉都是那么的自然。定义站点，使用模板，手工编写代码…… 突然发现原来我还是会 HTML 的，CSS 也并不是那么复杂，常用的也不过就是盒式模型的几个基本属性。</p>

<p>当然事情不可能总是很顺利的，何况 DIV + CSS 布局某些地方本来就比表格难一些。好在我几乎没做过东西，对表格没有依恋。也看过一些文章和代码，知道表格布局的坏处。这样一来反倒比熟悉了表格的人适应 DIV + CSS 容易些。布局中遇到的一些小问题，左思右想用灵活而强大的 CSS 解决后，那种感觉真的很棒。</p>

<p>制作中积累的一些微不足道的小经验，我会找时间写出来放在这里，一则备忘，二则方便比我还 newbie 的朋友。(好像不会有吧？:)</p>

	标签：<a href="http://rainux.org/tag/personal_%e4%b8%aa%e4%ba%ba/" title="Personal_个人" rel="tag">Personal_个人</a>, <a href="http://rainux.org/tag/web_development_%e7%bb%87%e7%bd%91/" title="Web_Development_织网" rel="tag">Web_Development_织网</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rainux.org/%e7%ac%ac%e4%b8%80%e6%ac%a1%e5%81%9a%e7%bd%91%e7%ab%99/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

