PCSH91_305 板


LINE

http://blog.xdite.net/ http://yehudakatz.com/ Rails 3 的野望 (Rails 合併 Merb 後目前的進展) 這一篇想寫很久了,一直忘記。 大家應該還記得,Merb 在 2008 年底宣布了一個決定,他們決定併入 Rails。而 Merb 的 Team Leader:Yehuda Katz,也將加入 Rails core team 開發。於是未來 Merb2 將 直接等於 Rails3。 當時,這件事是非常令人震撼的。原因是 Rails 雖然是一個非常先進的框架,但是還是 有非常多開發者,因為它的包山包海(笨重、效能不彰)而卻步。於是,他們選擇了另外 一套框架 Merb。Merb 的想法和架構其實是很棒的,它既可以是一個 full stack 的 Framework,又可以讓開發者用 cherry pick library 的方式建構網站。有很多 Merb 派的開發者,甚至就是因為前述原因才跳槽過來的。 因此它們的合併,無異是向社群投了一個大炸彈。很多 Merb 的擁護者當時紛紛表示不能 接受,甚至大家都湧上「Merb core team 的人是集體腦袋燒壞掉了嗎」的強烈疑惑,認 為 Merb 選擇被 Rails 整併是大錯特錯的愚蠢決定。 我當初也這麼想,但近半年來,追看 Edge Rails 的發展,我才發現所有人(包括 DHH) ,都被 Yehuda 騙了。 在 DHH 當初的 Announce 提到了 Rails 3 將會有的是: * Rails core: Yes, Rails is a full-stack framework and will remain so, but there’s no reason we shouldn’t also make it possible to run with less than the full monty. Rails 3 will make it easy to run just a bare minimum and then allow you to opt in just the stuff you want, if that’s necessary for your particular situation. Think “rails myapp—core” (and “rails myapp— flat”). * Performance optimizations: Merb has a lot of Rails pieces rewritten to be faster. We’ll be bringing all that good stuff over. We’ll also bend the architecture in the places where that’s necessary for a big yield. In short, Rails 3 will get all the performance attention that the Merb guys are known for. * Framework agnosticism: Rails will always have a default answer to every question within the stack. If you don’t care about testing frameworks, you’ ll get test/unit. If you don’t care about which ORM, you’ll get Active Record. But some people do care and want something else. Some people want RSpec for testing, others want to use Sequel or Data Mapper for ORM, others again prefer Haml for templating, and some might prefer jQuery for Ajax. All these people should feel like Rails is welcoming them with open arms. Yes, we ’ll have a default, but we shouldn’t have any form of discrimination against alternatives. * Rigorous API: Too many plugins break when Rails is updated because it’ s not clear where they can safely hook into the internals and when they’re monkeypatching and should expect things to break. The Merb guys committed to a public API with tests to ensure that it wouldn’t break. They’ll bring over that line of thinking and give Rails 3 a tested and documented API for extensions that won’t break willy-nilly with upgrades. 大家看到 Rigorous API 這段 一定以為 Yehuda 當初的提議是的改版是,發明一套神奇 的 API,讓 plugin 不再爛掉。再加上前三條以上 blahblah 的好處 …不過大家看的半 信半疑,感覺上好像都是虎爛,應該完全做不到吧….。 OK。但到目前為止,結果 Yehuda 目前的成果到了什麼地步呢? Merb 反過來吃掉了 Rails,順便叫 Sinatra 也不用繼續再玩了! 他現在做的事,並不是發明什麼神奇的 API 。而是把整個 Rails refactor,具體的作法 就是把整個 Rails 全部拆散成 API 形式再組起來 ……這不僅是空談,而是已經有非常 具體的成果了。 1. 現在 Rails 的效能跟 Merb 一樣好!! ( 2008/08/09 ) merb 2. Fully API ( 這在他最近在世界上的各場 ruby / rails conf 演講 影片/ 投影片 都有 demo ) 3. 因為現在通通拆開了,所以 Rails3 達成 framework agnosticism 是完全沒問題的… 4. 因為現在通通拆開了,very flat 版 rails 也是沒有問題的… 5. 他最近甚至無聊到火力展示(炫耀)一個東西,如何用 Rails API 拼出一個 Sinatra 。XDDDDDDD 6. 還順便分享了一篇 refactor 技巧(因為公開翻修了 Rails 這個 opensource project ):6 Steps To Refactoring Rails (for Mere Mortals) 完全令人想不到而且偉大的結局啊,完全做的到而且比當初宣告的更屌….。 真期待年底 Rails3 的正式 Release …. ==== Update : 剛剛重回去看 Merb gets merged into Rails 3!,想仔細找找有沒有什麼我寫漏的。結果看到 DHH 在 當初的文章裡強調了這次的 merge「This is not a big bang rewrite」。我噗喫一聲, 笑出來了………… --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.161.98.57
1F:→ nfsong:it works 09/11 13:19







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:BabyMother站內搜尋

TOP