When Written: April 2008
I had the pleasure of attending the Microsoft Mix 08 conference in Las Vegas and whilst I have denied claims by friends and family that I had a Microsoft implant fitted because of my excitement at what I saw there, there is no doubt that Microsoft has some very powerful and exciting technologies in development. But as you will read, you will discover that a lot of these are still very much in development and getting them to work for a real word application can be tricky.
[graphic: mix08.tiff caption: All the sessions at Mix08 are available at http://sessions.visitmix.com very much worth a look)
The main push from Microsoft was the latest version of Silverlight which unlike it’s predecessor, is more than just a video player. Version 2 has the capability and the development tools to be a full Rich Internet Application ( RIA). Microsoft Expression Blend, Silverlights’ design tool, is just fantastic for laying out UI components, with visual prompts of not only alignment to other controls on the page but also a visual prompt when two controls are spaced by a pre-set so that with very little effort an application can be built that is pleasant to look at. It is very obvious that designers like Jon Harris, formally of Macromedia and now Senior Product Manager of Expression Suite, have had a lot of input in producing one of the nicest of UI design tools I have seen for a long while. This emphasis on the importance of the design area has also been passed to Visual Studio where the design view of a web project now uses the excellent rendering engine of Expressions Web.
At this point I am going to side-track from Mix08 and mount a favourite soapbox of mine the rendering engine in web design tools. So many of these design tools have their own engine for rendering the HTML to a view that approximates to the view a browser will return. I say approximates because, as we all know, even the major browsers do not get things right, so what chance does a piece of code in a web design tool have? Way back in the early days of the web when the primary browser was Netscape Navigator, they produced an web page editor called Netscape Gold, and as this used the same rendering engine as the browser it was rather good. Then along came IE and spoilt this web design Utopia. This is not a dig at IE or any other browser, it would be great if they could all render a web page the same but currently they don’t. Sure we have standards, but if you look at these they contain phrases like “ User Agents ( sic browsers ) may use any algorithm they wish to do so, and are free to prefer rendering speed over precision” (http://www.w3.org/TR/REC-CSS2/tables.html) so when the standards themselves are open to various interpretations what chance do we have of ending up with a set of browsers from different development teams behaving in the same way? So, if we are to use HTML ( and there are powerful arguments against this, see later in this article) then we need a web development tool that can render in its ‘design view’ as different browsers.
The reason these design tools have their own rendering engines, I am told, is so that they can offer debugging, context sensitive help, and other enhancements. Very useful at times, but wouldn’t it be great to be able to tell the design application to use a different rendering engine so that you can see a truly accurate view of your web page, and not some approximation. I’m not suggesting that we throw away the custom rendering engines that allow debugging and other production enhancements. When I am trying to get some code to work I am often not concerned with how the web page is looking but I do want as much debugging and code hinting as possible to help me. However when I, or our designer is trying to get that piece of text to indent correctly then is it really too much to ask in 2008 that our design tool can display the HTML page as it would appear in one of the major browsers?
The alternative to this… and I will have to move to my other soapbox for this rant, is for all browsers to use a standard core rendering engine which no-one can ‘enhance’. Any enhancements offered by a company or organisation would take the form of extra user tools, browsing aids, navigation and search enhancements, that sort of thing. Wouldn’t that be great, all web pages would display the same and web design would be made simpler? Perhaps? You would still have the problems of different screen and font sizes on users machines, made even more tricky by the increase of portable and TV attached devices. Why don’t we replace HTML with something that would always render correctly, scale correctly if the user wanted large fonts, had built in features for accessibility and provides a multi-platform way displaying both static and dynamic content that looks good?
This last vision is the Microsoft vision for Silverlight and from what I have seen of the example sites currently being built with it, the possibilities are tremendous. For example the American sports channel NBC is planning to use Silverlight in its on-line coverage of the Olympics and the demonstration I saw using the last Olympics as content was extremely impressive with picture in picture, rewind of streaming video content, clickable stats all delivered through a modern user interface. Streaming video over network connections which can vary in speed during the viewing period has always been a problem. One very neat feature of Silverlight is its ability to monitor the speed of your network connection and to adjust the quality of the content delivered accordingly. This is not done through offering the user a series of links to select what speed their internet connection is.
After all if you are using a public internet connection, how do you know without doing a test via speedtest.com or similar? As the presenter quite rightly pointed out, any web site that asks what bandwidth you have fails his ‘mother’ test. It is worth bearing in mind this when you are developing web application, some of your users may be inexperienced, and when I say inexperienced I don’t necessarily mean ‘Sliver Surfers’ a term which I find particularly derogatory when most of the people who invented the internet and the web would qualify under this heading as well as yours truly. Lenny Henry recently did a TV show showing utube video clips and made several jokes about Silver Surfers being slow and simple, well Mr Henry if all us Silver Surfers are senile daft old twits, how about you take over this column, gibber gibber?
Of course an awful lot of this technology is very new and coding for it is not always easy currently, but this will improve. But is it worth it? Why not stick with the old ways of doing things or perhaps use Flash? I may be wrong but I really think that Silverlight is a technology worth watching and spending some time examining the tools to develop applications with it. You note that I said applications there and not web applications. That is because with Silverlight you can develop both web and desktop applications and that is part of its strength. Several of the attendees at Mix08 that I spoke to were from companies who had desktop apps and were looking to improve the look of their traditional windows based desktop application.
So Silverlight will do video , animation and user interfaces. Any thing else? Well yes. Those purveyors of splendid hamburgers and such things, Hard Rock Café, showed an amazing demonstration. Apparently they have a very large collection of Rock memorabilia and decided to use a particular feature of Silverlight to display some of it on the web. They produced a very large montage image of over two billion pixels and used a feature of Silverlight called ‘Deep Zoom’ to display this on the web allowing the user to zoom in and out on various areas so you could go quickly and seamlessly go from a view of the outside of a café to the fret of one of Bo Diddley’s guitars. it was an impressive demonstration and I will be showing you how to do this in the next feature, I ran out of time for this one! (http://memorabilia.hardrock.com)
2 billion pixels displayed with full zooming and scrolling with Silverlight ‘Deep Zoom’ capability
The way Deep Zoom works is to cut large images up into smaller tiles and to serve the correct selection of tiles to the browser. When one of Microsoft’s aims was to make the Silverlight player as small as possible, one wonders why add such a seemingly esoteric facility in it? Until, that is, you remember that this is how mapping software works. When you look at an aerial photograph on Google maps of a part of the country, obviously Google maps doesn’t download the whole photo of the UK to your browser, it just selects the set of image tiles that make up the final image that you see. In fact the first internet work I did was with a company who developed just such a system. So Silverlight will do this ‘out of the box’. Well sort of. You currently need to hand code quite a lot to get the navigation controls working to enable users to zoom in and out and move around. But it does make you wonder what future plans are lined up for this feature? When ‘playing’ with new technology one of the most frustrating things is knowing that such things can be done but the development tools are not yet quite up to helping you.
This combined with every search on the web coming up with ways of coding for previous versions which either no longer work or are now totally unnecessary ‘fixes’ for previous faults. This can make building demo web applications somewhat tiresome. For instance I wanted to show someone how a Silverlight version of a simple web application could be built. This application talked to a database via ADO.NET. However, the Blend 2.5 design tool for Silverlight only seems to support Webservices or CLR data sources so a 5 min demo became a whole bunch of code. This sort of thing is to be expected but it does drive home the point that Silverlight 2 still has some way to go before it is as easy as some of the other development platforms out there. When developing with Silverlight, Expressions Blend is the best tool for the actual design the app and its UI and whilst you can also code in Blend, Visual Studio is a better option.
The two tools use exactly the same project files and so switching between them is a breeze and you will prompted to reload any pages that have changed as you move between the two applications. Visual Studio will give you all the debugging you want but take note: you will have to use the Standard edition which costs £ 209.97 inc VAT ( Amazon.co.uk ) as the free Express version does not currently support Silverlight although apparently this is planned to change according to Mark Quirk at Microsoft. Whilst Silverlight applications will run on both Windows and OSX, there are no development tools planed by Microsoft for the Mac. The current solution is to supply Mac users with a copy of Parallels and Vista to run Blend under.
This of course will only work with Intel based Macs and cannot really be considered a solution. I am sure that this lack of OSX design tools could be a major stumbling block to the adoption of Silverlight over Flash in the web design world. Microsoft says that as the Silverlight file format of XAML is Open Source then a third party could develop a Mac based design tool if they wanted to. This does seem a slightly strange attitude, as only the other year Microsoft were holding a series of shows strictly with the aim of encouraging the design community and these people are traditionally not just Mac users but Mac evangelists. To expect them to use a windows tool running on Vista with all the differences in the way the UIs work between Windows and Mac applications is a little naive I think. However at least Microsoft have enabled a way of debugging Silverlight applications when they are running on a Mac client so at least it is possible to support Mac users in some form. I’m sure that this year will be an interesting time for Silverlight.
As to whether many commercial web sites adopt it or go the Ajax route to RIA development we shall have to wait and see.
Article by: Mark Newton
Published in: Mark Newton