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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Where does JQuery hit a wall?

2 点作者 brw12超过 7 年前
I&#x27;ve done frontend development with a variety of frameworks and libraries. There are things I like about angular and react, though I find them both fragile and slow to develop and maintain because so much of what they&#x27;re doing is opaque. I often find I&#x27;m spending forever fiddling with angular filters, or with unexpected react lifecycle properties&#x27; states, or with fiddly churning React&#x2F;Redux syntax.<p>In contrast, I find developing with jQuery to be a pleasure because there&#x27;s never much of a mystery about what&#x27;s going on or what I need to add next. I recently was wondering if I should try to dive deeper into jQuery to see if I can use it as a light front-end framework for some of the purposes I&#x27;ve been using react and angular.<p>The TodoMVC example of written in jQuery is impressive: it&#x27;s an SPA that includes routing and everything. And it would obviously be easy to add on Ajax to use an external API.<p>What I&#x27;m wondering is, if I tried to develop a more robust and complex application in jQuery instead of angular or react, where would I be most likely to miss them? Would it be in the reuseability of components in different views? In the built-in control over components&#x27; life cycles? In the cumbersomeness of having to code every state delta instead of just counting on the DOM engine to update things correctly?

1 comment

billconan超过 7 年前
I&#x27;m not a very experienced frontend developer, but I&#x27;m full-stacking my side (web) project now.<p>Since I&#x27;m new to frontend, I thought I&#x27;d start with the latest tech, so I investigated angular, react, vue. But I eventually went back to jquery.<p>One reason was that I don&#x27;t know much about design. I purchased themes based on Bootstrap, which uses jquery. And I remember react doesn&#x27;t work well with jquery, there seemed to be function&#x2F;variable naming conflicts if you include both. I know there are tutorials on how to make both work together, but I have never spent time on trying it out.<p>Another problem with newer libraries is lacking ui components. You can find tons of full featured bootstrap based admin templates, but it seems to me that I have to build lots of things from ground up if I want to use one of the newer libraries.<p>There is one time I did see a problem with jquery though. I wanted to build a real-time dashboard with a fast changing progress bar. The progress bar in my template was made by a decorated &lt;div&gt; tag. I noticed that my cpu usage quickly reached 100% when I updated the progress bar rapidly. I guess this is a problem of not being a virtual-dom library.<p>Right now I&#x27;m still using jquery + bootstrap. For my own javascript code, I try to apply the concept of virtual dom without using any library. I saw good articles on how to DIY virtual dom, <a href="https:&#x2F;&#x2F;medium.com&#x2F;@deathmood&#x2F;how-to-write-your-own-virtual-dom-ee74acc13060" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@deathmood&#x2F;how-to-write-your-own-virtual-...</a><p>it doesn&#x27;t seem to be that difficult.<p>Oh, one more thing is that jquery + bootstrap templates seem to be very large in size. I ran my bootstrap site through google&#x27;s pagespeed <a href="https:&#x2F;&#x2F;developers.google.com&#x2F;speed&#x2F;pagespeed&#x2F;insights&#x2F;" rel="nofollow">https:&#x2F;&#x2F;developers.google.com&#x2F;speed&#x2F;pagespeed&#x2F;insights&#x2F;</a><p>the result was terrible. I don&#x27;t know how I can strip it down.
评论 #16285354 未加载