2

JavaScript 快顯通知 NOTY 在 Github 被標為過時,還能用嗎?

 1 year ago
source link: https://blog.darkthread.net/blog/is-noty-dead/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

JavaScript 快顯通知 NOTY 在 Github 被標為過時,還能用嗎?-黑暗執行緒

前幾天分享我找到好用的快顯通知套件 - NOTY,當時從一堆套件選中 NOTY,它只需一個 js 一個 css 搞定,甚至支援 IE10+,在 Github 上獲得超過 6700 顆星算是主流選擇之一,而簡便性與擴充性感覺不錯,最吸引我的點 - 不依賴 jQuery。雖然我一定會靠 jQuery 再戰十年,但擺脫依賴意味在某些情境不必單為它載入 jQuery,少了羈絆,四處作(專)案會更敏捷。

不過,經讀者 ms 提醒,我才發現 NOTY 專案已被標註為 DEPRECATED (過時、請棄用) This repository is no longer supported, please consider using alternatives.,並掛上 [No Maintenance Intended] 徽章,登楞!

Fig1_637880845188828247.png

這... 什麼狀況,那 NOTY 還能用嗎?

我最擔心的情況是 NOTY 存在技術限制或安全漏洞,難以克服或修改成本過高,作者才決定棄坑標註為棄用,若是如此,當然萬萬不可使用。所幸,經過調查可排除這項疑慮。

面對這個疑問,我先選擇直球對決 - 發信請教作者棄坑心路歷程! 很不幸,信件跟專案掛著的 PR 一樣音訊全無。事到如今,只能扮演鍵盤柯南自己調查。

先查了 Commit 記錄,專案首頁的 DEPRECATED 說明及不再維護徽章是作者 Nedim Arabaci 在 2021-2-16 加上的,之後還有幾次更新都是增刪贊助商名單,最後一次更新在一個多月前(3/24)。

Nedim 在 FB/Twitter 發文不多,看起來仍從事軟體開發工作,最近一篇貼文為現任公司徵才。LinkedIn 上有較明確線索,Nedim 在 2021/01 由 Lead Developer 升任 Software Manager 至今,DEPRECATED 恰巧是升職後一個月加上的。因此我的推測是:因工作角色轉換、時間分配改變,無力繼續經營,加上維護過程遇上鳥事,必灰意泠之際下了決定。

簡單一句話,就是「朕乏了」、「我不玩了」。

Github 的專案專案說明可掛上各式各樣的徽章(Badge),維護狀況有 Maintained: yes、maintainer: 維護者、Maintained: no、No Maintenance Intended 四種,而 No Maintenance Intended 連結到的宣言 很能描述開源作者的心聲:

Open Source is rewarding- but it can also be exhausting.
The author(s) of that project invite you to peruse their code and even use it in your next project, provided you follow the included license!
No guarantee of support for the code is provided, and there is no promise that pull requests will be reviewed or merged. It’s open source, so forking is allowed; just be sure to give credit where it’s due!
** Add the badge to your hobby project! **

我能理解這種心境,開源作者們樂意分享貢獻,它帶來成就感但也佷累人,無私付出常伴隨責任與壓力,有時還會遇到酸民自目鬼,當違背初衷、造成負擔,讓心情不美麗,緣分便到了盡頭! 程式碼送給你們,歡迎繼續使用,但責任及維護工作請自己來。

總之,NOTY 在應用及安全上沒什麼大問題,就只是不能再期望有人幫忙維護,持續優化、解決各種問題,專心當免費仔撿現成。繼續使用或現在開始使用絕對沒問題,但遇到 Bug、發現漏洞或瀏覽器不相容,得自己想辦法解決。對我來說,維護自己用的程式庫天經地義,有熱心人無私相助是萬幸,不然自己改也是剛好而已,我完全接受。看過 NOTY 的原始碼,純 JavaScript + CSS,難度在我能力範圍內,加上現有功能已滿足我的需求,就算有問題估計也只需小修改,不會花太多工夫。

所以,我決定 Fork 好專案,大方用下去。結案。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK