Buy a Tee and Support the Site

May 6 This Year

Come in 2 Colors (Dark Grey further below), and ships worldwide

Deep Teal

JavaScriptIsSexy_Tee_DeepTeal

Dark Grey

JavaScriptIsSexy_Tee_DarkGrey

Learn HTML5, CSS3, and Responsive WebSite Design in One Go

(You will also learn HTML5 Boilerplate, Modernizr, and Twitter Bootstrap 3.0 responsive website layout)

Prerequisite: Familiarity with basic HTML and CSS
Duration: 2 – 3 days (about 18 hours)

We have learned quite a bit of JavaScript, but we must take a break from JavaScript briefly and learn HTML5 and CSS3, because we need both, along with JavaScript of course, to build modern web applications and websites.

Both CSS3 and HTML5 are just about fully supported in all modern browsers, and we there are techniques in place to patch old browsers that lack support. So there is no disadvantage to using CSS3 and HTML5 today. The opposite is true, however: there are many painful, frustrating disadvantages with forgoing HTML5 and CSS3.

You may already “know” a bit of HTML5 and a touch of CSS3 (or perhaps you probably know enough old-school HTML and CSS), and with this knowledge, you might have thought you needn’t learn HTML5 and CSS3 fully.

The crux of the matter is that after you complete this course, you will make faster, more user friendly, highly adaptive websites and web applications. And you will learn a number of other very exciting modern web development techniques.

Responsive Web Design is becoming increasingly essential (we are probably a few months away from responsive being mandatory) with the ubiquity of the myriad screen sizes available today. As a result, modern web developers are expected to understand and implement responsive web designs.

What You Will Learn?

  • HTML5 Core (HTML5 semantics, video, and audio; and later, Advanced HTML5 APIs)
  • Responsive Web Design (create fluid, responsive layouts from scratch and from static, pixel based layouts; responsive images, icons, and videos; and more)
  • Tools and Strategies for Designing the user interface and static comps for responsive websites
  • HTML5 Boilerplate, Modernizr, and Initializr
  • Twitter Bootstrap 3.0 Responsive Layout and Best Practices

Continue Reading

OOP In JavaScript: What You NEED to Know

March 19 This Year

(Object Oriented JavaScript: Only Two Techniques Matter)

Prerequisite:
JavaScript Objects in Detail
JavaScript Prototype

The main principle with Object Oriented Programming (OOP) is the use of Classes (Functions in JavaScript) to create objects, and that objects are implemented in a manner that allows them to adopt Inheritance, Polymorphism, and Encapsulation. We are only concerned with Inheritance and Encapsulation, since only these are applicable for OOP in JavaScript. Essentially, objects can encapsulate functionalities and inherit methods and properties.

The rest of this article will focus on using objects in JavaScript in an object oriented manner—with inheritance and encapsulation—to easily reuse code in our applications and abstract functionalities away into specialized objects. We will focus only on the best two techniques [1] for implementing OOP in JavaScript. Continue Reading

Understand JavaScript Callback Functions and Use Them

March 4 This Year

(Learn JavaScript Higher-order Functions—Callback Functions)

In JavaScript, functions are first-class objects, which means functions can be used in a first-class manner like objects, since they are in fact objects themselves: They can be “stored in variables, passed as arguments to functions, created within functions, and returned from functions” [1].

Because functions are first-class objects, we can use callback functions in JavaScript. In the rest of this article we will learn everything about callback functions. Callback functions are probably the most widely used functional programming technique in JavaScript, and they are literally in just about every piece of JavaScript and jQuery code, yet they are a mystery to many JavaScript developers. You will know how to use them after reading this article.

Callback functions are derived from a programming paradigm called functional programming. At a simple and fundamental level, functional programming is the use of functions as arguments. Functional programming was—and still is, though to a much lesser extent today—seen as an esoteric technique of specially trained, master programmers.

