Tuesday, December 30

Usability Tip: Ajax loading/busy indicator

What is Ajax?
In a nutshell, "With Ajax,web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page".

  Now that these requests are happening at the background, user should be aware that the application is trying hard to retrieve the data.  But, How do we do that?

This is where we can use Ajax loading/busy indicator.  We show some text/image saying that we are working/loading... until the request is completed.  This would increase the usability and end user will be happy enough.  
  I am going to show it's implementation in RoR based web applications.  

Module ActionView::Helpers::PrototypeHelper, takes care of Ajax implementation through prototype library.





as you see the rails form tag helper comes out with interesting usability options. Above we just implemented, :loading & :complete options where-in it would show/hide particular div ("loading"). And what's in that div?




well it's done.  
Few samples...




Do I need a designer? 
hmm... we don't need designer for every thing. Especially this usability can be entirely handled by developer.  

How do I create an image? I don't have prior experience! 
Not needed just follow 3 simple steps 
2. select Indicator type, colors. 
3. Generate & Download It  

I don't know RoR, how can I do it in PHP/Python/Java/JavaScript? 
This needs prototype, JavaScript library that provides DOM manipulation. The same is achieved like this:



use the above snippet.

Thursday, December 18

Tweak: updating ruby gems

Recently was helping my friend to setup a twitter based application on server.  And gems needed to be updated as ruby gem "twitter" needs rubygems of  >=1.2.0
  And as usual passed the update query and after a few minutes there is an interesting message saying "nothing to update". 
  There seems to be a minor tweak to achieve this.  A two step tweak which needs another gem installed and then update.
  1. gem install rubygems-update
  2. update_rubygems
and that does the trick ;)

Monday, December 8

Range Class in Ruby

"Range" is an interval with starting and ending values. In ruby ranges can be created either by "literals" or directly through the "Range::new". And of the literals, x..y & x...y. The main difference of the two mentioned literals, inclusion/exclusion of end values in the range.
x..y: includes the end values

(1..5).each do n
puts n, ' '
end


(1...5).each do n
puts n, ' '
end
In the first literal case, values 1, 2, 3, 4, 5 would be printed. Whereas, in the second litereral case 1, 2, 3, 4 only will be printed.

Interestingly methods end/alias would still give the end value of the range. In such case, end_excluded? is apt choice to distinguish.

Wednesday, November 12

Integration Testing: xml_http_request

I was referring to Agile Web Development with Rails book to implement the Integration testing. And as per the book it

xml_http_request "/store/add_to_cart" , :id => ruby_book.id

and strangely I was getting syntax error. Seems the book did miss out another parameter which would define the method type. Referring to online documentation, made things clear.

xml_http_request(request_method, path, parameters = nil, headers = nil)

Performs an XMLHttpRequest request with the given parameters, mirroring a request from the Prototype library.

The request_method is :get, :post, :put, :delete or :head; the parameters are nil, a hash, or a url-encoded or multipart string; the headers are a hash. Keys are automatically upcased and prefixed with ‘HTTP_’ if not already.

Saturday, November 8

Ajax even @ home - I am serious

It's been over two years I heard about this buzz word "AJAX". In fact I came to know about this through one of resumes that I interviewed for php programmers. And once I picked up Ruby on Rails framework, it became pretty common in daily work. Well to cut short and justify title of this post "Ajax even @ home - I am serious". Can't believe? See down ...



Have a nice weekend :)

Thursday, October 16

SnappyFingers - a new way of learning through FAQ's

The way we study, understand, evaluate a particular topic, subject, product is been changing. Ever since the internet boom had made it's mark and search engines like Google, Yahoo... listing down many relevant topics from Wikipedia, webopedia ... useful sites this was seen more prominent.
Let me put it this way, just search through relevant topic and keep filtering the appropriate website(s). I feel many of us would like to understand a topic with basic and frequently asked questions What? Why? Where? How? Which? Who?
Matching to above criteria and thinking process, I found a new product in the market "relevant answers for your frequent questions" - SnappyFingers. It's a smart explorer that would fetch across the relevant answers for your questions. SnappyFingers made the process of finding answers pretty easier.

Thursday, September 4

My Experiments with Google Chrome - 3

This article was shared by Shakti. This is nothing to do with the extensive feature list of chrome, or bugs, or fixes... but on the privacy policy.
Google's Chrome Terms of Service take out a royalty-free license for Google of any content submitted by users over the internet...
Read it from source... http://tapthehive.s483.sureserver.com/chrome.html

Wednesday, September 3

My experiments with Google Chrome -2

As mentioned in my previous post, the import firefox bookmarks is picking up some random profile.  The reason behind this is while importing the chrome could not access the settings of current profile and hence picking up the random profile setting.

Can we have importing based on the profile?

My experiments with Google Chrome -1

I just installed the chrome and started experimenting it. Based on my earlier posts on Add-ons, extensions, profile usage, browser features... one can understand how much I use/love the Firefox browser. As soon as installed the chrome, I started looking for the same. But then I realised it might take some time before I could notice the features that I am fond of.

profile usage:
I extensively make use of this profile feature. I create multiple profiles, based on my work.
  • To create new firefox extension.
  • To test the extensions.
  • For office work.
  • ...
  • ...
Importing bookmarks:
Though I prefer using stumble to bookmark my favorite pages, for quick reference I store some on Firefox bookmark tool bar. When I tried with chrome, it had imported bookmarks randomly from one of the firefox profiles.

Addon's:
I feel the usability of browser increases with these add-on's, extensions.

Google Chrome

Thanks to my friend Aditya, for sharing Google Chrome the browser from Google.
I am always eager about the products that comes out of Google. I am under impression that whatever Google comes out with will have more usability, simplicity, to the point, light weight... and I can go on listing them.
From Google's official blog entry, I went through the story behind building the Google Chrome. It was quite impressive and it shows the approach is really good.
keep watching and experimenting...