background preloader

Js coffe jquery

Facebook Twitter

Nodeschool.io. Core Concepts Learn You The Node.js For Much Win!

nodeschool.io

Learn the basics of node: asynchronous i/o, http view-source Once you have node installed, open cmd.exe or Terminal.app and run: npm install -g learnyounode (Mac/Linux users: if that doesn't work try it again with 'sudo' in front). Learnyounode to play! Stream Adventure Learn how to compose streaming interfaces with .pipe() view-source Once you have node installed, open cmd.exe or Terminal.app and run: Www.khronos.org/files/webgl/webgl-reference-card-1_0.pdf. Badass JavaScript. I just caught wind of PeerJS, a project that makes peer to peer networking using the new WebRTC browser APIs easier.

Badass JavaScript

WebRTC is extremely cutting edge and the library currently only works in Chrome Canary and Dev Channel, so take this with a grain of salt but it is exciting to see cutting edge libraries like this. PeerJS actually consists of two parts: the client side script that communicates with other clients using WebRTC, and a Node.js server component that brokers the connections between the clients. The server keeps track of each client that is currently online so that the clients can become aware of each other.

Once the clients know about each other, they can connect directly thanks to WebRTC’s RTCPeerConnection API, which allows sending arbitrary data between clients with an API very similar to the WebSocket API. Both binary and textual data will be supported, but right now only text is working. The API looks really easy to use. Soulwire/Coffee-Physics. jQuery Fundamentals. jQuery is built on top of JavaScript, a rich and expressive language in its own right.

jQuery Fundamentals

This section covers the basic concepts of JavaScript, as well as some frequent pitfalls for people who have not used JavaScript before. A guide to the basics of jQuery. Faster JavaScript Memoization For Improved Application Performance. Whilst not new by any means, memoization is a useful optimization technique for caching the results of function calls such that lengthy lookups or expensive recursive computations can be minimized where possible.

Faster JavaScript Memoization For Improved Application Performance

The basic idea is that if you can detect an operation has already been previously completed for a specific set of input values, the stored result can instead be returned instead of repeating the operation again. Some of the problems memoization can help optimize include: recursive mathematics, algorithmic caching of canvas animation and more generally, any problems which can be expressed as a set of calls to the same function with a combination of argument values that repeat. A Brief History If you're a history buff, you may be interested to know that the term 'memoization' was first coined in 1968 by a scientist involved in researching artificial intelligence named Donald Michie – it's based on the latin for the word memorable (memorandum). Implementing Memoization – The Basics. JavaScript Patterns.

Patterns For Large-Scale JavaScript Application Architecture. Today we're going to discuss an effective set of patterns for large-scale JavaScript application architecture.

Patterns For Large-Scale JavaScript Application Architecture

The material is based on my talk of the same name, last presented at LondonJS and inspired by previous work by Nicholas Zakas. Who am I and why am I writing about this topic? I'm currently a JavaScript and UI developer at AOL helping to plan and write the front-end architecture to our next generation of client-facing applications. As these applications are both complex and often require an architecture that is scalable and highly-reusable, it's one of my responsibilities to ensure the patterns used to implement such applications are as sustainable as possible. RequireJS, jQuery, and Publisher. This is a sample JavaScript application hosted on github using RequireJS, Publisher, jQuery, Dust, QUnit, QUnit-TAP and PhantomJS.

RequireJS, jQuery, and Publisher

Addy Osmani has a great article describing some of the challenges this application attempts to overcome. Download it from github and read through the app/js source, I hope it'll be insightful. The repository also contains a README about all the application utilities for testing / building / etc. Yes, this could be done in less than 100 lines of jQuery inside a domready function. The point is to demonstrate how to build an application that can scale to something really complex. RequireJS - Modular Development with AMD Writing modules with RequireJS helps keep code organized both in the file system and in the business-logic of the application. In production, RequireJS optimizes the application by combining all of the modules into a single, compressed file--without requiring any changes to the application.

Evolution of a Prototypal Language User. How CoffeeScript Class Modeling Works. If you haven't taken a look at CoffeeScript, do it now.

How CoffeeScript Class Modeling Works

Seriously. I'll wait. I've been looking at it for a while now and I've always dismissed it off hand as being too much work for not enough return. Javascript suited me just fine for the longest time. But it kept coming up everywhere I looked; and some of the libraries that I like a lot were re-written in CoffeeScript. So now I'm a convert to the Church of Coffee, and like great men have already said, "I'm never going to write another line of JS if I can help it. " One of the things that intrigued me most about the language (or rather, dialect) was how the class construct would compile. Edit: Jeremy Ashkenas mailed me to point out that this simply wasn't true - I'm chalking it down to my own ignorance at that time. I'm glad to say I'm quite happy with CoffeeScript, though.

Compiles to var Animal;Animal = (function() { function Animal() {} return Animal;})(); Edit this Fiddle. Prototype Chains and CoffeeScript Subclasses - Aanand Prasad. Improve your jQuery - 25 excellent tips.