2009年6月28日 星期日

Ruby on Rails Unobstrusive jQuery

Ruby on Rails 的終極 Unobstrusive jQuery 方案

利用yield 把各頁面所有的javascript 擺到整個頁面底部

利用innterHTML 插入大量html時會有的問題

Ways to increase performance when set big value to innerHTML
Asynchronous innerHTML
異步 innerHTML

還有Fastest way to build an HTML string
盡量減少string 直接相加, 利用array join 是最快的

2009年6月22日 星期一

Improving the Usability of Your Ruby on Rails Applications

Improving the Usability of Your Ruby on Rails Applications


每個人都有自己的喜好, 都以為自己是設計師, 但是其實designer , developer 都不是, 請找真正的user 做測試

七個原則

1. Create Structure
Organize Prioritize Group Separate Differentiate



2. Use standard
User 大部分的時間在其他網站 所以跟著一般的習慣吧 Follow conventions



3. Be predicatble
做出能讓user 預期的到的介面 行為


4. Reduce Barriers
user 在網站最常做的動作就是離開 所以給個能簡單快速註冊的方式吧


5. Add Affordance


什麼介面都是需要學習的 所以讓一切的東西都變大吧



6. Give Feedback
給所有user 做的動作一個回應 讓他知道正在做或做完了


7. Simplity



所有的選擇都是麻煩 把所有不必要資訊拿掉吧

2009年6月18日 星期四

apache RewriteCond , RewriteRule

如何讓 MediaWiki 可以使用漂亮的網址
Apache Module mod_rewrite

Ajax File Uploads in Rails

Ajax File Uploads in Rails
jaxy_file_uploads

2009年6月17日 星期三

git github capistrano in hostingrails

github Guides: Deploying with Capistrano feed
How to Deploy Rails Using Git with Capistrano on Mongrel with HostingRails
Using Capistrano with Passenger (mod_rails)

my deploy.rb


備忘

2009年6月12日 星期五

顯示捲動條

活在人家的iframe 裡, 想打開捲軸就得自己來了

rails 用gmail 寄信

How To: Use GMail as your mail server for Rails 2.0!
smtp_tls.rb incompatible with ruby 1.8.7

如果你是ruby 1.8.6 那麼你需要這個plugin action_mailer_tls

Ruby 1.8.7 supports SMTP TLS and Rails 2.2.1 ships with an option to enable it if you're running Ruby 1.8.7.

load image when ajax loading

How do you do a JQuery Ajax Loading Div complete with loading gif?

2009年6月1日 星期一

jquery image or element load 完在做某些事

load
Bind a function to the load event of each matched element.

sharedcopy

可以讓人家在網頁上做些註解, 甚至還可以把這連結分享給別人也一起做

The SharedCopy Demo from choonkeat on Vimeo.




Howto: create your own SharedCopy addon - part 1
Howto: create your own SharedCopy addon - part 2
sharedcopy

Mechanize, http, get, post

通過Mechanize模擬一般的瀏覽器行為來完成與網頁之間的交互動作

The wonders of WWW:Mechanize and Rails
The wonders of WWW:Mechanize and Rails part 2: the HMS Contr
在Ruby中使用WWW::Mechanize來開發爬蟲程序.

Mechanize對WEB的操作
mechanize-0.9.2 Documentation