Saturday, November 3, 2007

Shakespeare and XMLHttpRequest

Prologue:

Year: 1597 (Elizabethan Era)

Juliet:"What's in a name? That which we call a rose, By any other name would smell as sweet."

(Wily Billy) Shakespeare
Romeo and Juliet (II, ii, 1-2)

****************************

Everybody speaks about AJAX – one cool thing about AJAX is the name. Compare it with C++, PERL, HTTP, WWW and you will understand what I mean.

If the cornerstone of AJAX, viz. X comes from XMLHttpRequest, it was inexplicable to me why it contains XML in the name where the response payload need not be XML.

Answer came from the root of XMLHttp object – Alex Hopmann, member of the team who introduced it in IE for Outlook Web Access in Microsoft, Apparently the reason for the name was a trick on the Management to cram in the feature into IE at the last moment, using the gaining popularity of XML.

Imagine the conversation in MS.

Outlook Team: Buddy, I want a new feature AsyncHttpRequest into IE – can you do it?

IE Team: Not so easy as we are under a tight schedule. I don’t think we can get it approved from Product Management at this time.

Outlook Team: Don’t worry about that. Pass it as XMLHttpRequest. As they say, add XML and no one will ask questions.

IE Team: Will that work?

Outlook Team: Sure. How do you think they got the MSXML across?

IE Team: Won’t users ask questions why XML?

Outlook Team: Quote Shakespeare. No one will ask anymore questions.


***********************

Epilogue:

The court gave the verdict in favour of Microsoft in the case filed against MS in what can be called as the biggest Internet scandal of cheating Developer Community with a XMLHttpRequest object that had nothing do with XML. The judge also advised the Attorney not to mention Shakespeare again lest he be tried under contempt-of-court.

Blog = Build log

2 years back when I started work, I came across a number of blogs on Java and Oracle (my primary area of work) that I wanted to keep track of. But I never heard of RSS then, and I used to bookmark and follow-up on each of them, by manually going to each page (alright, I admit I like doing and repeating dumb work)

But once I started using a RSS reader (GoogleReader in my case since it is an online application), I was turned on by RSS by the simplicity of it. I recollected a fleeting note by my friend about RDF and Semantic web, long back while I was in college. Another friend of mine sent this video link to me, titled “RSS Beyond Blogging”. Why do we have to restrict RSS to blogs and sites? This thought was perpetual.

Recently at work, I was getting a lot of build-report mails in my Inbox (and irritated ofcourse, coz I was not interested in most of them), Why cant we have a RSS feed for the build reports, so that I can check when I want and leave my Inbox unspammed.

My idea of a build-report management is to post the build logs/reports under a Blog.

How to use it:
  • After every build, the log/report is posted in the blog, with an appropriate title
  • The posts can be tagged as Build "Success/Failure","Nightly/Adhoc", UnitTesting "Success/Failure" and more based on your req.
  • People can subscribe to tags to be alerted of what they are looking for.

What do you think?

**************************

Footnote:

Please let me know if -

  • someone thinks its nice and implements it (I never got to implement this idea)
  • you use RSS in any unconventional way

Grease the Gears

How many of you want to enhance the web-site you are visiting? To make it look better for your usage, To remove stuff from the page, To add stuff to the page… You have probably heard/using GreaseMonkey to grant yourself your wish. (For others who haven’t heard about it, GreaseMonkey is a Firefox extension which can run your own javascript on the page with access to the entire dom – which 'can' let you do pretty much what you want.)

With the availability of Google Gears, web-applications can go offline(ofcource only the ones that support Gears)… Is that all? No, you can get more… All you have to do is to Grease the Gears for smoother and better experience.

Here is an example.
Now, Google Reader works with Gears and is available offline... well, not the entire application is offline... The Search feature is gone, when you switch to offline-mode...

Offline-Reader = Online-Reader MINUS Search-feature

Here is a greasemonkey script that enables you to search your data in offline mode. Of course this search may not be as intelligent as Google Search, but it is something.

Offline-Reader PLUS GreaseMonkey ~ Online-Reader


But, this is only the beginning. What synergy can be produced by mixing Google Gears and GreaseMonkey? GreaseMonkey provides a hook to write ‘your’ own javascript code on top of the application, and Google Gears provides a Database to store ‘your’ data (‘your’ means ‘Of you, the Internet user’). A SDK in your browser to customize any website!

You can keep track of information you want as a history in the cache and retrieve them when you visit that site again. What you want to store – is left to your necessity & imagination!!!

If you find any interesting use, do let me know.

***********************************

Footnote:

  • GearsMonkey is a Google project to enable you inject Gears code into applications that do not support Gears! No activities yet, but keep an eye on it.
  • http://userscripts.org/ has a repository of GreaseMonkey userscripts which you can use/contribute
  • GreaseSpot.net is the GreaseMonkey blog site
  • If you want to write your own userscripts, you might also need WebDeveloper and FireBug extenstions for FireFox. Check them out even if you dont want to.
  • ... and yeah, I know the title is cool.

Sunday, October 28, 2007

Preface

After a lot of deliberation, I finally brought myself to start blogging. Here is the preface to my blog.

My interests, on which I will blog -

Computers - I'm a software developer by profession (not a good one thou). My main interest in computers is how they work and how I can make best use of it for my needs. I also tell my friends of common interests about the stuff I get to know. Upon some egging from a few of them, now I will blog about those stuff...

Reading - I enjoy reading - novels, blogs, articles and stuff... so, there might be some posts of such type as well.

Misc - wonder what comes here? check out this interesting site and/or video from google-tech-talk...


*****************

A word about the title of the blog "Summer Lightning". I recognized it immediately as the ideal title for a blog. My exuberance has been a little diminished since by the discovery that I am not the only one who thinks highly of it, already a number of blogs have been published under the same title. Now, I can only express the modest hope that this one will be considered worthy of inclusion in the list of the Hundred Best Blogs Called Summer Lightning.

Cheers,
Krishna