3 ms·
> I also don't care to hear complaints about "HTML in my JS". Yeah that critique never held much water with me either. When JQuery and other "unobtrusive JavaS
by vikingcaffiene 9y ago
> I also don't care to hear complaints about "HTML in my JS".
Yeah that critique never held much water with me either. When JQuery and other "unobtrusive JavaScript" frameworks came out, it seemed really logical to separate the markup from the logic but, as applications aged and changed things started getting really hairy. I worked for one company that literally could not change any of their front end markup because they had tens of thousands of LOC that interacted directly with the DOM via class and ID selectors. Everything had to be done with CSS which of course led to massive CSS files with 30k lines. Working with something like that made me appreciate a more modular approach that React or Angular bring. Being able to compartmentalize your code into these logical blocks is MUCH easier to manage in the long term. One of the golden rules of programming is "write code thats easy to delete".