Want a job? Learn Silverlight, not WPF

I keep an occasional watch on technology trends in the UK by the haphazard technique of browsing to Jobserve.com, bashing in some developer platforms, and seeing how many vacancies come up. I last blogged about this in August 2006, and before that in January 2006, March 2005, and August 2004.

Real-world job vacancies trail the conversation we have about cutting-edge web platforms by some margin. To give you an idea, in March 2002, three months after the first official release of C#, Jobserve had just 153 vacancies for C# developers, compared to 1894 for VB and 2092 for Java. Today, C# has 2933, VB and VB.NET 1906, Java 3741.

But that’s not what caught my eye when I looked this morning. I searched first for WPF, and then for Silverlight. WPF went final in November 2006, at about the same time as Vista was released to manufacturing. That’s nine months ago, but Jobserve has only 28 jobs which specifically mention WPF.

Silverlight 1.0 was released earlier this month. It’s a great video player, but many developers are waiting for Silverlight 1.1, due sometime in 2008, which supports .NET programming as well as multimedia. Component vendor Infragistics told me at the UK Mix07 that it is not bothering to release components for Silverlight 1.0, but has lots in the pipeline for 1.1. Keen to work with Silverlight in the UK? Jobserve has just 30 jobs to choose from.

The numbers are tiny (thought let me note, even CodeGear’s long-established Delphi can only muster 93 jobs), but I’m intrigued that Silverlight is actually a hair ahead of WPF in this context. Tomorrow it may be different; but it accords with my own assessment. I like WPF; it’s a better API than Win32 for coding a GUI. But it is a hard sell to developers of those boring business apps that make up the bulk of software development today. Unless you are making big use of visualization, it’s likely you will be more productive with tried-and-tested Windows Forms, or native Win32 code.

Silverlight is different. It is an immediate win if you have desktop .NET apps which you would like to convert to web applications, or ASP.NET apps for which you would like a richer client. Why Silverlight and not WPF? For one thing, cross-platform, essential for public web applications and very useful internally as well, with all those Mac-using designers (and now the CEO wants a Mac too). For another thing, lightweight deployment. When you install or upgrade the .NET runtime on a Windows box, you hold your breath as it updates a gazillion system components and hope that no bizarre error code appears. When you install Silverlight, you just click OK to a browser dialog, and it works.

The contradiction in the title of this post is that both Silverlight and WPF use XAML, so in learning one you are to some extent learning the other. Nevertheless, I now believe that Silverlight will be a more significant platform than WPF, and I’ll be interested to see if future job vacancies back up that prediction.

Update: Ryan Stewart has some US figures which are more positive for WPF, though again the absolute numbers are small. Interesting to watch.

iPod database successfully hacked – for now

A couple of days ago I blogged about the database hash in new iPods, which prevents their use with song management software other than iTunes. There is no iTunes for Linux.

The good news is that apparently the hash has been cracked, “using a debugger on Windows.”

Miguel de Icaza goes on to observe:

Breaking the hash is not really a long-term solution, as they can keep making the process harder every time. The long-term solution is for iPods to have a standard interface that third parties can communicate with.

Indeed. Of course, if iTunes and iPod communicated through a standard API, and if Apple would license its DRM or support alternatives, then any hardware vendor could sell iPod-compatible hardware, any software vendor could come up with substitutes for iTunes, and any online music store could compete with Apple’s official one.

Commoditization. Something Apple will do anything to avoid.

Technorati tags: , , , , ,

New iPod locked more tightly to iTunes, will not work with Linux

Apple has apparently made some changes to the iPod that make it increasingly difficult to use with anything other than iTunes. Since iTunes does not run on Linux, this affects Linux users more than anyone.

I wrote a piece a while back on Linux multimedia, and was impressed at how well my old iPod Photo works with Amarok on Linux. I have this iPod formatted for the Mac, since iTunes seems to work better on OS X. The only change I needed was to turn off journalling on the HFS+ file system. So what’s happened now?

According to this post, Apple has encrypted the iPod’s database. If you write to the database other than with iTunes, the iPod firmware will report that it is empty.

How about replacing the firmware completely, say with Linux? Bad news there as well – Apple has encrypted the firmware too. See ipodlinux.org for more details. In consequence, you can only hack the firmware on older models.

The change to the song database is more significant. Only a tiny geek minority would be willing to replace their firmware, but there are more people who like the the iPod but not iTunes. This may be damaging for third parties like J River, which offers iPod-compatible media center software.

