Showing posts with label muziboo. Show all posts
Showing posts with label muziboo. Show all posts

Friday, July 4, 2008

The Screenshot !


There it is!!

The Muziboo App!!

I just submitted it for the Orkut team to look through...

Should be out for public consumption in about a week !

Feels satisfied...

Tuesday, July 1, 2008

Compatibility

So I make the whole App... everything is working well and good and then suddenly when I decide to check it on Internet Explorer 7, nothing's coming.

Oh no... where did I go wrong??

Luckily, Mozilla Firefox allows for a handy debug tool for JavaScript Programmers called FireBug. Internet Explorer on the other hand sucks cos its so developer unfriendly. After a lot of trouble I found something called DebugBar which was supposed to help me debug... but all it did was showed me errors in a more flamboyant way with no information whatsoever about its cause.
“Object doesn't support this property or method”

INTERNET EXPLORER SUCKS !!!

By doing a lot of try-catch, I finally zeroed down to the cause of the error.
(What I had been doing was, I had used a XSPF(XML Shareable Playlist Format) JSPF parser written by Chris Anderson (which he had put under GPL V3) which actually converted a XML to JSON which i then used in my App.) The line that caused the error was the very same line in which I did the parsing thing. Now what was i going to do?

Prateek came to the rescue. He suggested using XPath to get data from the XSPF Playlist("After all its nothing bu XML"). Only that I did not know how it was used.

Google refered me to w3schools.com.

Just when I started to get the hang of XPath, I decided to check out its examples. w3schools has those innovative Tryit Editor which lets you edit the examples and see the results alongside. Well I had not even touched the examples. They just wouldnt show results that w3schools claimed it would do.

I decided to copy-paste the examples and try it myself... no result. I tried it on IE7 ... there it was XPath at work... But not working in Firefox 3... generally its always the other way round. What was happening... things working on Internet Explorer 7 not Firefox...

FIREFOX NEVER SUCKED !!!

Even Firebug turned me down. Just the good ol' Error Console with a huge error the gist of which was :
"Node cannot be used in a document other than the one in which it was created"

A thread in a googlegroup said that that was due to a security fix in Firefox 3 and then gave some links that apperently had the solution to my problem... but sadly I could not make any head or tail out of it.

Prateek insisted that we realease Muziboo App v1.0 with a Flash Widget doing all the parsing and playing... but I was adament... cummon... all this hard work just to see a worthless Flash Widget take away all the glory. I'd rather parse the playlist myself... but that was kinda tough.

And then he told I should write a Parser myself! What am I ? JavaScript Coder Of the Year or Something??(I could parse the playlist to get what I wanted, but to make a parser that would parse any playlist, work on any browser was asking a lot out of me)

And in all the quarreling I had an idea. I had already written enough XPath to parse the playlist for IE7 only the error was on Firefox 3 (only?? Its already so popular, its on the verge of a World Record).

So what I could do was I could check which browser was running, If I was Internet Explorer I parsed it myself otherwise I did it the Chris Anderson way...

P.S. We are going to apply for submission of the App tomorrow night. Only some CSS alignment issues to me taken care of which should be done with by then.



Friday, June 20, 2008

OpenSocialite

And then I decided I wont be Orkuting again.

But you know how it is. We cant just suddenly let go of something. Especially if that something is a Social Networking Website like Orkut, and especially when you have 440 odd Friends, most of 'Whom you do Know'.

I tried tricks, I changed my pic so that no one would know that was me.. even my name on the profile. I stopped being 'online' if you get what i mean. I stopped replying to random 'Hi's and 'Ssup's. 'Course I had Gtalk, and for the sad few who did not have Gtalk or don't know how to use it, Sad Luck.

Still I'd end up in there once in a fortnight, but that was improvement.

In the middle of all the commotion, Orkut released the 'Apps' feature, I thought maybe it was trying to get level with Facebook(which i think is better that Orkut, just that the Heart is where Friends are).

So when Prateek Dayal of Muziboo said that I had to make an Orkut app, I was just as apprehensive as him.

Ingredients:

Had to request for a Orkut sandbox account first. That took some time. Started out with the Opensocial example, and guess what ... It Worked!! So I changed it so that I could send people G.P.L.'s( and I don't mean the GNU General Public License )instead of peanuts and hazelnuts that the app allowed me to send.

Then I Got started with the Muziboo app.

The first step was easy (Oh yaa ??!!). I had to fetch data from a XSPF (funny how that's pronounced, 'spiff') playlist and display it in the app. Me being ignorant and impatient as always started out wrong with using the AJAX XMLHttpRequst (oh, I love the thing) and failed miserably, again and again before realizing that it did not allow cross site requests.

Prateek pointed out that I should be reading the Opensocial specification closely, and .... Voila, the thing was working. I had made my first Orkut (useless but good for a start) app.

Way to go !!!