我希望這個網站的搜尋能力比 Twitter, PTT 好,這就不是 nice to have 了,而是 essential。
我希望這個網站的設計風格給人溫暖的感受。
基於以上種種,我今天得到的想法是,這個專案的設計應該是「與其追求前後端分離,不如單體多模」。
我指的「前後端分離」前端是那種 fat client 式的前端,地位等同於 App,也就是很簡單就可以化身為 PWA 的那種前端,而不是為了 SEO 搞的 SSR 那種夾在中間,角色尷尬的前端。看到 SSR 享受不到 token authentication 的優點,我就覺得一整個阿雜,雖然顧及了 SEO friendly,卻很難喜歡這樣在我看來疊床架屋的架構。這樣做的好處只剩下「前後端開發者各司其職」,就只是這樣而已,我覺得。
如果要這樣,不如取法 Redmine, WordPress 這些專案「單體多模」的設計,可獨立運作,也提供 API 給其他「泛前端」使用。
或許專業的前端開發者在這樣的架構下很難(用喜歡的、慣用的前端框架)做事,但是這個專案截自目前就只是我一個人的 side project,根本也不存在什麼「專業的前端開發者」與我共事,所以不用想太多,又或者,我在用「單體統包」設計的同時,也提供 API 另外搞一份前端實作,這樣追求「實用」與「練新功夫」就都顧及了。
於是我想透過「試著把這些『新的』、『正規的』解決方案,套用在我的 side project 裡」的方式來好好學習。具體的想法則是:「如何在我的作品採用 Material Design」,我的初始想法是,Material Design 問世有一段時間了,一定已經存在著某些採用『新的』、『正規的』解決方案來實作 Material Design 的工具與實踐。
再來我看的是 [material-components/material-components-web],雖然和前面的 material-components-web-components 都掛在同個 GitHub 組織下,名稱也很像,但是它的實作手法比較像是 Bootstrap,把既有的 HTML 元素「打扮」成帶有 Material Design 的風味,這樣的封裝雖不如 material-components-web-components 漂亮,但是這個專案的可用元件數量卻很完整。兩者可說是各有千秋,只是我還是很希望有朝一日,material-components-web-components 可以提供完整的元件,讓我用漂亮的封裝來堆介面。
所以,今天最後我的打量是採用 Vuetify(爆),一來我的 side project 採用的前端框架是 Vue,二來 Vuetify 提供的 Material Design 元件數量夠多,用起來也還算接近 Custom Element,算是取得了一個還不錯的折衷。只是我還沒有真的用起 Vuetify 來,搞不好過個幾天,我又會發表說有什麼意外的坑,也說不定。就先記錄到這裡吧。
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.