Friday, January 18, 2008

Mouse Buttons - Why Silverlight web development is not traditional?

I have been active on Silverlight forums for a few months now and  most of the developers I see have problems with understanding that Silverlight is not like traditional web development environment. And the approach they have to take frightens them because it is not traditional.  They have fixed a  development mind frame with with HTML/Graphics and Server pages and sometimes it doesn't suit well with the Silverlight architecture. There are some areas of web development that with the introduction of Silverlight architecture get void, and I am set to make points of all of them and discuss the reason. Instead of doing all of them in one post I'll try to post multiple entry concentrating on a single method each time.

Mouse Buttons.

The most basic traditional method that developers gets wrong, Silverlight doesn't support Middle-Mouse button, Right-Mouse button or Double Click and developers have expressed this as crippled functionality or nonsense among other things, But the question they ask why only one mouse button is to an extend valid, and I'll try to shed some light on the reasons.

To answer why, we have to answer why Silverlight? Why not AJAX? What Silverlight brings to the application that AJAX doesn't besides easy of development? I say cross-platform compatibility, but they say AJAX is also cross platform compatible, I say with Right Mouse, or Middle Mouse button it isn't.

Let me explain in more detail, AJAX came into existence with writing clever JavaScript programs and pushing JavaScript to its limits, there are however different approaches for different browses, something that works in IE doesn't work on FireFox and something that works both in IE/FireFox doesn't work on Mac-Safari so the developer building AJAX application have to target particular browsers and write their application, one of the first reasons I was attracted to Silverlight was this cross platform compatibility. Write one application and run them on all.

Ok, but what does this have to do with Mouse buttons? The reason is Mac with its tradition doesn't have more than one mouse button, and this button in Windows terminology is interpreted as Left Mouse button, however in the last few years user have adopted the Mac-Might Mouse which have more than one mouse button, but the traditional Mac have only a single mouse button, so if you create a web application that is cross platform you have be use that all the users irrespective of their platform Mac/ Windows, or browser IE/FF/Safari/Opera.

You would ask what about double click? I say how would you double click on Mobile device? Not all mobile devices that access Internet are touch screen, and even on touch screen its hard to double click, when working on Silverlight you have to think the big picture, not traditional windows method. Microsoft have showed interest for Silverlight on Mobile devices but as yet, no particular announcements have been made. But expect to change that with Silverlight 2.0 RTM (by summer 2008). 

If say Microsoft have incorporated Silverlight with extended mouse functionality, and the developers who doesn't understand this functionality and/or its limits went on to implement such behaviour with some serious business logic, the end user accessing the application who can't access such behaviour due to hardware limitations can't access  such business logic, rendering the application useless.

To wrap it all up, Silverlight doesn't have extended mouse functionality for the same reasons as Adobe Flash doesn't.

14 comments:

Anonymous said...

The problem with this reasoning is that mouse buttons have nothing to do with maintaining cross-compatability. If you are a Mac user (worth your salt) you either have a two button mouse or know that by holding the ctrl button when you click you are in effect right-clicking. It's been this way since even before OSX.

Silverlight to me enables me to build rich applications, but so many of those applications (things you'd typically see as a desktop app) really do beg for right-click context menus, double-clicking, etc. I say this because I'm having to jump through hoops to implement a Silverlight version of a graphical chart comparable if not better than our native desktop version.

Anonymous said...

So, the entirely world cant use their second mouse button in silverlight because of the few mac users have theirs mouses with only one button.

Anonymous said...

Compatability? Yeah, like Microsoft ever cared about it... silverlight must have extended mouse actions, and the developer is the one who should choose to use them or not! And why the hell are all classes sealed anyway??

Anonymous said...

When crossform compability is the goal, it is interesting that you can react on keyboard modifiers like ctrl, windows or apple keys. Ever seen a mobile device with ctrl-key? Or a windows system with apple key?

araon said...

Very nice - easy to follow, simple, and working. Thanks for the knowledge!
More templates easy to download

Jenry said...

That makes no sense!
If you can't righClick, or doubleClick or middleClick, just don't do it! but your plattform should be capable to catch those events anyway!!
That's a really stupid answer...

fundoo said...

Thanks for the information, we will add this story to our blog, as we have a audience in this sector that loves reading like this” web development

javieth said...

This blog is really interesting, I like to see all different kind of bargain or different product by internet. Actually once i was looking for information related with the best investment I found a webside very useful and interesting called costa rica investment opportunities , I think all the information this side introduce is really interesting like this blog.

Invertir en oro said...

hello my friend, i would like to know morea this info.

Invertir en oro said...

Hello, i think that this blog is very good!!!

Inversiones en petroleo said...

Hello, i would like to read more blog like this.

seositeden.blogspot.com said...

Thanks so much for this post, pretty helpful data.

muebles en lleida said...

The author is absolutely right, and there is no question.

Affordable Logo Deisgn said...

I just check out your article the first time I saw the page layout of your blog. But I was greatly amazed on the post you have written.
Stationery Design