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.

Wednesday, January 16, 2008

Future of XBAP

Back at Mix'07 when I first heard about XBAP I thought it could prove very handy in coming years and I was expecting to see many applications in coming months build on XBAP, but the last time I had a healthy discussion about XBAP developers was in Nov'07, well that was about 2 months ago, as it happens I had that discussion just before we heard about Silverlight 2.0, so why is no one interested in XBAP anymore?

XBAP only came to existence because Silverlight (at the time 1.1 Alpha)  didn't provide the basic user controls, binding options, and many restrictions on Silverlight usage with assets and/or web services, Silverlight applications mostly lack the infrastructure to use .NET framework so the only option was XBAP.

XBAP was simple and neat idea build on WPF but when it come to universality, it lacked cross platform compatibility over Mac/Linux. But when Silverlight 2.0 was announced with user controls, binding, grids and to lift many restrictions like cross domain calls, and providing support for web services methods like SOAP/REST, the idea of developing XBAP applications just began to fade away.

So with Silverlight 2.0 Beta 1 to be released in next 6 weeks what is the future of XBAP? Its not a simple question and personally I am a bit optimist and would love to say good byes to XBAP but ever since Mix 07 Microsoft has disappointed me again and again with Silverlight, I am hoping the Mix 08 will change all that, but I am sure that after a few months after Silverlight 2.0 is released developers might again start to talk about XBAP but this time for some other features that Silverlight might lack mostly with 3D or networking supports like sockets or VOIP.

After Mix08 and Silverlight 2.0 Beta 1 is released I'll try to post the features that Silverlight 2.0 lacks and in what situations would XBAP could be used, if at all. Please stay tuned.

Sunday, January 6, 2008

Silverlight News at CES 2008

Bill Gates presented his last keynote at CES 2008 today at Las Vegas, and since Microsoft have announced many products at CES in the last few years including XBOX 360 and Microsoft Vista I was hoping against hope that we might get few announcements for Silverlight.

But disappointedly no, I had asked Scott Guthrie earlier this week about the Silverlight 2.0 tutorials he had promised back in Nov 2007, he seems to be excited about it and said that he might start it in next couple of weeks. It got my hopes up that we  might see early release the Beta before Mix 08 (which was very unlikely).

Anyway, there were actually no major announcements from Microsoft just a preview of what we might expect at Mix '08 later in March. But Microsoft have announced NBC's plan to host video coverage for Beijing Olympics starting 08-08-2008, and NBC will be using Microsoft Silverlight for the video coverage.

This is not such a big news but by August, the user adoptability of Silverlight will be much higher and Microsoft will be pushing to release Silverlight 2.0 Final by then.