JavaScript You Need to Know For a Job

Published: June 5, 2015

How much JavaScript do you need for an entry-level job?

Jeff Cogswell recently posted some guidelines.

The absolute basics

  • Variables
  • Functions
  • The difference between null and undefined
  • And so on

Beginner’s List

  • Know the different ways to create objects, such as using the “new” keyword, as well as just declaring an object (such as ‘x = {a:1, b:2};’).
  • Know what a prototype is, what the “this” variable does, and how to use both.
  • Know the difference between a list and an object (and how a list is technically both, and can be used as both).
  • Know that functions are objects that can be passed as parameters into other functions and returned from other functions.
  • Know what closures are and how to use them. This might seem like an advanced topic, but when working with functions returning functions, it’s easy to introduce bugs if you’re not careful.
  • Know how to use functions such as the list’s map and filter functions. With this in mind, I encourage you to read this specification and learn the methods available on all types of objects.
  • Understand the built-in objects (they’re constructors!) and how to use them, including Function and Array (with capital F and A).
  • Know your way around the developer command line and debugger. All the major browsers provide these now.

Document Object Model

The DOM (Document Object Model) is the browser’s representation of a Web page. Vital aspects include:

  • Accessing the DOM directly from JavaScript. For example, know how to locate elements through calls such as getElementById, getElementsByClassName, getElementsByTagName, and so on. Also know how to use the newer selector methods: querySelector, querySelectorAll.
  • Accessing the DOM using jQuery. Again, jQuery isn’t part of JavaScript, but a lot of employers expect you to know it. Know the difference between $(‘a’) and $(‘.a’). A simple dot changes everything.
  • Understand the global object, how the browser provides the global object, and how you access it through your JavaScript programming. (Answer: The browser provides the window object (lowercase w) as the global object.)
  • Understand why the browser is the service implementing the global object and what happens when you move JavaScript code outside of the browser, such as to Node.js.

A lot of documentation presents the DOM API using what looks like C-language interfaces. That’s because under the hood, the objects likely are C objects. You access these objects through your JavaScript code. For example, when you call getElementById, you get back an element. But under the hood, that object is a C object with properties and methods.

Advanced

  • Know how to call bind, call, and apply on a function, what the differences are, and why you would need to use them.
  • Know the different ways to create objects, including Object.create, and when you’ll need the hasOwnProperty method.
  • Know the different ways of implementing object-oriented programming, especially inheritance.
  • Know what promises are, and learn two important asynchronous libraries: async and Q. They’re used a great deal in server-side Node.js programming, but can also be a huge benefit in browser programming.
  • Learn server-side Node.js programming. It will really force you to become a JavaScript guru.

Source: JavaScript You Need to Know For a Job

Via Slashdot: How Much JavaScript Do You Need To Know For an Entry-Level Job?

This comment from Slashdot has good advice for the aspiring programmer:

If you want an entry level programming job and don’t have any experience, you’d had better made something non-trivial on your own time that you can show in an interview and explain the code. If I’m skimming your code and I see you picked a certain data structure or implemented a algorithm when there is more than one way to do it, you should be able to explain your reasoning for coding it the way you did. Also make sure you learn at least the basics of one of the popular frameworks and use it in your demo.

So make a Javascript web app, or something on the server side with a free or low cost hosting account. Make it functional, make it as bug proof as you can, make the code clean and easy to read, and be prepared to show it to a skeptical audience. Think of your interview as an audition and your code as the music you’re going to play.

If you can’t make something to show, you don’t know enough Javascript yet.

[Source]

Browser Detection, Feature Detection

Published: February 5, 2013

Browser detection and feature detection: a brief survey of libraries and techniques.


Modernizr

modernizr.com

“Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.”

Taking Advantage of HTML5 and CSS3 with Modernizr


has.js

has.js – “Pure feature detection library, a la carte style.”

Feature Detection with has.js


Detector

Detector is a simple, PHP- and JavaScript-based browser- and feature-detection library that can adapt to new devices & browsers on its own without the need to pull from a central database of browser information.


Stack Overflow pages

Plenty of lively discussion — as usual — at Stack Overflow:

JavaScript: Detecting browser library function – does one exist?

JavaScript libraries to detect browser capabilities/plug-ins

Library to detect and parse browser information

Browser detection versus feature detection

How do I redirect my client to a different page according to their browser?

Need a good JS browser detection library but not JQuery

Further reading

Browser detection in JavaScript libraries

detectmobilebrowsers.com

Detecting HTML5 Features

Browser and Feature Detection

Feature Detection: State of the Art Browser Scripting

Server-Side Device Detection: History, Benefits And How-To

JavaScript Template Engines

Published: October 29, 2012

Template engines for rendering data into HTML in the browser using JavaScript:

Ultimate jQuery List

Published:

“The ultimate list of tutorials and plugins for jQuery.”

jquerylist.com

Adapt.js: JavaScript Alternative to CSS Media Queries

Published: April 26, 2011

Adapt.js is a JavaScript library (or framework) that helps you design web sites for mobile devices:

For many developers that means using @media queries to selectively target the device screen size and orientation through CSS.

While the @media approach is a good one, it won’t work for every site. That’s why Nathan Smith, creator of the 960 Grid System, has released Adapt.js, a lightweight JavaScript library (894 bytes minified) that allows you to specify a list of stylesheets and the screen sizes for which they should be loaded. Essentially Adapt.js does the work of @media, but will work in any browser, even those that don’t understand @media.

… While using JavaScript to load CSS might seem a bit strange, even if you use @media queries you’re still going to need some kind of polyfill (usually JavaScript-based) to handle those browsers that don’t know what to do with @media rules.

Scott Gilbertson @ Webmonkey

jQuery Mobile Alpha 3 Released

Published: March 22, 2011

The jQuery team reports:

We’re pleased to announce the third alpha release of the jQuery Mobile project. This release includes a number of bug fixes and enhancements to the original jQuery Mobile Alpha 1 and jQuery Mobile Alpha 2 releases.

jQuery Mobile Alpha 3 Released

Via Ajaxian

Microsoft Builds JavaScript Malware Detection Tool

Published: December 5, 2010

As browser-based exploits and specifically JavaScript malware have shouldered their way to the top of the list of threats, browser vendors have been scrambling to find effective defenses to protect users. Few have been forthcoming, but Microsoft Research has developed a new tool called Zozzle that can be deployed in the browser and can detect JavaScript-based malware on the fly at a very high effectiveness rate. Zozzle is designed to perform static analysis of JavaScript code on a given site and quickly determine whether the code is malicious and includes an exploit. In order to be effective, the tool must be trained to recognize the elements that are common to malicious JavaScript, and the researchers behind it stress that it works best on de-obfuscated code.

Slashdot

jQuery Navigation Menu Tutorials

Published: November 13, 2010

26 Useful jQuery Navigation Menu Tutorials @ designm.ag

jQuery Plugins

Published: November 12, 2010

Extend the power of jQuery with plugins

10 Useful jQuery Plugins and Techniques

Sites of Interest

Published: September 10, 2010

PHP HTML Form Example @ tizag.com

Password Protect a Page @ Totally PHP

Code Gallery @ Zend

Php Sample Code @ happycodings.com

PHP Example Scripts @ php-scripts.com

19 Unique jQuery Tutorials for Web Developers @ webdesignledger.com