A List Apart

Menu

Topic: JavaScript

  • JavaScript Minification Part II

    by Nicholas C. Zakas · Issue 310 ·

    Variable naming can be a source of coding angst for humans trying to understand code. Once you're sure that a human doesn't need to interpret your JavaScript code, variables simply become generic placeholders for values. Nicholas C. Zakas shows us how to further minify JavaScript by replacing local variable names with the YUI Compressor.

  • SVG with a little help from Raphaël

    by Brian Suda · Issue 310 ·

    Want to make fancy, interactive, scalable vector graphics (SVGs) that look beautiful at any resolution and degrade with grace? Brian Suda urges you to consider Raphaël for your SVG heavy lifting.

  • Stop Forking with CSS3

    by Aaron Gustafson · Issue 308 ·

    You may remember when JavaScript was a dark art. It earned that reputation because, in order to do anything with even the teensiest bit of cross-browser consistency, you had to fork your code for various versions of Netscape and IE. Today, thanks to web standards advocacy and diligent JavaScript library authors, our code is relatively fork-free. Alas, in our rush to use some of the features available in CSS3, we've fallen off the wagon. Enter Aaron Gustafson’s eCSStender, a JavaScript library that lets you use CSS3 properties and selectors while keeping your code fork- and hack-free.

  • Taking Advantage of HTML5 and CSS3 with Modernizr

    by Faruk Ateş · Issue 308 ·

    Years ago, CSS browser support was patchy and buggy, and only daring web designers used CSS for layouts. Today, CSS layouts are commonplace and every browser supports them. But the same can't be said for CSS3 and HTML5. That's where Faruk AteÅŸ’s Modernizr comes in. This open-source JavaScript library makes it easy to support different levels of experiences, based on the capabilities of each visitor’s browser. Learn how to take advantage of everything in HTML5 and CSS3 that is implemented in some browsers, without sacrificing control over the user experience in other browsers.

  • Better JavaScript Minification

    by Nicholas C. Zakas · Issue 304 ·

    Like CSS, JavaScript works best and hardest when stored in an external file that can be downloaded and cached separately from our site's individual HTML pages. To increase performance, we limit the number of external requests and make our JavaScript as small as possible. JavaScript minification schemes began with JSMin in 2004 and progressed to the YUI Compressor in 2007. Now the inventor of Extreme JavaScript Compression with YUI Compressor reveals coding patterns that interfere with compression, and techniques to modify or avoid these coding patterns so as to improve the YUI Compressor's performance. Think small and live large.

  • Accent Folding for Auto-Complete

    by Carlos Bueno · Issue 301 ·

    Another generation of technology has passed and Unicode support is almost everywhere. The next step is to write software that is not just "internationalized" but truly multilingual. In this article we will skip through a bit of history and theory, then illustrate a neat hack called accent-folding. Accent-folding has its limitations but it can help make some important yet overlooked user interactions work better.

  • The Problem with Passwords

    by Lyle Mullican · Issue 300 ·

    Abandoning password masking as Jakob Nielsen suggests could present serious problems, including undermining a user’s trust by failing to meet a basic expectation. But with design patterns gleaned from offline applications, plus a dash of JavaScript, we can provide feedback and reduce password errors without compromising the basic user experience or losing our visitors’ trust.

  • Discovering Magic

    by Glenn Jones · Issue 293 ·

    Wouldn’t it be a little magical if, when you signed up for a new site, it said something like, “We notice you have a profile photo on Flickr and Twitter, would you like to use one of those or upload a new one?” Glenn Jones created a JavaScript library called Ident Engine that can help you do just that.

  • Inline Validation in Web Forms

    by Luke Wroblewski · Issue 291 ·

    Web forms don’t have to be irritating, and your inline validation choices don't have to be based on wild guesses. In his examination of inline form validation options, Luke Wroblewski offers that rarest of beasts: actual data about which things make people smile and which make them want to stab your website with a fork.

  • JavaScript MVC

    by Jonathan Snook · Issue 290 ·

    As JavaScript takes center stage in our web applications, we need to produce ever more modular code. MVC (Model-View-Controller) may hold the key. MVC is a design pattern that breaks an application into three parts: the data (Model), the presentation of that data to the user (View), and the actions taken on any user interaction (Controller). Discover how MVC can make the JavaScript that powers your web applications more reusable and easier to maintain.

  • Creating Intrinsic Ratios for Video

    by Thierry Koblentz · Issue 284 ·

    Have you ever wanted to resize a video on the fly, scaling it as you would an image? Using intrinsic ratios for video and some padding property magic, you can. Thierry Koblentz shows us how.

  • Advanced Debugging With JavaScript

    by Chris Mills, Hallvord R.M. Steen · Issue 277 ·

    JavaScript debuggers help find and squash errors in code. To become an advanced debugger, you'll need to know about the tools available to you, the typical JavaScript debugging workflow, and code requirements for effective debugging. In this article, using a sample web application, Steen and Mills share advanced techniques for diagnosing and treating bugs.

  • Progressive Enhancement with JavaScript

    by Aaron Gustafson · Issue 271 ·

    Our introductory series on progressive enhancement and the ways it can be implemented concludes with a look at the mindset needed to implement PE in JavaScript, and a survey of best practices for doing so.

  • Progressive Enhancement with CSS

    by Aaron Gustafson · Issue 270 ·

    Organize multiple style sheets to simplify the creation of environmentally appropriate visual experiences. Support older browsers while keeping your CSS hack-free. Use generated content to provide visual enhancements, and seize the power of advanced selectors to create wondrous (or amusing) effects. Part two of a series.

  • Understanding Progressive Enhancement

    by Aaron Gustafson · Issue 269 ·

    Steven Champeon turned web development upside down, and created an instant best practice of standards-based design, when he introduced the notion of designing for content and experience instead of browsers. In part one of a series, ALA’s Gustafson refreshes us on the principles of progressive enhancement. Upcoming installments will translate the philosophy into sophisticated, future-focused design and code.

  • Test-Driven Progressive Enhancement

    by Scott Jehl · Issue 268 ·

    Starting with semantic HTML, and layering enhancements using JavaScript and CSS, is supposed to create good experiences for all. Alas, enhancements still find their way to aging browsers and under-featured mobile devices that don't parse them properly. What's a developer to do? Scott Jehl makes the case for capabilities testing.

  • CSS Sprites2 - It’s JavaScript Time

    by Dave Shea · Issue 266 ·

    In 2004, Dave Shea took the CSS rollover where it had never gone before. Now he takes it further still—with a little help from jQuery. Say hello to hover animations that respond to a user's behavior in ways standards-based sites never could before.

  • Getting Out of Binding Situations in JavaScript

    by Christophe Porteneuve · Issue 262 ·

    Every wonder who you really are? Congratulations! You have a lot in common with JavaScript. Learn once and for all how to train your JavaScript to remember who it is and what it's doing.

  • Zebra Tables

    by David F. Miller · Issue 173 ·

    While misused tables are becoming increasingly rare, the table retains a legitimate role in data formatting. A little CSS and JavaScript magic can make tables better at what they do best: displaying tabular data.

  • Creating More Using Less Effort with Ruby on Rails

    by Michael Slater · Issue 257 ·

    The "why" of Ruby on Rails comes down to productivity, says Michael Slater. Web applications that share three characteristics, they're database-driven, they're new, and they have needs not well met by a typical CMS, can be built much more quickly with Ruby on Rails than with PHP, .NET, or Java, once the investment required to learn Rails has been made. Does your web app fall within the RoR "sweet spot?"

Topics