See also Mike Elgan’s article on Is Apple the New Microsoft; and also note how the piece has over 1000 “Do not Recommend this story” votes from enraged Apple enthusiasts.

There is also a discussion on slashdot.

Update: more commentary from Miguel de Icaza (of GNOME, Mono fame) and Cory Doctorow – the usual suspects, I guess. “This has nothing to do with preventing piracy — this is about preventing competition with the iTunes Store,” says Doctorow.

Technorati tags: , , , , ,

Tried Vista speech recognition yet?

I had not, but gave it a try today. It is almost a hidden feature, but if you go into Control Panel and double-click Speech Recognition Options, it all starts happening.

I have a few advantages. My microphone is of high quality, I use an external mic preamp, and my office is relatively quiet. After half an hour of so going through the tutorial (which also does basic voice training), I was ready to go. I have no complaints about the ease of setup. Once speech recognition was enabled, I simply opened Word and started dictating.

There are two ways to look at speech recognition. You can consider it an accessibility feature for users who prefer not to type, for whatever reason. For example, RSI is a common problem for writers and computer programmers. Alternatively, you can consider it as better way of entering text. After all, most of us can speak faster than we can type. Ideally I would like to use it to assist with transcribing interviews.

I had a simple question. Can I get a chunk of text into Word more quickly with speech recognition than with typing? To try this out, I used a few lines that are indelibly imprinted into my brain, since they make up the first stanza of Wordsworth’s poem Daffodils which I learned at school.

The test

First, I typed it. It took me about 25 seconds, which means I type at over 50 wpm (about 70 wpm according to this test).

Next, I tried speech recognition. I tried it several times, to give it the best possible chance. I found I could do the initial text entry in around 15 seconds, but correcting errors took longer. The best I managed for the entire stanza was about a minute – twice as long as typing.

The problem is that certain words and phrases seem to be difficult for speech recognition to get right, and correcting these takes so long that it wipes out any gains from the easy ones. In my case, the line that Vista struggled with most was this one:

That floats on high o’er dales and hills

As I repeated the experiment, I got different variations:

That floats on high powered tables and hills

That floats on high on the walls and hills

That floats on high ideals and hills

The speech engine will always try to make sense of what you say using its dictionary and who-knows-what clever algorithms, but this can work against you. In this case, it is really just the the word “o’er” that trips up the engine. If I dictate instead:

That floats on high over dales and hills

it usually transcribes perfectly. Unfortunately, in trying to make sense of “o’er”, it usually messes up several other words as well.

Does this mean that a poem with elided text is just a difficult case? Possibly, but unfortunately technical writing seems to pose the same kinds of problems. Everything is fine for a line or two, and then a difficult word or phrase causes garbage to be inserted into your text. Speech correction in Vista is nicely implemented and works well, but it takes time.

Pros and cons

I don’t mean to put you off. I’m actually impressed with Vista’s speech recognition, though it is early days and I’m not sure how well it compares to alternatives like Dragon NaturallySpeaking. I could definitely get some work done, and considered as an accessibility feature, it seems pretty good. Unfortunately, it doesn’t seem quite good enough to be useful even to a proficient typist – at least, not without more time spent voice training and learning to get the best out of it.

Technorati tags:

LiveStation uses peer-to-peer, Silverlight for live TV

My final report from the UK Mix07 “Sneak peeks.” We were shown LiveStation, a Silverlight application which uses peer-to-peer technology developed by Microsoft Research to show live TV in a desktop application. Desktop and Silverlight? Yes, the app we say uses browser hosting to transform Silverlight into a desktop runtime. This is not too good for the cross-platform aspect, though it would seem possible to do the same thing with say WebKit (Safari as a component) on the Mac.

The broadcast quality was adequate for casual viewing but not great. However the player does look hassle-free to operate. Unlike the BBC’s troublesome iPlayer, this is for live TV rather than playback of previous broadcasts. Still, with both Silverlight and Flash supporting high quality video codecs, running cross-platform, and offering smooth installation with plenty of scope for interactivity, it looks like the BBC has some good options if it decides to re-examine its iPlayer technology.

The company behind LiveStation is Skinkers, which acquired peer-to-peer technology from Microsoft in exchange for a minority equity stake.

Technorati tags: , , , , , ,

Transactional memory draws applause at Mix07 UK

Simon Peyton-Jones from Microsoft Research in Cambridge enthused about transactional memory during the “Sneak Peeks” session at Mix07 in the UK.

