TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Opinionated Rundown of JS Frameworks for Single Page Apps

15 点作者 HenrikJoreteg将近 11 年前

1 comment

t0nyh0将近 11 年前
Despite the potential developer productivity costs associated with custom frameworks, I&#x27;ve decided not to use some of the bigger frameworks for the following reasons:<p>- Performance is a feature. I like less magic, more clarity on how data flows through my system. $digest cycles, ng-repeat will keep me up at night. I sleep better when I know what code is doing exactly what. - Hiring becomes easier, i.e. do not have to screen for certain framework experience. Know JS? Good, that&#x27;s all you need!<p>Of course, writing your own custom application framework is no walk in the park, but like the article said, you&#x27;ll have ultimate flexibility. In my experience, writing your own custom app framework, you have to ensure:<p>- Proper dependency management, use AMD or CommonJS. The alternative: Spaghetti jquery code.<p>- Enforcing class responsiblities, e.g. ViewModels are for data transformation and validation only. Views are for DOM management. HTML is for layout only. CSS for styles.<p>- Proper risk&#x2F;reward evaluation of third party libraries. Usually, the leaner the library the better imo.
评论 #8178656 未加载