What have you found for these years?

2009-08-12

ramaze content representations

6. Content representations

唔,看起來可以取代 rails 的 :format 用法,
而且還比 rails 的強大。例如之前我擴充的
special template, 這個簡單地說就是把 :format
對應到不同的 template 相同的 action,
也許在 ramaze 本身就是很自然的事情。

不過實際上還是要用過才知道。
這點確定的話,再加上 routes 如果不難移植的話,
要整個從 rails 搬到 ramaze 應該不難。
畢竟我本來就沒用到幾個 rails 的特殊功能,
model 也一直是 AR 和 DM 各有一份 @_@

這兩份相同的 model 也大致上是相同的,
大概就是先寫在 DM, 然後想辦法移植到 AR 上。
有些需要繞一下,但基本上 DM 是仿 AR 介面,
所以大抵上是可以很容易地移植過去。

repository 的概念,用只好用 .dup 去複製 @@
這樣勉強算是兩邊都能用。

接下來就是等 rails 3 看情況如何。
情況不好的話,就想辦法移植到 ramaze 上。
情況不錯的話,也許就移植到 rails 3 上即可。

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0