Fortunately, the techniques of functional programming have been elucidated so mere mortals like you and I can understand and use them with ease. One of the chief techniques in functional programming is that of callback functions. As you will read shortly, implementing callback functions is as easy as passing regular variables as arguments to functions. This technique is so easy that I wonder why it is usually covered only in advanced JavaScript topics.
Continue Reading

Learn Intermediate and Advanced JavaScript

February 25 This Year

(Learn Intermediate and Advanced JavaScript Concepts and Techniques in 2 Weeks)

Prerequisite:
You have completed this course: Learn JavaScript Properly (For NON-JavaScript programmers and First-time Programmers)

Or you already know the following JavaScript concepts well:
— Simple Data Types, Reference Types, Operators, and Objects (in Detail)
— Variable Scope and Hoisting, Expressions, Statements, and JSON
— DOM, The Window Object, JavaScript Events, and Handling Errors
— Functions, Function Properties, Function Expression, and AJAX
— Basic Regular Expressions and Modules

Duration:
2 Weeks

I submit to you an instructive course on intermediate and advanced JavaScript. The skills you will learn in this course of study will free you from the constrains of using the limited JS techniques you have been using to develop JS applications, and they will give you new insights and new techniques—a Jedi’s temperament and stature—to program JS applications with ease, efficiency, and preciseness.

If you are new to JavaScript and you are an experienced programmer in another langauge such as Java, Python, ActionScript, Rails, PHP, etc., it is important that you learn JavaScript properly. JavaScript has many idiosyncracies and uncommon concepts that you must know well before you follow this Intermediate to Advanced JavaScript course.
Continue Reading

How to Learn JavaScript Properly

February 24 This Year

Two separate roadmaps to learn JavaScript properly for readers with different programming backgrounds:

Learn JavaScript Properly (For NON-JavaScript Programmers and First-time Programmers)

Duration: 6 to 8 weeks.
Prerequisite: Completed at least middle school (no programming experience necessary).
Continue course below.

Learn Intermediate and Advanced JavaScript
(This links to a separate article)

This course outline gives you a structured and instructive roadmap on how to learn JavaScript properly and thoroughly, from absolute beginner to attainment.

You do want to learn JavaScript; it is why you are here, and you have made a wise decision, for if you want to develop modern websites and web applications (including an internet startup), you need to know JavaScript. And while there are more than enough online resources to teach you JavaScript, finding the most efficient and beneficial method to learn the “language of the web” is not easy and could be frustrating.

It is worth noting that unlike just a couple of years ago when you needed to know a true server-side language (such as PHP, Rails, Java, Python, or Perl) to develop scalable, dynamic, database-driven web applications, today you can do as much and more with JavaScript alone.
Continue Reading

12 Simple (Yet Powerful) JavaScript Tips

February 20 This Year

(For Badass JavaScript Development)

NOTICE: I have written only 2 of the 12 tips so far, but I plan to post all 12 Powerful Tips by April 14. This will be a must-read post once all the powerful tips are ready. ;)

I provide you with 12 simple, yet powerful, JavaScript tips and detailed explanation of each. These are techniques that all JavaScript programmers can use now; you needn’t be an advanced JavaScript developer to benefit from these tips. After you read all of the detailed explanations of how each technique works and when to use it, you will have become a more enlightened JavaScript developer, if you aren’t already one.

Indeed, notable JavaScript masters and enlightened JavaScript developers have been using many of these techniques to write powerful, efficient JavaScript. And in a bit, you will, too.

  1. Powerful JavaScript Idiomatic Expressions With && and ||

    You see these idiomatic expressions in JavaScript frameworks and libraries. Let’s start off with a couple of basic examples:

    Example 1: Basic “short circuting” with || (Logical OR)
    To set default values, instead of this: Continue Reading

Handlebars.js Tutorial: Learn Everything About Handlebars.js JavaScript Templating

February 18 This Year

 

(This is a Handlebars.js Tutorial and a Handlebars.js Reference)

