Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm a desktop application developer still finding my feet on the web. Should I bother learning "pure" JavaScript or should I just learn a library like JQuery?



So there's 2 questions in there.

1) Should I learn the language? 2) Should I bother learning to use a DOM library like jQuery.

So the answer to both is actually yes. For someone coming to js for the first time, its very important that you at least learn an intermediate amount about the language before you worry about a browser library like jQuery.

You should get your hands on a copy of Javascript the Good Parts by Douglas Crockford. Its a short book, and easily the best written about javascript. The key thing is that the book addresses only the language. It tells you very simply what and what not to do. Learning these basics will help you get up to speed tremendously.

In regards to jQuery, its important to know that the language and the browser are two completely separate things. The language is basically implemented the same in most modern browsers with a few minor exceptions, 90% of which involve older versions of IE. The thing that people always get confused about is that the things DOM libraries wrap around are the various browser DOM APIs that are made accessible via js.

So, get the book. Learn the core tenets of the language. Then use a library to pave over all the rough bits when writing code that's meant to run in different browsers. In this day and age, the less you have to write "low-level" code to run across multiple browsers the happier you'll be. The exception here is if you're writing a web app that has to be very tiny and still function everywhere. A good example would be a widget that 3rd party sites can plug into their pages. You can never rely on another party having jQuery or whatever library you're using, and its cost prohibitive to load an entire 20k library to support your widget.


If you're a desktop guy, and MS based, learn some silverlight, it's very nice and also a MS-win7 phone.

If you're not, Javascript + JQuery is the way to learn for the client side stuff, you also need a server side language (python, ruby, etc).


If possible can you throw some light on which would be good for starters on server side language Python (which I am currently learning) from http://learnpythonthehardway.org/static/LearnPythonTheHardWa... OR PHP (which I already know)


PHP is not the best language anymore for most web development.

Ruby or python is probably the best choice, and I personally favor python.


If you only want to learn one language you can just do server-side JS. That said, it's hard to go wrong with Python.


Python is generally considered to be the stronger language and certainly the one I would recommend.


then I am at it.. :) thank you.


You need to learn javascript the language whether or not you use jQuery. You do not, however, need to learn the DOM API if you decide to use jQuery (which I recommend)


You don't even need to learn javascript for web dev, checkout a project called Coffeescript.


I'm a big CoffeeScript fan, but I would never say just learn CoffeeScript and skip JavaScript. CoffeeScript is really just syntax and abstraction on top of JavaScript.


jQuery is just the de facto DOM API; learn them concurrently.


I wouldn't agree with this 100%. I principally use jQuery unless I am working on something that has to very lightweight. However, there are lots of libraries and different reasons people and companies use them. That's why it's important to know the language in detail so that you can switch between libraries as needed.


Right, there is also Dojo hanging out there for large browser Apps. There is a point in which you can outgrow jQuery due to the size and complexity of an application. Dojo kind of fills that upper end so while it is a smaller segment of the market, there are still other toolkits that hold their share of the market for what they are tailored for. In saying that, there are some newer, complementary projects like backbone that are trying to make large web app development in jQuery less painful, but as of right now Dojo owns that space and it remains to be seen if that will change.



I feel in all cases of this questions (say RoR vs Ruby) the answer must ALWAYS be "learn the language first, then learn the framework". If you don't you will do the following:

a) Write bad code (you barely know the syntax)

b) Get really confused, and thus either start hating it, or simply not able to take full advantage of the framework.

c) Do roundabout ways to solve a problem when there is a very simple solution, but you not understanding the language still made the mistake.

d) Hit a big brick wall when looking at code others made.

I made this sort of mistake before. It is a bad mistake to make.

However to note: jQuery makes dom manipulation fairly easy. It is in no way a replacement to javascript, only the browser's dom lib calls. You just wind up not writing a bunch of utility functions to handle the different ways to get at the same information in the browser. Plus I like the syntax.


However to note: jQuery makes dom manipulation fairly easy. It is in no way a replacement to javascript, only the browser's dom lib calls. You just wind up not writing a bunch of utility functions to handle the different ways to get at the same information in the browser. Plus I like the syntax.

Right, browser based JavaScript is kind of a special cases, the reality is that it can be a frustrating experience to even learn JavaScript without the aid of something like jQuery to smooth out the DOM.

My personal recommendation would be either learn JavaScript outside of the browser, chose only one browser to learn it in, or get "the Good Parts" as recommended, but start with jQuery and use "the Good Parts" to make sure you are doing it right while using jQuery.

The fact of the matter is, if you are doing browser work, which most doing JavaScript are, you are going to use a toolkit like jQuery in almost every project. So to me, it becomes almost part of learning the language. JavaScript toolkit are a little different from frameworks on the server side. They are more like language enhancers than a frameworks. So they are in kind of a "chicken and the egg" problem when it comes to making recommendations on which to start with.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: