Skip to content

Comment on Ask HN: What's the best way to build Javascript widgets today?

Comments

JQuery still seems to be king at the moment. There's some pushback against it in this new world of a mobile web since it adds size to low-bandwidth pages, but there doesn't seem to be a risk that it'll be dethroned any time soon.

If I were looking to make a portable and semi-futureproof toolkit right now, I'd use jQuery as a base, but limit myself to some big features, like dom queries, events, and ajax. Then I'd make sure I had it sandboxed inside all my code via anonymous functions (function($) { /* my code */ })(jQuery); so I could swap in a lighter replacement later on without a headache.

jquery is codesmell of all codesmells

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.