I have mentioned this before on this blog; it is also favoured by Herb Sutter as a better way to do concurrent programming.

Peyton-Jones says it will eliminate a whole class of bugs from our code; perhaps this was one reason for the warm reception for his presentation.

He is a Haskell fan, and says this is best way to experiment with transactional memory now. It is not something that can easily be introduced into other languages, but will require some radical re-engineering.

Technorati tags: , , , , ,

Microsoft to support PHP in Expression Web 2.0

The closing session of UK Mix07 was a “Sneak peeks” in which we were shown a variety of snippets of varying degrees of interest. One was a brief glimpse of Expression Web 2.0, Microsoft’s web design tool, showing “PHP script” on the File – New menu.

The extent of this support was not discussed. The minimum would be some level of syntax highlighting, which would be trivial to implement, so this may not amount to much. Still, it is interesting as a sign of the times. When I spoke to some folk from Zend a couple of months ago, they emphasised their IIS support and good relationship with Microsoft, so it looks as if both sides want to play nicely together.

Microsoft Silverlight vs Adobe Flex

I am at Mix07 in London. Having looked in some detail as Adobe Flex and AIR in recent weeks, it is interesting to compare and contrast. I am looking primarily at the developer aspect, rather than video or multimedia.

Silverlight is not a direct competitor to Adobe AIR, in that it does not run outside the browser (though I guess you could do something funky with an embedded browser control). It is a closer competitor to Flex, though there is no exact equivalent to Adobe LiveCycle, which is not needed for Silverlight. However, the two technologies do have a number of parallel features, including the following:

  • Cross-platform runtime – Windows, Mac and Linux (the last a recent Microsoft announcement)
  • XML language to define the GUI
  • Embedded video capability
  • Timeline for animations etc.
  • Strongly-typed, object-oriented language with just-in-time compilation
  • Easy access to XML web services
  • Dedicated design tools (Expression Blend for Silverlight, Flash IDE for Flex and AIR)
  • Dedicated developer tools (Visual Studio for Silverlight, FlexBuilder for Flex and AIR

So what are the differentiating factors? There are some obvious differences. For example, Flash 9.0, and therefore Flex, runs on Windows 98; Silverlight 1.1 will not. On the Silverlight side, there is the advantage of language choices: Silverlight allows Visual Basic, C#, Python or Ruby. Flex has only Actionscript 3.0.

The real difference

These technical differences are dwarfed by cultural factors. Microsoft’s advantage is the comfort factor of Silverlight for developers already familiar with Visual Studio and C#, and perhaps beginning to look at WPF. Microsoft does strong tools, and FlexBuilder does not currently come close. This will help establish Silverlight for enterprise development. With increasing numbers of Macs popping up incoveniently in Windows networks, Silverlight could soon find a role. Similarly, for ASP.NET developers who want to give users a richer client, Silverlight is a compelling option.

Adobe’s strength is that it already has a strong hold on the designer community. While the Expression products are being well received, they would have to be extraordinary to win substantial numbers of switchers from Flash, Dreamweaver, Photoshop and so on. Adobe also wins on deployment. Flash is well established, whereas Silverlight is new; it will be especially hard for Microsoft to place it on non-Windows mobile devices.

I don’t see either of these technologies failing. I suspect Microsoft is introducing Silverlight in time to stem a bleed of .NET developers to cross-platform development with Flex and perhaps AIR, but I would be surprised to see large numbers of defections from Adobe’s camp.

Interesting questions

A few questions to which I do not yet know the answer:

  • How does the performance of Microsoft’s IL + JIT compiler compare with Adobe’s Actionscript 3.0 + JIT compiler? On Windows and on other platforms?
  • Adobe’s AMF protocol is more efficient than XML for data delivered via web services. Is this a significant performance benefit?
  • MXML vs XAML. My impression is that WPF is more expressive, but I have not researched it sufficiently to back this up. I would be interested in comments.

As ever, your thoughts are welcome.

Silverlight at Mix07 UK

I’m at Mix07 in London and Developer Division General Manager Scott Guthrie is talking about how to code a Silverlight 1.1 application. For me, it follows detailed briefings from Adobe on Flex and AIR, so I’m interested in comparing and contrasting the two technologies – look out for a post on this soon. I’m not going to go over every detail of Silverlight here – there are other places where you can do that – but will pick out some details that struck me as interesting, from Guthrie’s two sessions today.

Guthrie’s approach was to run through Silverlight 1.1 features using sample code, live demos and the occasional foray into Expression Blend. He focused on the developer perspective and showed lots of C# code, so the session was of little help if you want to work with the current 1.0 release, which lacks .NET support. If you want to try Silverlight 1.1 today, you can download an alpha release, along with Visual Studio 2008 Beta 2 and Expression Blend 2 Preview. There is a fair amount missing in the current Silverlight 1.1 alpha, as we discovered.

Silverlight 1.1 will run on Mac, Windows and Linux, the last of these via a new partnership with Novell and Mono. On Linux, target browsers will include Konqueror, Firefox and Opera.

Guthrie showed how to put together a simple Silverlight app – pretty easy, if you have any web design experience. In essence, you define a GUI in XAML, and then write code in C#, VB, Python or Ruby. Code is compiled to .NET IL (Intermediate Language); XAML is parsed at runtime but can be embedded as a resource. Apparently Silverlight apps will be compressed into Zip files by default in the final release, which will improve download time and may help with firewall issues – some firewalls block DLL files.

Silverlight 1.1 controls and layout

The current Alpha has few controls, but this will change in the final release. Available controls will include:

  • TextBox
  • CheckBox, ComboBox, Radio Button
  • ListBox, GridView
  • Slider, ScrollBox

Some controls will be data-aware, and it will apparently be easy to bind something like a GridView to data on a remove server, with data delivered via web services.

I asked about rendering HTML in Silverlight. There is no HTML control, but you can overlay HTML rendered by the browser, and in addition some folk have been working on a custom XHTML control.

The current alpha does scaleable x y layout (a slightly confusing idea); but there will be layout managers in the final release, including a StackPanel and a Grid.

I asked about a licensing model for commercial controls. Guthrie says there will not be one initially, but Microsoft will explain how to roll your own – I got the impression this might use Silverlight’s DRM features.

Skinning

Another important forthcoming feature is skinning. Guthrie explained this as being like using an external CSS stylesheet (though it is not CSS). This is a designer-friendly approach and helps to reduce download size.

HTML interaction

Silverlight gives access to the browser DOM from managed code. In addition, a [Scriptable] attribute lets you access managed code from Javascript in the browser. Guthrie showed how this enables an interesting scenario: doing UI entirely in the browser, and using Silverlight as a non-visual control/library. The win here is that you can code in C# rather than Javascript, and get the benefit of just-in-time compilation as well as the Silverlight library functions.

Caching and cross-domain access

Silverlight relies on the browser to cache previously downloaded code and assets. Currently it can only access files from the application’s source domain, but there will be a way to do cross-domain access for controls and for web service calls – I believe this will use the concept of trusted domains, rather than being unrestricted. There will be limited local storage using the .NET isolated storage model, but this will be restricted to 1MB per store, and will reside in the browser cache, so it is not very dependable*.

Web service support and LINQ

Silverlight will support JSON, WCF and SOAP. It will also include LINQ, with the possibility of creating custom LINQ data providers – Guthrie mentioned possibilities like a LINQ provider for Amazon’s S3 service.

Async support and threading

Silverlight supports asynchronous calls to web services. It will also include a BackgroundWorker class for long running tasks.

Windows Mobile

A delegate asked when we will see Silverlight for Windows Mobile. Guthrie says this is planned, but said deployment was a greater challenge than technical implementation. The problem is dealing with several parties: device manufacturers, mobile operators, etc. It is hard to imagine Steve Jobs allowing Silverlight onto the iPhone; but I would have thought a Silverlight implementation for Enterprise deployment onto Windows Mobile devices would be feasible and useful. No timescale was given for a Windows Mobile implementation.

Quick reflection

This is a Microsoft-platform crowd and generally seem impressed with Silverlight, which gives them an easy route to browser-hosted, cross-platform .NET applications. If Microsoft hoped that an event like this would attract existing Flash developers interested in alternative platforms, let me just say that I do not see any evidence of this, even in the design-focused tracks. It will be a long haul.

As for Silverlight vs Adobe Flex and AIR (FLAIR?) – that is a subject for a separate post, which I hope to do shortly.

*Update: I’m not yet clear how isostorage works, despite talking to Scott Guthrie about it. Does it live in the browser cache or outside it? If it lives outside the cache, how is it that clearing the cache clears the store (Guthrie seems definite about this)? If you have two browsers, does a domain get two separate isostores, or one shared store? I’m trying to get more information about this.