I'm CaLendarW Blog

Smart UI

by on Sep.02, 2008, under design

Smart UI 呢個 term 係我由 domain-driven design 本書度見到的, 係一個 anti-pattern, 指一個介面做晒所有 business logic, 佢既好處就係當個 program 係好細好細, 你搞咁多 design 其實係好浪費時間的, 所以係好適合一 d 細既 program, 例如功課上面用的.

不過, 當你 apply 左 smart ui 之後, 其實亦限制左個 software 既可擴展性, 因為所有既 business logic 都係晒個介面度, 如果你寫既 software 愈來愈大, 而 business logic 只可以不段咁 copy and paste, 就會變得複雜同難以管理, 當有 logic 要轉, 就要轉晒所有版面引用過既 code, 呢個亦都係之前我個 post 所講: “爛於抄, 精於用” 既道理, 亦正正就係點解要有 software design 同 software architecture 既原因!!

而我自己, 因為係一個太過 OO 既人, 凡事都 object-base, 所以我都會盡量唔比 smart ui 出自我手, 當然工作需要既我就要用, 但我有得選擇既話我一定會行 object-base!!!

:

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!