This is a complete tutorial, and indeed a reference, on Handlebars.js templating and, principally, JavaScript templating. Handlebars.js is a client-side (it can be used on the server, too) templating engine for JavaScript. It is a JavaScript library that you include in your page just like you include any .js files. And with it, you can add templates to your HTML page that will be parsed and interpolated (values of properties inserted in place) with the values from the data you passed to the Handlebars.js function.

How it works: Handlebars.js is a compiler built with JavaScript that takes any HTML and Handlebars expression and compiles them to a JavaScript function. This derived JavaScript function then takes one parameter, an object—your data—and it returns a string with the HTML and the object properties’ values inserted into the HTML. So, you end up with a string (HTML) that has the values from the object properties inserted in the relevant places, and you insert the string on a page.

Do I Have To Use a JavaScript Templating Engine? If so, Why?
Continue Reading

Learn Node.js Completely and with Confidence

February 4 This Year

Duration: about 2 weeks
Prerequisite: JavaScript knowledge of 5/10

This is the most exciting time to be a JavaScript developer, and it will only get better, particularly because of the advent of HTML5, the abandonment of Flash, the ubiquity of mobile devices, and most certainly because of Node.js, which allows developers to use JavaScript on the server.

Node.js itself is revolutionary and it is the immediate and near future of modern web application development with JavaScript as the sole server-side language. I provide you with a detailed roadmap for learning Node.js that has worked for me (an eCommerce Node.js web app I developed), and I am confident it will work for you. You will learn Node.js completely and you should approach this course with confidence, because you are only 2 to 3 weeks away from building amazingly fast, real-time, modern web applications in short time.

Why Learn Node.js
JavaScript is the language of the web today and unquestionably for the near future, because there is no alternative to JavaScript on the horizon. The ECMAScript organization has been moving full pace ahead with advancing the JavaScript language. And Node.js allows developers to develop modern applications with JavaScript as the sole server-side language.

With a thorough understanding of Node.js, you will be able to develop real-time, fast, scalable, data-driven web applications, and you will have the requisite knowledge to quickly adapt to any of the emerging, cutting-edge JavaScript frameworks such as Derby.js and Meteor.js.
Continue Reading

Understand JavaScript Closures With Ease

February 2 This Year

Closures are lovely and reliably serviceable: They allow programmers to program creatively, expressively, and concisely. They are used frequently in JavaScript and, no matter your JavaScript skill level, you will no doubt encounter them. Sure, closures might appear complex and beyond your scope, but after reading this article, closures will be much more easily understood and more appealing for usage in your everyday JavaScript programming.

This is a relatively short (and sweet :) ) post on the details of closures in JavaScript. You should be familiar with JavaScript variable scope before you read further, because to understand closures you must understand JavaScript’s variable scope.

What is a closure?
A closure is an inner function that has access to the outer (enclosing) function’s variables—scope chain. The closure has three scope chains: it has access to its own scope (variables defined between its curly brackets), it has access to the outer function’s variables, and it has access to the global variables.

The inner function has access not only to the outer function’s variables, but also to the outer function’s parameters. Note that the inner function cannot call the outer function’s arguments object, however, even though it can call the outer function’s parameters directly.

You create a closure by adding a function inside another function.
A Basic Example of Closures in JavaScript:

function showName (firstName, lastName) {

var nameIntro = "Your name is ";
    // this inner function has access to the outer function's variables, including the parameter
function makeFullName () {
        
return nameIntro + firstName + " " + lastName;
    
}

return makeFullName ();

}


showName ("Michael", "Jackson"); // Your name is Michael Jackson


Closures are used extensively in Node.js; they are workhorses in Node.js’ asynchronous, non-blocking architecture. Closures are also frequently used in jQuery and just about every piece of JavaScript code you read.
A Classic jQuery Example of Closures:

$(function() {

var selections = []; 
$(".niners").click(function() { // this closure has access to the selections variable
selections.push (this.prop("name")); // update the selections variable in the outer function's scope
});

});

Closures’ Rules and Side Effects
Continue Reading