Larry Ullman

Translating Geek Into English

Script 9.4 in “Adobe AIR with Ajax: Visual QuickPro Guide”

Someone pointed out in a forum posting that there was a problem with Script 9.4 of my Adobe AIR with Ajax: Visual QuickPro Guide. By clicking on the name of any item, that item will be moved to the user’s trash. Then the script removes and rebuilds the list of items. I’m not sure if this is due to a change in AIR 1.5 or not, but the problem is that after deleting an item and the list is rebuilt, clicking on any other item no longer works. The solution I came up with may actually be better than the original script (in fact, it probably is). The solution is to remove the specific item that was deleted from the list, instead of deleting and rebuilding the entire list.

Rails and Merb Ruby Frameworks to Merge

A couple of months ago I started hearing about the Merb framework, an alternative to the Rails framework for creating Web sites in Ruby. As you may know, Rails came under some fire for not scaling well; Twitter, in particular, had several problems. (Although I would argue that the demands of a site like Twitter are probably in the top 0.1% of all sites, so this concern may not be an issue for most Web sites.) Version 2 of Rails specifically addressed these concerns, but still, people started to look around for alternatives, including not using Ruby at all. This is where Merb came in: a smaller and faster Ruby framework. I hadn’t yet gotten to play with Merb but was going to add it to my framework-comparison homework. That may be a moot point now, as it was just announced that Merb and Rails will work together on the next version of both frameworks. Version 3 of Rails will incorporate some of Merb’s best attributes, resulting in a better Ruby framework for Web development and ending a minor feud within the Ruby community. So the next version of Merb will be Rails 3.0 and the next version of Rails will be influenced by Merb: what does this mean?

A Little Downtime

There won’t be any new posts for the next week as I’m planning on taking some time off to enjoy the holidays. I will post some more before the end of the year, though, and I have already started some very rough drafts. The topics to be covered over the next month or so include better error reporting, choosing development tools (IDE’s and text editors), and some notes on the 2008 Adobe MAX conference and my first foray into Flex and Flex Builder. Thanks for your interest in what I have to say and happy holidays to those that celebrate holidays around this time of year.

Abbreviated Results Pagination in PHP

In my PHP and MySQL for Dynamic Web Sites: Visual QuickStart Guide book I demonstrate how to paginate query results over multiple pages like you’d see on a search results page. Here’s an image from that example:

Pagination Example from the Book The code in that example creates links for every page. If you have hundreds or more returned results, this isn’t practical. The solution is to rewrite the code that creates the links so that it only shows a few links at a time.

QuickSilver: So Worth Your Time!

I’m a big fan of Mac OS X: it’s arguably the best operating system I’ve ever used. Part of my affection comes from the fact that it just works and part comes from how unbelievably fantastic some of Apple’s applications are (I’m specifically thinking about iTunes, iPhoto, iDVD, etc. here). From a work perspective, it’s so useful to me that Mac OS X is Unix, so I can treat it just as I would most of the servers I use for Web hosting. That being said, you don’t have to mess around with Mac OS X from a Unix perspective if you don’t have the need. Anyway, this post isn’t really about Mac OS X but rather about QuickSilver, one of my favorite applications that runs on Mac OS X. QuickSilver is a free (free!) utility that can be used to launch applications, perform an Internet search, control iTunes, run calculations, and much, much more. It’s only real downside is that it’s so powerful that it’s hard to use it to its full advantage. Fortunately, I’ve found some useful resources towards that end…

Better HTML Forms

One of the sessions I attended at the 2008 Adobe MAX conference in San Francisco was Creating Attractive, Usable, and Accessible Forms, presented by Rob Huddleston. I went to this session as part of my current drive to improve my user interface (UI) and Web accessibility skills. In this post I’ve collected a few do’s and dont’s that I jotted down during Huddleston’s presentation. As was the case for me, you’ll likely already know some of these, some might serve as reminders of something you already knew, and hopefully a couple will make you think about rewriting some of your HTML forms today.