Friday, May 17, 2013

Step Four: JavaScript/jQuery

After learning HTML and CSS comes JavaScript.  So what exactly is JavaScript?  JavaScript is a programming language, much more similar to Java or C++ or Python than HTML or CSS.  What this means is that you can do much more computationally interesting things with JavaScript.  While HTML and CSS are focused mainly on rendering webpages from text, JavaScript is more about how to add interactivity to a site.  This is not fully true as CSS3 introduces a bunch of cool features that allow some interactivity that used to belong fully in the realm of JavaScript

More specifically though, why learn JavaScript?  In my opinion, JavaScript is more necessary than either HTML or CSS when it comes to programming for the web.  It allows for so much of the web, from pages that have auto-refreshing or auto-loading content a la Facebook walls (AJAX) to adding very complex actions on click or hover events.  However, JavaScript is also much more complex than HTML or CSS and takes a lot of work to really understand.

I have also put a point here to talk about jQuery.  jQuery is a JavaScript library designed almost solely for common web related JavaScript tasks.  What this means is that it is an independently created set of functions using JavaScript meant to make web based JavaScript easier.  It is useful, for instance, in when you want to add click events programmatically to objects.  Or perhaps you want to add new elements to a page when a button is clicked, jQuery provides easier and well tested ways of doing such things.  However, it should be noted that anything you do with jQuery can be done with JavaScript too.  In my opinion, you should learn JavaScript before jQuery so you know what kinds of benefits you are getting and so you know exactly what things are possible in regular JavaScript that are not expressible with jQuery functions.

That's all I've got on JavaScript and jQuery.  If you intend to do anything web related I view JavaScript as extremely necessary unless you want to make really static pages.  Anyways I hope you enjoyed that and hopefully I can back fill some of these old posts more quickly than I have.

--CsMiREK

No comments:

Post a Comment