Archive for July, 2006

Ajax Activity Indicators – Make Them Global and Unobtrusive

Earlier today, Ian Selby, wrote a really good article on Activity indicators.

One of the coolest things about developing ajax-enabled applications and sites is the level of interactivity that you can bring to your users. And perhaps one of the most crucial aspects of this process is adding activity indicators to your site. While a lot of ajax requests can be very fast, it’s still important to let your users know that something is happening. All too often I see people forgetting to add these indicators, purposefully omitting them because there wasn’t a good place to include them in the design, or implementing them poorly. One of the biggest omissions that I see is with live searches and auto-completion widgets, but not without good reason. Activity indicators can break up a good layout, as they can require a fair amount of page real estate. They’re also a major pain to incorporate into your apps, as you often end up writing a lot of redundant code to display and hide different indicators on different pages or parts of a page.

So, what can we do about these problems? Well, if you’re using prototype as a part of your framework, you can register global indicator functions. These get executed when there are active requests, and when the requests complete. However, there’s another dilemma with this method too: Where do you place a indicator that can potentially appear often and keep it from being obtrusive, or, even worse, not being seen as it’s placed outside of the content that’s currently in view? I had to tackle that issue this week while starting development on a new project at work. I wanted to create an indicator that would be in the same place on every page, and that I never had to write extra code to use. View a demo of the solution here.


Personally I think he’s got a point, but Global activity indicators are not always the best option, sometimes, when we have a small local change in the page/application we don’t want the user to wait for it to happen. As always this has its places where it makes sense to use, others need other solutions.

Technorati Tags: , , , , ,
Did you like this? Share it:

Party on Castle Lenzburg

Tree, Clock & People Some more people The Park Marriage The park from Above The dancefloor Danfloor again The Bar Lenzburg Goodbye
Did you like this? Share it:

WordPress and SEO

I just stumbled over this very nice article that may improve Search Engine hits. Thomas suggests that you:
  • Use Permalinks
  • Make unique page titles
  • Use Markup correctly (Page Titles as <h1> and <h2>)
  • Use the alt as additional information for images
  • Use “Web 2.0“ish Tags
  • Link to related posts
  • Use Google Sitemaps
  • Ping Aggregators
  • Use Valid markup
  • Get backlinks
And much, much more. Surely an interesting read for Bloggers :)


Technorati Tags: , , ,
Did you like this? Share it:

Cross-Domain limitation, a feature?

Many developers on the Web see the cross-domain limitation as a personal issue, they believe that it was just created to annoy them and force them to work arounds.

Besides being a security enhancement, the cross-domain limitation may also be seen as a feature, forcing the developer to implement some server side caching for the remote Service-provider, taking the load from it and securing that even if the remote service-provider has some downtime, some data will still be available.

Personally I think that we as developers have to protect the ones that provide us with data (XML-Feeds, JSON, …) and not bomb them with requests from our visitors until they can’t survive.


Technorati Tags: , , , ,
Did you like this? Share it:

PNG-Fix for Internet Explorer

This little script has saved me (and the appearance of my site) many time over the last few months, so I decided to share it with you:
 
/*
 * Correctly handle PNG transparency in Win IE 5.5 & 6.
 * Use in  with DEFER keyword wrapped in conditional comments: 
 * <!--[if lt IE 7]> <script defer type="text/javascript" xsrc="pngfix.js" mce_src="pngfix.js"></script> < ![endif]-->
 */var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
 
if ((version >= 5.5) && (document.body.filters)){
   for(var i=0; i<document .images.length; i++){
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG"){
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\">" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}</document>
Hope it proves usefull for you :D
Did you like this? Share it: