Hacker News new | ask | show | jobs
by billconan 3065 days ago
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-...

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/

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

1 comments

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.