Hacker News new | ask | show | jobs
by woah 4055 days ago
If you're using jquery to make apps instead of an app framework like react or angular, you are guaranteed to be writing spaghetti. If you're using it to enhance pages sent from the server, it's hard to call that "serious".
2 comments

> If you're using jquery to make apps instead of an app framework like react or angular, you are guaranteed to be writing spaghetti.

This is just flat out wrong. Frameworks provide a layer (or multiple layers) of abstraction to make code organization and maintenance easier. How that translates into "guaranteed to be writing spaghetti" I have no idea; those frameworks can't force you into their coding structure and you can still write absolutely horrible spaghetti in them (I've seen some really bad angular that should have been simply set on fire and re-written).

In fact you can write horrible spaghetti using basically any language or framework. It comes down to discipline and experience, in my opinion, when you want to write clean and easy-to-maintain code.

> If you're using jquery to make apps instead of an app framework like react or angular, you are guaranteed to be writing spaghetti.

I definitely do not need react or angularjs. Trust me I don't.

Because I know and respect SOLID principles and I don't need a framework to enforce them.

If you can't tell what should be in the view from where your business logic should be OR you need a framework to enforce these principles then you're going to write spaghetti code no matter what, jQuery or not, react,angularjs or not.

And by the way Angular 1.x works quite well with jQuery, Angular 1.x even includes a light version of jQuery.