r/javascript • • Nov 03 '11

jQuery vs Plain old javascript

http://raynos.org/blog/14/jQuery-vs-POJS
0 Upvotes

53 comments sorted by

View all comments

Show parent comments

4

u/raynos Nov 03 '11 edited Nov 03 '11

I have a cross browser implementation of DOM4 (ish) called the DOM-shim.

I'm working on a cross browser implementation of XHR2.

Seriously though, my article on DOM libraries states why, we use libraries for normalization and abstraction. I don't want abstraction, I only want normalization. And existing libraries don't do normalization.

1

u/me-at-work Nov 03 '11 edited Nov 03 '11

I want a toolkit that contains everything I regularly use, tested in all browsers, by thousands of people, and optimized wherever speed is an issue.

jQuery saves me a lot of time and effort. I don't want to write my own implementations of $(':input'), $.animate(), $.ajax() and many other features. And jQuery's overhead is worth it, considering all the optimizations it contains.

Sure, I could grab multiple open-source single-purpose libraries and put them together, but I would get an inconsistent mess, often no community support and bad documentation.

0

u/raynos Nov 03 '11

No community support and bad documentation just means you picked bad libraries.

Use a tool like ender and a collection of good hand picked libraries.

1

u/k3n Nov 03 '11

lol, a Node.js suggestion. Color me surprised.

0

u/raynos Nov 04 '11

You have a problem with using a node.js tool? I'd make sense for javascript tools to be written ontop of node.js.

1

u/k3n Nov 04 '11

No, I just see it as novel and trendy. Not saying it's silly or not useful or anything, I think it's pretty cool but I think it needs to mature more. I commented that because it seems like r/javascript's answer to 90% of the problems out there either suggest micros or Node.

1

u/kataire Nov 13 '11

There's a difference between development tools and web servers.

Node.js is overhyped as a solution for server-side web applications, not for utilities. Mocking someone for recommending a Node.js-based tool is just as silly as mocking someone for recommending a tool written in Ruby, Python or fscking Bash.

It makes sense to write tools for working with JavaScript in JavaScript, just as you'd write tools for Ruby development in Ruby or Python tools in Python.

1

u/k3n Nov 13 '11

I fully realize that, and you've misrepresented the source of my criticism; as I've already said, it's not the tool itself, it's the idea that said tool is being welcomed as the panacea for all things web-development. While I concede that there are many cool tools enabled via Node, I also don't feel that Node has put its time in to become a fully-matured project yet, and thus I'm apprehensive about getting into bed with it.

1

u/kataire Nov 13 '11

If you use a Node.js-based tool, you're not exactly going to bed with Node.js. Tools help you create software, they don't become part of it.

You acted as if you were offended by the idea of using anything based on the new shiny, even if its code was going to be entirely orthogonal to yours. That's a bit much, if you ask me.

Anyway, jQuery is a good solution for most website needs. If you want to make full-blown web applications, you'll probably need some things jQuery can't do for you and you may find jQuery's strengths unrelated to your actual problems, so it can be helpful to be able to make do with less because then you won't have to add an entire library just for one or two function calls. If all you need is a selector engine, jQuery is overkill.

→ More replies (0)