独立开发者发布了一项针对主流 JavaScript 框架在 AI 编码代理辅助下的开发成本、质量及可维护性的基准测试结果 1。该实验使用 Claude Opus 5.5 模型(设定为 high effort)构建了一个基于 PokéAPI 的宝可梦应用,旨在通过数据反驳仅凭“直觉”选择技术栈的做法,强调在 AI 时代应依据证据评估工具效能 1。每个框架进行了 5 次迭代并取中位数作为最终结果,其中 Angular 因两次失败仅统计了 3 次有效结果 1。
数据显示,多页应用(MPA)和轻量级组合(如 Hono+htmx)在代码行数、Token 消耗和构建成本上优于单页应用(SPA)或重型框架 1。核心结论指出,Hono+htmx 与 Angular 相比,实现了约 70% 的代码量且运行更快 1。相反,SvelteKit、Gracile+Lit 和 Angular 被证明是构建成本最高的框架 1。
在性能观察方面,Lighthouse 指标普遍偏向 MPA,而 Next.js 的性能波动主要源于是否启用图片懒加载 1。文章引用 Rich Harris 的观点称:“Frameworks are not tools for organizing your code; they are tools for organizing your mind.” 1
An independent developer published benchmark results evaluating the cost, quality, and maintainability of mainstream JavaScript frameworks when used with AI coding agents. 1 The experiment utilized Claude Opus 5.5 set to high effort to construct a Pokémon application based on the PokéAPI, aiming to counter intuition-based technology stack selection with empirical data. 1
The study revealed that multi-page applications (MPAs) and lightweight combinations such as Hono+htmx outperformed single-page applications (SPAs) and heavy frameworks in terms of code volume, token consumption, and build costs. 1 Specifically, the Hono+htmx combination achieved approximately 70% of the code size of Angular while running faster. 1 Conversely, SvelteKit, Gracile+Lit, and Angular were identified as the most expensive frameworks for this type of development. 1
Each framework underwent five iterations, with median values taken to determine final results; however, Angular’s data was based on only three valid runs due to two failures. 1 Performance observations indicated that Lighthouse metrics generally favored MPAs, while Next.js performance variability was primarily attributed to whether image lazy loading was enabled. 1
To contextualize the findings, the author cited Rich Harris, stating, "Frameworks are not tools for organizing your code; they are tools for organizing your mind." 1 The core argument emphasizes that in the era of AI-assisted development, tool efficacy should be assessed through evidence rather than tradition or assumption. 1
评论
还没有评论,欢迎留下第一条。