Hacker News new | past | comments | ask | show | jobs | submit login

Is it really necessary to expect a front end developer to have complete knowledge of manipulating the DOM without jQuery (or one of the other libraries)? I'm definitely capable of reminding myself of it, since that is what I learned when I first started learning javascript, I just do not see any benefit to it. I write quite a bit of javascript for my job on a daily basis, and am never without something like jQuery.



Keep in mind this post was originally from 2007. jQuery started in mid-2006. When this was originally written, there really weren't many effective abstractions of the DOM.


Ah, yeah I missed that on my first read through. I guess I'm still interested to see if that is still part of the interview process at a lot of places.


I never caught on to the whole jQuery hype. Why do people use jQuery for such trivial things such as DOM? Wouldn't it be smarter to use getElementById() and end up with universal code that could run on any site without the need for 3rd party libraries?


- Do you remember which events IE conveniently forgets about, like not bubbling "submit" events above forms?

- Can you write out AJAX code that reliably works in all versions of IE by memory? And don't forget to add automatic jsonp support for cross-domain requests.

- Do you remember how to get the width and outerWidth of an element in a reliable cross-browser way?

There was a time when I could do these things from memory. That time was when I was interviewing for jobs. In daily work, I only have to half-remember these things and can operate at a higher level of abstraction.


Because the job is rarely just manipulating the Dom in some simple way.

Sure, if you just want to add the current date to <div id="rightNow"> then use basic browser builtins, but it's usually more like "I need every other child of each list with the class 'rowStripe' unless it's the last entry in the list", in which case jquery saves you a ton of time.


I find that jQuery gives you a lot more than just DOM manipulation. If you were doing just that then JQuery is overkill. But JQ gives you a lot more in the way of animations, plugins, and all sorts of other useful methods.

I also like the community. There seems to be a jquery plugin for damn near everything. Kind of like PHP. Yes it can be a mess. But when you are just trying to "get shit done" JQuery isn't bad at all.


For me, it has always been about creating unified interface across all the different browsers. While getElementID is universally supported, many things are different (see all the remarks about setting the `name` attribute on elements in Internet Explorer http://msdn.microsoft.com/en-us/library/ms534184%28VS.85%29....).

I'd rather let the library developers abstract all that out for me.


Cross-browsers. If we only had Firefox, then ya, there could be some debate. Jquery handles cross-browser problems, while at the same time providing a more intuitive DOM manipulation layer. What more can you ask for? Use Jquery, build better things, move forward.


>Is it really necessary to expect a front end developer to have complete knowledge of manipulating the DOM without jQuery?

It depends. For your average front-end developer adding light functionality to a web page/app? No, probably not.

However, if you are creating heavy, full-featured, client-side web-apps...absolutely.

Not because you need to do it without jQuery, but because you need to understand what jQuery is doing behind the scenes. At least a couple times a year some major website like (to pick at random) Twitter crawls to a halt, bugs out, etc...because some front-end dev treated jQuery like magic without considering what is going on behind the scenes.

So I would say if you serious about being a front-end developer, then sure...spend some time browsing the jQuery source and learn to do things in "vanilla" JS.

In terms of whether to consider it re; hiring, it depends on what you are hiring for.


In some situations jQuery is rather large to have as a dependency (adverts).


Good point, hadn't thought of that - and I imagine the job description would probably drop some hints that you wouldn't be using any external libs, no?


80% of the time? No.

Perhaps not even 95% of the time.

However, someday, there will be a bug withing jQuery, or a misunderstanding of what it is doing internally, and you will have to debug. You will have to have understanding of the DOM itself.


FACT: 95% of the use of jQuery can be replaced with document.getElementById() and document.getElementsByTagName()


Bullshit. Unless 95% of your jQuery usage is just finding some elements and the… doing nothin with them.

Meanwhile others do some stuff: like attaching event handlers, manipulating attributes, class names; doing animation, making AJAX requests, etc. Most of these differ to some degree accross browsers and that's there jQuery comes in: to unify the API.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: