Category Archives: silverlight

A business web site implemented entirely in Silverlight

Ever wondered what the web would look like if Silverlight or Flash were used for everything? The other day I came across a business site implemented entirely in Silverlight – well, apart from the forums, which seem to be HTML and JavaScript. ForefrontSecurity.org is a third-party resource site for Microsoft’s firewall and server security products. It is mostly documents and videos.

image

On the plus side, the site looks good, provided you can run Silverlight; and given the target readership that’s not too much of a stretch in this instance. Playing the embedded screencasts is very smooth, and they feel seamlessly integrated with the site, more so than with HTML plus a video plug-in.

That said, I found the site infuriating. Without thinking, I tried to scroll a document using the mouse wheel; nothing happened. The page up and down keys do not work either. Copying text works with Ctrl-C, but if you select and right-click, you just get the Silverlight “about” menu. I also found that the graphic effects – screens typically fade in as they change – made the site seem slow. Some things, like hyperlinks in full-screen mode, did not work as expected.

An interesting experiment; but for a site like this which is mainly about finding and reading documents, its hard to see a good reason not to use HTML.

Microsoft – make up your mind about Moonlight

I’ve been trying out Microsoft’s Office Web Apps, as provided for the release version of SharePoint 2010. The cross platform story is uneven, whether across Mac/Windows/Linux, or across different browsers, or even across different versions of Windows and Office. So far it does mostly work though, even if there are problems with certain tasks like printing or opening an online document in a desktop application.

The biggest problem I’ve had is on Linux. Supposedly Firefox 3.5 on Linux is supported. I ran up Ubuntu and Firefox 3.5, and went to look at a document in Word Web App. When I selected the document, Firefox quit. Every time.

After checking that Firefox was up-to-date it occurred to me that the problem might be related to Moonlight, the Linux implementation of Silverlight done by the Mono team. I disabled it. Suddenly, everything worked, even Edit in browser.

Moonlight is not just an open source project like the original Mono. It has a certain amount of official blessing from Microsoft. Here’s what VP Scott Guthrie said back in September 2007:

Over the last few months we’ve been working to enable Silverlight support on Linux, and today we are announcing a formal partnership with Novell to provide a great Silverlight implementation for Linux.  Microsoft will be delivering Silverlight Media Codecs for Linux, and Novell will be building a 100% compatible Silverlight runtime implementation called “Moonlight”.

Moonlight will run on all Linux distributions, and support FireFox, Konqueror, and Opera browsers.  Moonlight will support both the JavaScript programming model available in Silverlight 1.0, as well as the full .NET programming model we will enable in Silverlight 1.1.

You would think therefore that Microsoft would test the Firefox/Linux/Moonlight combination with its shiny new Office Web Apps. Apparently not. Here’s what the user experience is like for Office Word App. I figured that the solution might be to upgrade Moonlight to the latest version, so I did, installing what is now called Novell Moonlight 2.2. I went back to Word Web App. Firefox no longer crashes, but I now get a blank area where the Word document should be shown, and an error if I resize the browser window:

Now let’s see what happens if I disable Moonlight:

Everything is fine – except now there is a banner inviting me to “Improve my experience” by installing Silverlight. If I follow the link I eventually get back to the same Moonlight install that I have just enabled, which would actually break rather than improve Word Web App.

It is obvious that if users have to disable Moonlight to work with Office Web Apps, this will not help Moonlight adoption on Linux.

Office Web Apps are new and I’d hope this is something that Microsoft, Novell and the Mono team can soon fix between them. One reason for highlighting it now is the hope that something could be done before the full roll-out of Office and SharePoint 2010 on May 12th.

The real point though is what this says about the extent to which Microsoft cares about Moonlight and Linux users, and how much or little communication takes place between Microsoft and Novell. Silverlight isn’t required for Office Web Apps – as you can see from the above – but it is used to good effect where available, and this Office release is therefore an important release for Silverlight as well.

Microsoft should make up its mind. Is Novell really a trusted partner for Silverlight on Linux? Or a third-party product that has to take its chances?

Microsoft Expression Blend is too hard to learn

Expression Blend is the design tool for Windows Presentation Foundation (WPF) and Silverlight, and thus a key tool for building applications for the current generation of Microsoft’s platform. How good is it? There is a shortage of in-depth reviews, if my quick Google search is anything to go by, though there are plenty of quick write-ups saying that it is not as good as Adobe Flash. Blend got a bit of attention following the 2009 Mix conference thanks to SketchFlow, the prototyping feature built into Blend 3, and which has been well received.

One reason for Blend’s relatively low profile is that it is aimed at designers, whereas Microsoft’s community is more developer-focused. WPF developers can avoid Blend to a large extent, by using the designer built into Visual Studio, which is fine for laying out typical business applications. Now with Visual Studio 2010 the same is true for Silverlight. Another option is to write your own XAML code, which works for laying out controls though it is inconceivable for drawings. XAML is verbose

It is just as well you can avoid it, because although Blend is very capable, it is not easy to learn. I’m guessing there are quite a few developers who have opened it up, clicked around a bit, and retreated gratefully back to Visual Studio. This was a problem for Adobe Flash Professional as well, and one of the reasons for the creation of Flex and Flex Builder, a code-centric IDE for the Flash runtime.

You can argue that a design tool does not need to be easy for developers to use; it needs to be good enough for designers to create great designs. That’s true; but the developer/design divide is not a absolute one, and ideally Blend should be something a developer can dip into easily, to create or enhance a simple layout, without too much stress.

Maybe some developers can; but I have not found Blend particularly intuitive. The user interface is busy, and finding what you want or getting focus on the right object can be a challenge.

As evidence of this, take a look at Adam Kinney’s Through the Eyes of Expression Blend tutorial, which is among the best I have found. Try lesson 9, Styling and working with design-time data. Then ask yourself how easy it would be to discover the way to do this without the step-by-step instructions. Would you have known to right-click the StackPanel and choose Change Layout Type > Grid? What about step 8, right-clicking the ListBox, and selecting Edit Additional Templates > Edit Layout of Items (Items Panel) > Create Empty?

image  

And notice how in step 9 you have to click the “small grey square next to the Source property”, that’s the one called Advanced Options:

image

Overall it is a nice tutorial, but you might need an evening or two with a couple of fat books, one on XAML and one on Blend itself (if you can find a good one), in order to understand the features you have have been using.

It is probably worth it, if you intend to work with Silverlight or WPF. Blend has one great advantage over Flash Professional: it authors XAML, and you can open it up in Visual Studio and continue working on it there. Microsoft has no need for something like Adobe Catalyst to bridge the XML/Designer divide.

Still, Microsoft had a clean slate with Blend, which is only a few years old, and it is a shame it could not come up with something a bit more user-friendly.

The other implication is that the new visual designer in Visual Studio 2010 makes Silverlight applications a great deal easier to create. You can Blend if you want to; but the Visual Studio effort is far more approachable.

How do you find Blend? I’d be interested in other perspectives.

Silverlight (and AIR) for MeeGo Linux coming in October?

Back in September 2009, Intel and Microsoft announced an official port of Silverlight for Linux, or at least for what was then Intel’s Moblin project, a Linux distribution tailored for netbooks. It was surprising to learn that this would be an official port using Microsoft’s code, as opposed to something based on Moonlight, the open source and also somewhat officially blessed version of Silverlight for Linux.

Since then I have been watching for more news about this Silverlight port, but heard nothing. Then in February Moblin merged with Nokia’s Maemo to become MeeGo. What next for the Silverlight port?

Earlier this week I met Intel’s Uli Dumschat at the company’s software conference in Barcelona. He spoke on Intel’s software development products for Atom-powered devices such as those running MeeGo. I asked him about Silverlight for MeeGo and he knew nothing about it.

It seems I was at the wrong conference. Today I spotted this post from Charlene Zvolanek at Intel’s Developer Forum in Beijing:

In May, the 1.0 version will be released, and with 1.1 coming out in October, there will be support for Silverlight, Java, and Air. Developers can write native or runtime apps that can be Java-based, Web-based, Silverlight-based, or Air-based. Even though it’s open source, Intel has been working closely with Microsoft to make sure that MeeGo and Windows are friends.

I also watched the keynote from Intel’s Renee James, who said that MeeGo devices are expected in the “second half of this year”, though I imagine they will be 1.0 devices – who knows, maybe 1.1 will be an upgrade option later.

So Silverlight on MeeGo now has a date. Is this Silverlight 4.0? Will it run out of browser? Access to local resources? Does this date apply to MeeGo Smartphones as well as netbooks? All good questions, about which I know nothing. Watch this space.

Silverlight 4 vs Silverlight 3: a little bit faster?

Microsoft’s Scott Guthrie spoke of “twice as fast performance” in the newly-released Silverlight 4, thanks to a new just-in-time compiler.

Performance is a hard thing to nail down. Maybe he meant that compilation is twice as fast? I’m not sure; but I tried a couple of quick tests.

First, I looked at my Primes test. Version 3 running in Windows Vista took around 0.40 seconds (the exact figure varies on each run, thanks to background processes or other factors). I then upgraded to version 4.0. No significant difference, on average over several runs. I used Vista because I’d already upgraded my Windows 7 install.

Next I tried Bubblemark. I maxed it out at 128 bubbles. On Vista with Silverlight 3 I got about 240 fps; on the same machine with Silverlight 4 about 260fps; about 8%.

image

Next I tried on an Apple Mac. My Mac Mini is less powerful, though not that bad, an Intel 1.83 Ghz Core Duo. On the Prime test I got 0.54 secs before, and 0.50 secs after the upgrade to 4.0, about 7.5% improvement. On Bubblemark, it was only 24 fps before and after.

I guess the vast difference in graphics performance is also interesting. It is not just Mac vs Windows; the Nvidia GeForce 6800 on the PC is more powerful than whatever is in the Mac Mini.

If anyone can tell me in what respect version 4.0 is twice as fast, I’d be grateful.

Update: prompted by the comment from David Heffernan below, I also tried the Encog Silverlight Benchmark. I used an older core duo laptop, since I am running out of machines to upgrade. I ran the test twice before upgrading, and twice after. Lower is better:

Silverlight 3.0: 22.0

Silverlight 4.0: 12.7

That’s about 42% better, where “twice as fast” would be 50% better, much closer to Guthrie’s claim. I guess it depends what you measure.

Silverlight 4.0 released to the web; tools still not final

Microsoft released the Silverlight 4.0 runtime yesterday. Developers can also download the Silverlight 4 Tools; but they are not yet done:

Note that this is a second Release Candidate (RC2) for the tools; the final release will be announced in the coming weeks.

Although it is not stated explicitly, I assume it is fine to use these tools for production work.

Another product needed for Silverlight development but still not final is Expression Blend 4.0. This is the designer-focused IDE for Silverlight and Windows Presentation Foundation. Microsoft has made the release candidate available, but it looks as if the final version will be even later than that for Silverlight 4 Tools.

Disappointing in the context of the launch of Visual Studio 2010; but bear in mind that Silverlight has been developed remarkably fast overall. There are huge new features in version 4, which was first announced at the PDC last November; and that followed only a few months after the release of version 3 last summer.

Why all this energy behind Silverlight? It’s partly Adobe Flash catch-up, I guess, with Silverlight 4 competing more closely with Adobe AIR; and partly a realisation that Silverlight can be the unifying technology that brings together web and client, mobile and desktop for Microsoft. It’s a patchy story of course – not only is the appearance of Silverlight on Apple iPhone or iPad vanishingly unlikely, but more worrying for Microsoft, I hear few people even asking for it.

Even so, Silverlight 4.0 plus Visual Studio 2010 is a capable platform; it will be interesting to see how well it is taken up by developers. If version 4.0 is still not enough to drive mainstream adoption, then I doubt whether any version will do it.

That also raises the question: how can we measure Silverlight take-up? The riastats charts tell us about browser deployment, but while that is important, it only tells us how many have hit some Silverlight content and allowed the plug-in to install. I look at things like activity in the Silverlight forums:

Our forums have 217,426 threads and 247,562 posts, contributed by 77,034 members from around the world. In the past day, we had 108 new threads, 529 new posts, and 70 new users.

it says currently – substantial, but not yet indicative of a major platform shift. Or job stats – 309 UK vacancies right now, according to itjobswatch, putting it behind WPF at 662 vacancies and Adobe Flash at 740. C# on the other hand has 5349; Java 6023.

Windows Phone 7 developer story unveiled at Mix10

I’m in Las Vegas for Microsoft’s Mix10 conference, where the developer story for Windows Phone 7 series is being unveiled. According to the press release, the tooling for Windows Phone 7 looks like this:

  • Visual Studio 2010 Express for Windows Phone (free)
  • Windows Phone 7 Series add-in for Visual Studio 2010 RC
  • XNA Game Studio 4.0
  • Emulator
  • Expression Blend for Win Phone CTP

Essentially, you are meant to use XNA for games on the device, and Silverlight for other kinds of application.

Another part of the announcement describes new services for developers – Microsoft Location Service to provide location information, and a notification service to “push information to the phone, regardless of whether or not an application is running”.

Applications will be marketed through a new Windows Phone Marketplace.

I’ll report more details as they emerge, here and on The Register.

Update: Microsoft has added that Expression Blend 4.0, for Silverlight 4.0 support, will be a free upgrade from Expression Blend 3.0.

Silverlight 4.0 RC, Expression Blend 4.0 beta, VS 2010 add-in available for download here: http://silverlight.net/getstarted/silverlight-4-beta/ 

The MSDN documentation for Windows Phone 7 is here: http://msdn.microsoft.com/en-us/library/ff402531(VS.92).aspx

Windows Phone 7 incompatibility may drive developers elsewhere

Microsoft’s Charlie Kindel has blogged about the Windows Phone 7 development platform.

As widely leaked, the new mobile device supports Silverlight and XNA; Kindel also mentions .NET, but since both Silverlight and XNA are .NET platforms, that might not mean anything additional.

The big story is about compatibility:

To deliver what developers expect in the developer platform we’ve had to change how phone apps were written. One result of this is previous Windows mobile applications will not run on Windows Phone 7 Series.

This puts Microsoft in an awkward position. Support for custom business apps has been one of the better aspects of Windows Mobile. What Microsoft should do is to have some way of continuing to run those old apps on the new devices. Instead, Kindel adds:

To be clear, we will continue to work with our partners to deliver new devices based on Windows Mobile 6.5 and will support those products for many years to come, so it’s not as though one line ends as soon as the other begins.

I would not take much account of this. No doubt there will some devices, but demand for Windows Mobile will dive through the floor (if it has not already) once Phone 7 is available, making it an unattractive proposition for hardware partners.

The danger for Microsoft is that after this let-down, those with existing Windows Mobile apps that are now forced to choose a new development platform might choose one from a competitor.

The mitigation is that apps which use the Compact Framework will likely be easier to port to Windows Phone 7, because the language is the same. Native code apps are a different matter. Of course it will be technically possible to write native code apps for Windows Phone 7, but probably locked down and restricted to special cases, such as perhaps the Adobe Flash runtime (I am speculating here).

PS – I see that developer Thomas Amberg has articulated exactly these concerns in a comment to Kindel’s post:

Platform continuity was the single most important feature of Windows Mobile. Being able to run code from 2003 on a current phone is more important to our customers than a fancy UI (which Microsoft seems not able to get right anyway). Further, the ability to access hardware specific APIs through P/Invoke has been vital in many of our projects (e.g. to use Bluetooth in the early days). Those advantages have now gone. You just rendered useless years of development work and many thousands of lines of code.

"we will continue to work with our partners to deliver new devices based on Windows Mobile 6.5 and will support those products for many years to come"

You will, I bet. But which device manufacturer will produce such "dead-end" devices?

Time to switch to another mobile OS.

