
Ask HN: Where does JQuery hit a wall? - brw12
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?
======
billconan
I'm not a very experienced frontend developer, but I'm full-stacking my side
(web) project now.

Since I'm new to frontend, I thought I'd start with the latest tech, so I
investigated angular, react, vue. But I eventually went back to jquery.

One reason was that I don't know much about design. I purchased themes based
on Bootstrap, which uses jquery. And I remember react doesn't work well with
jquery, there seemed to be function/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.

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.

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 <div> 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.

Right now I'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, [https://medium.com/@deathmood/how-to-
write-your-own-virtual-...](https://medium.com/@deathmood/how-to-write-your-
own-virtual-dom-ee74acc13060)

it doesn't seem to be that difficult.

Oh, one more thing is that jquery + bootstrap templates seem to be very large
in size. I ran my bootstrap site through google's pagespeed
[https://developers.google.com/speed/pagespeed/insights/](https://developers.google.com/speed/pagespeed/insights/)

the result was terrible. I don't know how I can strip it down.

~~~
brw12
Thanks, it's very helpful to hear about your experience!

Out of interest, is your site up? It would be interesting to take a look.

Glad to hear you had a decent experience doing virtual DOM yourself.

Not super surprised to hear about the CPU usage issue, but that's a helpful
reminder that one of the things we leverage when we use libraries developed
for high-availability applications like FB/Google Docs is all of the developer
time focused on optimization.

