Search Results for: javascript

My Current JavaScript Design Pattern

My Current JavaScript Design PatternWith every major JavaScript project, I’ve tried something new, improving on what I’ve written before. Currently, whenever I build something from scratch, I use a variation of what Addy Osmani and others commonly refer to as the module pattern.

Here is my version below, which assumes jQuery, and then I’ll provide some explanation of what’s going on here and how I use it:

Links for Advanced JavaScript Reading

Links for Advanced JavaScript ReadingDue to the lower traffic holiday week, and the fact that I’m busy with other stuff, this week’s posts will consist of reading lists and roundups.

Today the focus is on some heavier JavaScript stuff. Feel free to add any others in the comments.

JavaScript Array Methods Reference

JavaScript Array Methods ReferenceBack in July I wrote a post called JavaScript String Methods Reference, outlining many of the ways strings can be manipulated in JavaScript.

Another area where JavaScript has a number of different methods available for use is Array manipulation, which I’ll cover in this post. As usual, I’ll do my best to keep it simple and accurate, but if I’ve erred or if you think I’ve omitted anything important, please comment.

JavaScript String Methods Reference

JavaScript String Methods ReferenceWhen writing JavaScript, I often find myself Googling for info, or using Mozilla’s reference to find the exact syntax and argument definitions for methods associated with string manipulation.

A lot of references I come across have far too much info, so this post will give examples and brief descriptions of some of the most common and useful string-related methods. I tried to put the most common ones near the top, for quick reference.

jQuery/JavaScript Tools and Plugins Worth Checking Out

jQuery/JavaScript Tools and Plugins Worth Checking OutSure, recently I mocked the fact that our industry is inundated with scripts, boilerplates, libraries, and frameworks. But that was just a light-hearted look at the state of our industry. I still think there are tons of tools that are valuable and worth knowing about for front-end developers.

So here’s another list of tools and other goodies that might be of interest to JavaScript developers.

Some Random JavaScript Coding Tidbits

Some Random JavaScript Coding TidbitsAlthough my knowledge of HTML and CSS seems somewhat rounded and complete, I don’t feel the same way about JavaScript. I always seem to be learning something new, or else reminding myself of stuff I might have learned years ago but have forgotten.

So here are a few things I’ve recently learned or read about that might be useful to you.

Some JavaScript Resources for Web App Developers

A Few JavaScript Resources for Web App DevelopersI’ve been bookmarking quite a few guides, docs, and other resources, some of which I thought I’d share here. (Oh and when I say “bookmarking”, I mean saving to a text file. I’m so high tech, dude.)

In particular, if you’re developing large-scale JavaScript-driven applications, some of these might be useful for you. Beginners be warned: Most of these are uber-intense, so not for the faint of heart. Nonetheless, I think beginners can still learn a few things despite the high-level of most of this information.

Why Use the Triple-Equals Operator in JavaScript?

Why Use the Triple-Equals Operator in JavaScript?“Determining whether two variables are equivalent is one of the most important operations in programming.” That’s according to Nicholas Zakas in his book JavaScript for Web Developers.

In other words, throughout your scripts you’ll probably have lines comparing values. JavaScript beginners who try to adhere to best practices may be using triple-equals and not double-equals, but might not fully understand what the difference is or why it’s important to stick to triple-equals.

Callback Functions in JavaScript

Callback Functions in JavaScriptIf you’re fairly inexperienced with JavaScript but you’ve used jQuery, then its likely you’ve used callback functions. But maybe you don’t fully understand how they work or how they’re implemented.

In this post, which is based on what I’ve learned about callback functions, I’ll try to enlighten you on this fairly common JavaScript technique. And maybe some of our JavaScript experts can chime in and let me know what I’ve omitted or oversimplified.

Why Use jQuery for Simple JavaScript Tutorials?

Why Use jQuery for Simple JavaScript Tutorials?A trackback on one of my previous posts (yeah, trackbacks aren’t just for spam) alerted me to an interesting point brought up by a blogger named Matt Pass. In his post entitled Walnut, Meet jQuery Sledgehammer he politely explains why he feels it’s overkill to use jQuery in a simple tutorial post.

His main point is summarized in this quote: “Do you really need a 90k JavaScript library (and thats the minified version) to toggle the size of a menu?”