background preloader

Javascript

Facebook Twitter

Javascript Resources

A Useful Collection of JavaScript Application Frameworks. Here’s a useful collection of which encapsulate many details such as DOM manipulation, event handling and cross-platform. Creating a maintainable interface for a certain web app is not easy as you think – but it is if you have these frameworks. If you are working with responsive web designs, check our our collection of jQuery plugins for building responsive layouts . You might want to take a look at the following related articles: 20 JavaScript MVC Frameworks for Rapid Development 20 Responsive CSS Frameworks and Boilerplates 25 Mobile Frameworks To Develop Multi-Platform Apps A Guide to Managing your Social Media Profiles 15 Programs and Tools to Convert Text to Speech Dont forget to subscribe to our RSS-feed and follow us on Twitter – for recent updates.

JS Library Boilerplate An easy boilerplate for rolling your own JavaScript Library like jQuery, Zepto, Prototype, etc. JavaScript Application Frameworks: jQuery jQuery is a fast, small, and feature-rich JavaScript library. YUI Library ScaleApp. CodeWars. Understanding JavaScript Function Invocation and “this” Over the years, I've seen a lot of confusion about JavaScript function invocation.

Understanding JavaScript Function Invocation and “this”

In particular, a lot of people have complained that the semantics of this in function invocations is confusing. In my opinion, a lot of this confusion is cleared up by understanding the core function invocation primitive, and then looking at all other ways of invoking a function as sugar on top of that primitive. In fact, this is exactly how the ECMAScript spec thinks about it. In some areas, this post is a simplification of the spec, but the basic idea is the same. First, let's look at the core function invocation primitive, a Function's call method[1]. Make an argument list (argList) out of parameters 1 through the end The first parameter is thisValue Invoke the function with this set to thisValue and the argList as its argument list For example: function hello(thing) { console.log(this + " says hello " + thing); } hello.call("Yehuda", "world") //=> Yehuda says hello world [2] Actually, I lied a bit.

How Do You Structure JavaScript? The Module Pattern Edition. JavaScript is interesting in that it enforces no particular structure upon you.

How Do You Structure JavaScript? The Module Pattern Edition

"Bring Your Own Organization", if you will. As I write more and more JavaScript in web app sites, this becomes more and more interesting. How you structure your JavaScript is very important because: Done right, it makes code easier to understand for others and yourself re-visting your own code.Having a decided-upon structure helps keep future code clean and encourages your declared best practices.It makes your code testable.

Before I go any further, let it be known that I am far from a master of JavaScript. This has been a topic in my mind lately because I've been writing a lot more JavaScript for CodePen, which is very JavaScript heavy. Then I posted this article about the making of the Treehouse ad, and within it I also used the Module Pattern for the JavaScript there. The Concept It's easier to understand concepts like this if there is an example to build from. The Module Humble beginnings: Just an object. Revisiting JavaScript Objects. During the holidays, I spent some time catching up on the developments in ES6 (next version of JavaScript).

Revisiting JavaScript Objects

While going through some of the proposals such as Minimal Class Definitions, Proxy API and Weak Maps; I noticed most of these enhancements make extensive use of the object manipulation features introduced in ES5 (ie. ECMAScript5 - the current JavaScript standard). One of the main focuses of ES5, has been to improve the JavaScript's object structure and manipulation. The features it introduced do make lot of sense, especially if you're working with large and complex applications. We've been little reluctant to adopt ES5 features, especially due to browser compatibility issues.

Data and Accessor Properties ES5 introduces two kinds of object properties - data and accessors. Here we have defined a square object, with length as a data property and area as an accessor property. > square.length 10> square.area 100> square.area = 400 400 > square.length 20 Property Descriptor Enumerations.

JQuery

Tizag Tutorials. Google I/O 2011: Learning to Love JavaScript. JavaScript Cookies.