Flash 10.1 mobile roadmap confusion, Windows phone support far off

When is the right moment to buy a mobile phone? Usually the answer is not quite yet; and that seems to the case if you want to be sure of support for Flash Player 10.1, the first full version of the runtime to run on mobile devices. Adobe recently struck off support for Windows Mobile in its entirety. Adobe’s Antonio Flores said on the company’s forums:

As for WinMo, we have made the tough decision to defer support for that platform until WinMo7.  This is due to the fact that WinMo6.5 does not support some of the critical APIs that we need.

“Defer support” is not straight talking. Windows Phone 7 is by all accounts very different from Windows Mobile and application compatibility is in question. In addition, the indications so far are that Windows Phone 7 primarily targets consumers in its first release, suggesting that Windows Mobile devices may continue in parallel for a while, to support business applications built for the platform. It is disappointing that Adobe has abandoned its previously announced support; and the story about critical APIs looks suspect, bearing in mind that Flash 10.1 on Windows Mobile demos have already been shown.

As for Flash on Windows Phone 7, that too looks some way off. Microsoft says it is not opposed to Flash, but that it will not feature in the first release.

There may also be politics here. Microsoft Silverlight competes with Flash, and it looks as if Silverlight is to some extent the development platform for Windows Phone 7. While Flash on Windows Phone 7 would be a selling point for the device, I doubt Microsoft likes the idea of developers choosing Adobe’s platform instead of Silverlight. Equally, I doubt it would break Adobe’s heart if Windows Phone 7 wasn’t much of a success, and if lack of Flash puts off customers, that cannot be helped.

In other words, both companies may want to make haste slowly when it comes to Flash on Windows Phone 7.

When it talks about Apple devices, Adobe is the even-handed runtime vendor doing everything it can to make its platform ubiquitous. However, the more it succeeds in its aim, the more power it has when it comes to less favoured platforms. This is a problem inherent to a platform where all the implementations come from a single vendor.

Fragmentation and the RIA wars: Flash is the least bad solution

The latest salvo in the Adobe Flash wars comes from the Free Software Foundation, in an open letter to Google:

Just think what you can achieve by releasing the VP8 codec under an irrevocable royalty-free license and pushing it out to users on YouTube? You can end the web’s dependence on patent-encumbered video formats and proprietary software (Flash) … Apple has had the mettle to ditch Flash on the iPhone and the iPad – albeit for suspect reasons and using abhorrent methods (DRM) – and this has pushed web developers to make Flash-free alternatives of their pages. You could do the same with YouTube, for better reasons, and it would be a death-blow to Flash’s dominance in web video.

Fair point; but one thing the FSF misses is that Apple’s stance has not only “pushed web developers to make Flash-free alternatives of their pages”. It has also pushed developers into making Apple-specific apps as an alternative to web pages – which to my mind is unfortunate.

The problem goes beyond web pages. If you have an application that goes beyond HTML and JavaScript, maybe for offline use or to integrate with other local applications or hardware, there is no cross-platform solution for the iPhone, iTouch or forthcoming iPad.

While I understand that non-proprietary platforms are preferable to proprietary platforms, it seems to me that a free cross-platform runtime is less evil than a vendor-controlled platform where I have to seek approval and share income with the vendor just to get my app installed.

More broadly, it is obvious that the days of Windows on the desktop, Web for everything else are over. We are seeing a proliferation of devices, each with their own SDK: alongside Apple there is Palm WebOS, Nokia/Intel Meego, Google Android, and when Windows Phone 7 comes along, Microsoft Silverlight.

The question: if you have an application and want to reach all these platforms, what do you do? A web app if possible; but otherwise?

It is the new fragmentation; and frankly, Adobe Flash is the closest thing we have to a solution, particularly with the native compilation option for iPhone that is coming in Creative Suite 5.

I don’t like the idea of a single company owning the runtime that unifies all these platforms. That’s not healthy. Still, at least Adobe is currently independent of the obvious industry giants: Google, Apple, Microsoft, IBM and so on.

Dealing a death-blow to Flash is all very well, but the end result could be something worse.