The State of JS 2021

Hacker News 上看到「The State of JS 2021」這個,另外也翻了一下 Hacker News 上的討論「State of JavaScript 2021 (stateofjs.com)」,算是年度總結看一下今年 JS 圈子又搞出了什麼新東西,或者說又喜新厭舊了哪些東西 XDDD

看了幾張比較有趣的,首先是「The State of JS 2021: Libraries」這張總表,右上角的表示用的人比較多,而且評價正面的選擇:

然後同一頁也有直接依照滿意度分級列出來:

在「The State of JS 2021: Front-end Frameworks」這頁可以看到 JS 前端喜新厭舊的情況,2018 的時候 Vue.js 上來,然後 2019 下去,2020 時 Svelte 上來,2021 下去,換 Solid 上來:

在「The State of JS 2021: Back-end Frameworks」這邊則是看 JS 後端的喜新厭舊,2020 時 Next.js 爬上來,2021 就被踢下去,換 SvelteKit 上來:

其他的也都可以看出來一直在「迭代」,整個 JS ecosystem 的概念一直都是砍掉重練 XD

PHP: The Right Way

Hacker News 上面意外看到「PHP – The Right Way (phptherightway.com)」,官網在「PHP: The Right Way」這邊,另外我在 2012 年的時候也有提過這個站台:「PHP 康莊大道」。

看了一下,應該不完全是給初學者看的,反而對於回鍋的人比較有用,無論是很舊的歷史 (像是裡面提到的 PEAR),還是比較新的東西 (像是 test case 那邊的介紹),他都有花一些篇幅介紹,而且除了開發以外也包含了 deployment 與 hosting provider 的部份...

沒想到這個網站過了十年繼續維護啊,而且內容豐富不少...

試著用 OsmAndMaps 的離線地圖

OsmAnd 是在「Why I quit using Google」這篇看到的東西,這篇文章在討論離開 Google 的 ecosystem 有哪些替代方案,裡面有提到其實這些轉移不是短時間轉完的,而是不斷嘗試,直到找到自己滿意的替代方案:

Migrating away from Google was not a fast or easy process. It took years to get where I am now and there are still several Google services that I depend on: YouTube and Google Home.

其中地圖這塊是這樣:

Google Maps → Bing Maps → OpenStreetMaps and OsmAnd

在 iOS 上面的應用程式叫做 OsmAndMaps,下載後內容大概是這樣:

基本的部份用起來還不錯,上面的店家資訊少了點而已,應該會用一陣子看看...

WordPress 在 Internet 上的情況

WordPress 在 Internet 有很大的佔有率,在「Usage statistics and market share of WordPress for websites」這邊有一直更新的資料,現在是:

WordPress is used by 59.9% of all the websites whose content management system we know. This is 29.1% of all websites.

這數字可以參考看看。而在「State of the WordPress ecosystem」這邊就看到有人在分析 WordPress 在整個 Internet 上的情況。可以看到裡面有蠻多都是透過 BigQuery 分析出來的...

在分析整個頁面的平均下載量時,可以看到 WordPress 的頁面比較肥:

We get 1590 KB for wordpress=false and 1897 KB for wordpress=true.

但是在 WordPress 上未最佳化的圖片比較少,原文裡猜測是歸功於 plugin 的關係:

@amedina I wonder if this has to do with the availability of tools/plugins in the WordPress ecosystem that optimize images effortlessly, as opposed to other web development pipelines that require manual image optimization or installation of specialized tools.

所以就跑去分析了 WordPress 上使用了哪些 plugin,不過這是看 web request 以及 path 得到的,如果 plugin 是純粹在內部執行的話就看不到了:

整個分析還蠻有趣的,而且還在進行...

把 Google Chrome 的套件移植到 Firefox 上

在「Porting Chrome Extensions to Firefox with WebExtensions」這邊提到了 WebExtensions 計畫:

The technology is designed for cross-browser compatibility: to a large extent the API is compatible with the extension API supported by Google Chrome and Opera. Extensions written for these browsers will in most cases run in Firefox with just a few changes. The API is also fully compatible with multiprocess Firefox.

提供另外一種方式開發,吸引 Google Chrome 現有的 extension 開發者,也就是利用現有的 ecosystem 來幫助自己,把本來需要整個重寫的工作降低...

Jeremy Cole 在 XLDB 2013 上的演講:「The MySQL Ecosystem at Scale」

GoogleJeremy ColeXLDB 2013 (Extremely Large Databases) 上的演講投影片:「The MySQL Ecosystem at Scale」(PDF)。

投影片內對於 MySQL 的歷史以及現況的說明的很清楚,另外就是 sharding 那塊的方式很值得看一看,量大之後大家解決的方法都差不多,算是已經被證實可行的方法了。