John Cox

Blogs · @wyome · Now · Shelf

Tagged development · everything

Interesting

Backbone patterns

This guide documents best practices for building Backbone.js applications, covering patterns for models, views, and general architecture alongside conventions for naming, namespacing, and module organization. It identifies common anti-patterns to avoid, such as overusing document.ready and placing event handlers outside of views, while recommending approaches like using JST templates, sub-views, and mixins for cleaner code structure.

Permalink

Animate.css - a bunch of plug-and-play CSS animations

Animate.css is a ready-to-use CSS animation library that provides pre-built animations for web projects, installed via npm or CDN and applied by adding class names like `animate__animated` and `animate__bounce` to HTML elements. Version 4 introduced breaking changes, most notably prefixing all classes with `animate__`, though a compatibility file is available for migration from older versions. The library uses CSS custom properties for flexible customization of animation duration, delay, and iteration count, and includes utility classes for common timing adjustments and best practices guidance on using animations meaningfully without degrading user experience.

Permalink

jQuery Tokeninput

Tokeninput is a jQuery plugin which allows your users to select multiple items from a predefined list, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook.

Permalink

Responsive News - Responsive CSS that scales

The piece outlines practical strategies for implementing responsive web design across multiple languages, drawing on the BBC News team's experience building a single codebase that serves 30 languages across all devices. It covers challenges specific to multilingual responsive sites and how to adapt layouts, content, and navigation to work effectively regardless of language or screen size.

Permalink

Fully Understanding the this Keyword | Nettuts+

This tutorial from Cody Lindley's "JavaScript Enlightenment" explains how the `this` keyword works in JavaScript by linking functions to the objects they operate on, and how its value is determined by the context in which a function is called at runtime. It covers common scenarios including method calls on objects, nested functions (where `this` unexpectedly refers to the global window object in pre-ES5 code), and how to override `this` using `call()` and `apply()` methods or the `new` keyword in constructor functions. The guide also demonstrates how `this` behaves differently in prototype methods, where it refers to the specific instance invoking the method rather than the global scope.

Permalink

MacRuby: The Definitive Guide

This is a marketing page for O'Reilly's learning platform, promoting its training services for organizations seeking to upskill their workforce in technology, AI, and management. The platform offers expert-led content, live events, and AI-powered guidance (through "Expert Intelligence") that connects enterprise clients to practitioner knowledge across various business functions. O'Reilly serves over 5,000 organizations and positions itself as a solution for closing skill gaps and accelerating AI adoption across all employee levels.

Permalink

Ben Alman » jQuery doTimeout: Like setTimeout, but better

doTimeout is a jQuery plugin that simplifies managing delayed code execution, polling loops, and debouncing by maintaining an internal cache of timeout IDs so developers don't have to track them manually. It offers a cleaner API than native setTimeout while remaining fully jQuery chainable, allowing for easy cancellation, forced execution, and complex behaviors like polling until a condition is met or debouncing repeated events. The plugin is tested across major browsers and provides practical examples for common use cases like window resize handlers and typeahead search inputs.

Permalink