
Learning JavaScript? Here’s My JavaScript and Related Resources
JavaScript is by far the web's most popular programming language. Being able to operate within nearly every web browser and on every operating system, JavaScript can be found in every nook and cranny throughout the Internet and our systems which we use to communicate through it. With that being said, it's quite unfortunate that it is also considered by many as the web's most misunderstood programming language. With so many resources available (for free even) on the Internet, it's hard to believe that it's widely misunderstood. This is my attempt to rectify this problem...or to at least help educate those who don't understand or those who don't know where to begin.
Where to Begin:
I have to admit that I learned the bulk of my understandings of JavaScript from teaching myself by researching online articles, video lectures, and resources...not from formal education. I'm not saying that you can't successfully learn JavaScript from formal education; I've learned quite a bit from formal education...just not much about programming in general. My advice for newbies to programming in general is to learn how to program before you dive into learning a programming language.
Learning programming is as easy (or hard, depending on how you look at it) as learning calculus. Do realize that when programming you are technically using calculus. Programming = Calculus. You don't necessarily need to know calculus before you learn how to program. (You will slowly realize that as you learn how to program you are literally learning calculus at the same time.) Although, I definitely recommend that you have a good grasp of mathematics and algebra before you begin learning how to program. But, I must point-out, if you already know calculus...you already know how to program!
Where to Begin, with JavaScript:
A great place to begin is by learning about its history. Douglas Crockford, a Yahoo! engineer, is, in my opinion, the definitive "go-to" individual for everything JavaScript. He's graciously spent many years developing an extremely deep understanding of the language, and has posted many online lectures and resources pertaining to it. (Please see the video lectures and resources listed below, specifically the video lecture "Douglas Crockford: The JavaScript Programming Language" and "Crockford on JavaScript - Volume 1: The Early Years".)
As I find more related, quality information I'll update this post, so please bookmark!
Video Lectures:
Douglas Crockford: The JavaScript Programming Language (1hr 50min)
JavaScript: The Good Parts, by Douglas Crockford (1hr 3min)
JavaScript Programming Style and Your Brain (36mins)
Douglas Crockford: An Inconvenient API - The Theory of the DOM (1hr 18mins)
Douglas Crockford: Advanced JavaScript (1hr 7mins)
Crockford on JavaScript - Volume 1: The Early Years (1hr 42mins)
Douglas Crockford: Quality (48mins)
Secrets of JavaScript Closures (5mins)
Web Sites & Resources
ECMAScript.org
ECMAScript Language Specification
JavaScript at Wikipedia
Crockford.com
JS at W3Schools.com
JavaScriptSource.com
JS at Quirksmode.org
Online Tools & Help:
JSLint
JavaScript Cheat Sheets
FireBug
Venkman
Drosera
Dragonfly
JSUnit
JSLitmus
JSMin
BOOKS:
JavaScript: The Good Parts, by Douglas Crockford (Purchase at Amazon)
JavaScript: The Definitive Guide, by David Flanagan (Purchase at Amazon)
Libraries:
Ext JS
jQuery
jQuery UI
Yahoo! User Interface
Dojo Toolkit
Old Technical Posts Archived, New Educational Hub Almost Ready for Beta
So, I'm getting ready to release a new webmaster/web development/affiliate marketing educational hub website and have decided that I'll be posting a lot of educational information and tutorials about related topics there and need to make some room. In doing so I'll be discontinuing the updates of a few of my current websites (like KilerMedia.com which wasn't updated frequently at all anyways) and I'm archiving the relevant posts and info here. So, here they are:
- PHP Tip: Using the Ternary Operator - The ternary operator is your friend!
- Using MySQL's rand() Statement - Easily pull a random item from a table!
- Introduction To PHP: Part #1: What Is PHP? - Need an introduction to the PHP scripting language?
- Why Cookies Are Better Than Sessions - In my opinion, why browser cookies are better to use for user state management than PHP sessions.
- Folder Structuring Best Practices - Organize your root better!
- The "Almost" Perfect Smarty Setup - The Smarty templating engine is by far one of the best out there, and now you'll know how to use it perfectly.
- Some MySQL For The Brain - Good MySQL Tips and Tricks.
- Web Development Cheat Sheets - Some very sweet cheat sheets.
- Ext JS: Create A Basic Login Form - Create a really basic login form for your Ext JS application.
- Ext JS: Adding Functionality To Your Form - How to add a bit of functionality to your Ext JS login form.
Catching The ENTER Key The Cross-Browser Friendly Way (JavaScript)
If you've ever tried creating a cross-browser JavaScript function for capturing the ENTER (or whatever key code you need) key then you know about the major differences in the way each browser handles events...pain in the butt to say the least! Well, I'll go ahead now and save you some time and trouble.
The following snippet of JavaScript will catch the ENTER key (for ALL browsers checked) when it's pressed:
<script type="text/javascript">
function catchEnter(e){
var theKey=0;
e=(window.event)?event:e;
theKey=(e.keyCode)?e.keyCode:e.charCode;
if(theKey=="13"){ // 13 is the key code for ENTER
// here is where your code will go
//return false; // return false if you want to...
//...halt submission of form (call this function onsubmit)
}
}
</script>
Example Usage: call this function in the onkeyup event in the body:
<body onkeyup="catchEnter(event);"...
Example Usage: call this function in the onsubmit event in the form:
<form name="frmForm" onsubmit="return catchEnter(event);"...
This JavaScript has been tested in all the major browsers (Google Chrome, Firefox, Opera, IE, Safari, Netscape).
Ext JS…The Better JS/UI Library
I have to absolutely agree with recent technology reviews stating that the Ext JS library is amongst the best user interface/ajax libraries available today. I originally found out about the library immediately after its initial creation...when the original YUI library for it was introduced to the open source community. In mid-2005 to early 2006 "Ext" came to fruition as a few really cool "widgets" placed wherever you would like on the web if you had a server for yourself somewhere. Now, Ext JS has evolved into a very large JavaScript User Interface library consisting of everything from basic "AJAX" functionality to features as large as completely customizable User Interface widgets and Adobe AIR integration.
But, we're misleading you. By classifying Ext JS as a "User Interface" library we've been leading you to believe that it is such. Well, it definitely is not. It's so much more than just a user interface library. For example, you can use other user interface libraries with Ext JS, like Scriptaculous and jQuery, using a really easy to use Ext adapter. I urge you to discover more information about Ext JS.
In the near future I'll be writing much more about this new fangled Ext JS library (3.0); tutorials, news, etc. In the past I've written a few introductory tutorials which have been getting a bit of notice and have helped a few people get their bearings with Ext JS and its Forms. For more information about Ext JS please see their website here.
