Archive for May, 2006

Lazy Login/Register (Psuedo-Users)

via Ajaxian:

I have been using a pattern called the Pseudo User Pattern that many have used over the years.

Basically, it allows users to get through the maximum amount of work without forcing them to signup or login to your application.

Behind the scenes the notion of a User is abstracted and you may be talking to a true user (with a real id) or a pseudo user (with a cookie id).

| Read the rest »

Rewriting Prototype to get rid of that ugly side

As part of a recent effort to make the CNET headers a little slimmer and to address some possible conflicts with our code and the javascript that runs from ad developers, I took some time last friday to rewrite Prototype.lite.js - distributed by the mad4milk guys (who make moo.fx). | Read the rest »

Prototype and its ugly side

Over the last few months I’ve been writing tons and tons of javascript. When I started using prototype it was like someone let me trade out an old broken down underwood keyboard for a modern one. Writing javascript just got WAY less painful. My code got shorter, cleaner, more complex and simpler at the same time.

As many others have said before, it’s crack for javascript coding. It’s very addictive and once you use it you’ll never want to let it go, and maybe that’s the problem. | Read the rest »

Reverse Ajax w/ DWR

via ajaxian (of course):

More and more, Ajax apps are using various techniques to keep content fresh in the browser. Essentially, we’re talking about reversing the usual communication flow- the server notices something’s happened, and wants to tell the browser about it. Server ‘calls’ browser, not browser calls server.

The popular Java Ajax framework, DWR, recently released milestone 2 towards a 2.0 release, and introduced the term ‘Reverse Ajax’ in the process, to capture this high-level pattern. This article (via Joe Walker) abstracts the communication details behind a clean API, so you can easily switch between three different implementations of Reverse Ajax: | Read the rest »

Better carousels; ajax; yahoo

Pardon me for a moment while I stroke my ego a little. About two years ago I designed a contextual carousel for Download.com Music. Across the top were tabs with genre names, and within each genre was a featured artist and four others that you could view. Mousing over the list swapped the featured (large view) artist with the one under your mouse. It looked like this:

One of its traits was that it remembered which genre you last clicked on (a cookie) which meant that if you were a Jazz fan, the next time you visited you’d get a page full of jazz content right up front. Call it cheap personalization. | Read the rest »

Javascript Associative Arrays considered harmful

Via ajaxian - looks like I need to refactor some of my code…

In Javascript, you can treat any object as an associative array, similiar to a Map or Hash structure in other languages. So its just a set of key/value pairs - in JS you can add any arbitrary property on the fly. The below example is using an Object, but you could use an Array or RegExp or FooType.

| Read the rest »

Google Web Toolkit: Ajax Apps from Java

via ajaxian:

Google has released Google Web Toolkit (GWT), a code generation framework that lets you code Ajax apps in pure Java. It’s not unlike Echo2, the open-source framework from NextApp. A compiler performs the Java-to-Javascript translation.

  • Use your favorite Java IDE to write and debug an application in the Java language, using as many (or as few) GWT libraries as you find useful.
  • Use GWT’s Java-to-JavaScript compiler to distill your application into a set of JavaScript and HTML files that you can serve with any web server.
  • Confirm that your application works in each browser that you want to support, which usually takes no additional work.

GWT offers tools for remoting as well as a range of widgets: hierachical trees, tab bars, menu bars, and modal dialog boxes. There’s no mention of using these widgets standalone, but hopefully they can be used as pure Javascript widgets in much the same way as Scriptaculous can be used without Rails.

A widget like tree has methods to manipulate the structure (e.g. addItem()) and event handlers (e.g. addFocusListener).

Yahoo’s new home page

http://www.yahoo.com/?p=1147811418

Things I really like about it:
1) the tour is awesome. Stellar. Spectacular. Probably easily implemented.

2) an editable list of shortcuts (the left nav), with a link to show all the yahoo services that just rolls out and then hides when you’re finished.

3) the ‘carousel’ is tabs with words (no 1 2 3 4 5 stuff) with 4 stories in each tab (again, headlines and thumbnails). I love this carousel! Imagine the same thing on cnet except it said news, downloads, reviews, etc. each with 4 features. My only complaint is that it doesn’t remember which tab I previously viewed.

4) Ajax access to your mail, messenger, and local info.

5) an index/tab based search (no drop down) that’s up front and center
6) clean, crisp, uncrowded layout that allows me to drill into categories of interest (the tabbed carousels in particular) makes the page feel light and organized.