Archive for category Web 2.0

Conwitter – Twitter Google Chrome Extension

We have released a twitter extension for google chrome. Conwitter is still in alpha stage, however it’s currently usable and available via google chrome extension gallery.

Compared to other twitter clients, conwitter provides two main features :

  • Realtime Updates – You can enable twitter streaming API option in conwitter. This will ask twitter servers to push new tweets the client rather than pulling them in a time interval. In other words, new tweets from your friends will appear instantly as soon as those are published.
  • Conversation Style – Can you remember how many times you had to click on in-reply-to link to see what the tweet is about? We are hoping to solve that problem by introducing a new interface where all related tweets are displayed as one conversation. When new tweets arrive, it’ll be appended to the conversation and marked as new. Look at the screenshots below

Tags: , , , , , ,

Browser Wars 2.1

We all know the historical story of first browser war between Netscape and Microsoft. Microsoft ended it by crushing Netscape into pieces, for the time being. Microsoft controlled over 95% of browser market. Netscape had nothing else to do, but to back off – but they took a shoot on their way back to home : They open sourced their code.

A small group of people, also known as hackers, formed a small foundation called “mozilla” and started hacking. As a result, they released “Firefox” in 2004. That was the beginning of second browser wars. Although Firefox mainly started it, It wasn’t a two player game this time. Apple was the other player. It was not easy to fight from the scratch. So, Apple forked the KHTML rendering engine and create Webkit project and the Safari browser. This war bought the life to many amazing technologies – Web 2.0 has emerged during the war. Yet, the war is not finished yet. Firefox is catching up with the market share with it’s newest release, Firefox 3.0 forming Guinness records.

Upto this point, the war was about new features, and the memory usage of browsers. Then, in September of 2008(yes, this month), Google turned the flow – they released one of their secret projects, Chrome. Like Safari, chrome is also built on Webkit, but Google has rewritten the javascript engine from scratch. This new engine, V8 is several times faster than the current script engines used in other browsers. Eventhough, Google released Chrome first, highlighting V8 and it’s speed, other projects have been also working on their own javascript optimizations. This is the beginning of Browser Wars 2.1.

So, this weekend I did some test runs on those engines. Namely, SpiderMonkey used in Firefox 3.0, TraceMonkey used in Firefox 3.1 and SquirrelFish Extreme used in Webkit. Unfortunately, Google hasn’t released the Chrome for linux yet – so, I wasn’t’ able to run accurate tests on V8 – but I’ve used a VM just to checkout the results anyway.

There are several javascript benchmarking tools available such as Sunspider, Dromaeo, and V8 benchmarks. If you do a little search on the internet, you’ll find tons of sites with benchmarking new engines using those. So, I decided to write few simple javascript functions based on commonly used techniques and benchmark them. These tests are further away from perfect, but it’ll give a rough idea.

Following graphs show how many of times the given function can be executed within one second. Each test has been run for 10 times and the mean is taken – Bigger is better.

Note : V8 tests have been run under a VM, you should technically ignore them.

Dom Create

function dom_create() {
	for ( var i = 0; i < 100; i++) {
		var d = document.createElement('div');
		d.innerHTML = "whatevertest";
	}
}

Dom Append

I wanted to append the ul to document but firefox(both 3 and 3.1) crashed.

function dom_append() {
	for ( var i = 0; i < 100; i++) {
		var x = document.createElement('ul');
		x.appendChild(document.createElement('li'));
	}
}

Update Inner HTML

Note : only function is measured, ‘var garbage = ….’ line is only called once before starting the benchmark.

var garbage = document.getElementById('garbage');

function dom_inner_html() {
	for ( var i = 0; i < 100; i++) {
		garbage.innerHTML = "<div>this should be some large string</div>
<p>with html elements</p><ul><l>>this</li><li>is</li>
<li>a</li><li>list</li> </ul>" + i;
	}
}

Get Element by ID

function get_element() {
	for ( var i = 0; i < 1000; i++) {
		var d = document.getElementById('garbage');
	}
}

Conclusion

(Chrome is not considered in this section, you can give it the benifit of doubt and come to your own conclusions)

As you can see, SquirrelFish Extreme has got an extreme boost over almost everything, except innerHTML updates. Tracemonkey wins the innerHTML updates from unbelievable margin. Both dom based techniques and innerHTML updates are used heavily in ajax based applications. For the time beign, SquirrelFish Extreme seems to have won the overall speed race.

However, browser is not just javascript and rendering. One of the strong features of Firefox is it’s huge number of extensions and the XUL interface which makes the life easier for extension developers. When you combine that with the current market share of Firefox, Firefox will rule the web for next few years.

Script

You can get the html file I used to benchmark from here. The benchmarking functions are taken from John Resig’s benchmarking quality blog post.

Tags: , , , ,

Development of AcSO – From A to Z

Last month we got selected… oh! In case you don’t know about that, just read my previous post. “And Then” the next phrase – Development.

AcSO is basically academic information sharing site, which will be run by the users (Web 2.0 concept). So, it has some amazing features, but no so hard to code. However, since we have four fellas in the team and we want this built well, we need to come up with a nice site structure.

There was an ASP.NET built in login system. It’s very easier to use. But there were some problems, by default it uses some kind of weird database and replacing it is not so easy. So, we argued about two days whether we shall use it or not and finally decided to code our own one which only took about 15 mins :P

First what we decided was to use portlets; basically, web parts. After developing sevaral portlets, we again reran an evaluation and decided that we don’t need portlets.

Then we had an exam paper and after all we have 3 and half days to build the application. So, we just started coding raw pages, and we used some base classes written for the web part application and here is the final result : http://team4366.webdev07.imaginecup.com/

There was one big problem when we are developing the site, “version controlling”. Keshan and Me replaced each others codes several times. So, after all we used manual version controlling mechanism. Before updating code, I always took a backup of the current site. Believe me, I have more than 300 MB in backup files. But, it along didn’t solve the problem. So, we started to working at shifts ;-) .

Since these pages have put together in three sleepless days, there are lots of features missing. And we also didn’t have much time to put the validations, etc. Basically, we haven’t fine tuned the site. But anyway we are happy with the current progress of the site and if we go to the next stage, we should start development at least about a month before the deadline.

Tags: ,

P2P Minds

We have just finished a small project – p2p mind.. We’ll probably release the code as GPL, even though it might not be useful for many of you ;-)

check this out : http://www.sandaru1.com/p2pmind/

Tags:

Web 2.0 is not AJAX

AJAX was becoming popular for last few years. With the word ‘AJAX’ another simple word came into play ‘Web 2.0’. Some of us have been thinking that Web 2.0 is just using AJAX in a site which is not so true. AJAX may be a key element of web 2.0 but not the basic concept. The basic idea of web 2.0 is “the content of the site is decided by its users”. AJAX and CSS is used to create a simple interface. With the use of AJAX, a user can do many things without refreshing the same page like a desktop application.

As you all know quite good examples (best known as web 2.0 winners) for web 2.0 are digg, flickr, del.icio.us, youtube. These sites are really popular, have a great amount of users everyday, and new content arrives in each minute. Of course the secrete is web 2.0, the content is decided by the users.

Tags: ,

Get Adobe Flash playerPlugin by wpburn.com wordpress themes