Web Info & Tutorials

April 3rd, 2008

BUT I’M NOT MOVING MY MOUSE!

PPK has detailed another “when a browser vendor codes to IEs bugs… and they actually get around to fixing them” problem.

It appears that IE used to do something strange with onmousemove, and events would fire every X seconds even if you haven’t moved the mouse:

When doing my new mousemove test I found a bug in IE5-7 that I was previously unaware of. When the user moves the mouse over the element, the mousemove event fires many times, as it should. However, when the user stops moving the mouse, IE5-7 continues firing the event every once in a while. This stops only when the mouse leaves the target element entirely.

This is obviously a bug: when the mouse does not move the mousemove event should not fire.

The IE team reacted correctly: the bug has been solved in IE8b1. When the mouse does not move any more the mousemove event stops firing, as it should.

However, this same bug was recently introduced in Safari (Windows) and Opera!

Safari 3.0 and Opera 9.26 support mousemove correctly, but Safari 3.1 and Opera 9.5b have copied the IE bug.

April 3rd, 2008

QGALLERY: PROTOTYPE GALLERY APPLICATION

qGallery

Sebastian Brink has developed a nice looking gallery application called qGallery

It is really simple to use you just have to upload your images in full resolution together with a simple xml file and include the script and a simple div into the webpage. Everything else is done automatically. The gallery is creating every used image on the fly with the help of some php scripts in the background.

It is developed on top of Prototype and a bunch of other libraries.

April 3rd, 2008

JAVASCRIPT, C#, AND EXTSHARP

Colin Ramsay thinks that JavaScript and C# can be scarily similar as he shows an ExtJS example:

JAVASCRIPT:
  1.  
  2. var win = new Ext.Window({
  3.     title: 'Order Viewer', layout: 'border',
  4.     width: 500, height: 500,
  5.     modal: true, resizable: false, closable: false, draggable: false,
  6.     items: [ frm, lst ]
  7. });
  8.  
  9. win.on('render', function() {
  10.     load(5);
  11. });
  12.  
  13. win.show();
  14.  
C#:
  1.  
  2. var win = new Ext.Window{
  3.     Title = "OrderViewer", Layout = Layout.Border,
  4.     Width = 100, Height = 200,
  5.     Modal = true, Resizable = false, Closable = false, Draggable = false,
  6.     Items = new [] { frm, lst }
  7. };
  8.  
  9. win.Render += delegate {
  10.     load(5);
  11. };
  12.  
  13. win.show();
  14.  

This works well for ExtJS since it is written in a style that leads itself to this similarity. Colin also points out ExtSharp, a project that lets you write your Ext application in C#:

I really love Ext but coding in javascript just gives me the chills. So I went out and found a way to use my favorite js library (Ext) and my favorite programming language (C#) at the same time. By using a project called Script# I am able to write C# code and have it converted into javascript, similar to GWT. Building on that, Script# also allows you to code against external APIs, but you need to create the types, methods, properties, etc. for everything in the javascript library. So what I did was write a little console app that parses all of the ExtJS source files extracting out the script comments and writing C# files for each class. The end result is a programmable C# API to access all of the Ext objects and I threw in a couple new things to make life a little easier.

April 3rd, 2008

BROWSER UPDATE: FIREFOX 3B5 AND OPERA MINI 4.1 BETA

We have a couple of browser updates. First, we have Firefox 3 beta 5 which has improved integration with the host system, a better places organizer, and a bump:

Speed improvements to our JavaScript engine as well as profile guided optimizations have resulted in continued improvements in performance. Compared to Firefox 2, web applications like Google Mail and Zoho Office run twice as fast in Firefox 3 Beta 5, and the popular SunSpider test from Apple shows improvements over previous releases.

Opera also released a new browser with their Opera Mini 4.1 beta. The improvements talk about "faster" a lot: performance, finding things faster, and URL completion magic. This latest mobile browser also supports JSR-75:

JSR-75 is a specification for Java applications such as Opera Mini to access device internal storage and functionality within the phone. Some of Opera Mini features like "Save Pages" and "Download/Upload Files" vary on how much JSR-75 that is supported by the phone.