Category Archives: silverlight

What’s on at Mix 2010 – some surprises as Microsoft talks standards

Microsoft’s Mix conference is on next month – probably the company’s second most interesting conference after PDC, though this Mix looks rather better than last year’s relatively drab PDC (free laptops aside). The company has plenty to talk about, primarily around Windows Phone development – twelve sessions! – Internet Explorer 9, and Silverlight 4. Mix is meant to be a web design conference – though it has always strayed extensively into Windows-only territory – and the inclusion of Windows Phone is a bit of a stretch, but I doubt attendees will care.

It’s notable that Microsoft is making more than a nod to web standards and open source. There is a full day workshop from Molly Holzschlag on HTML5 Now: The Future of Web Markup Today, John Resig on How jQuery Makes Hard Things Simple, and Doug Schepers from the W3C with Microsoft’s Patrick Dengler on SVG: The Past, Present and Future of Vector Graphics for the Web; Christian Heilmann on Participating in the Web of Data with Open Standards; and not forgetting Miguel de Icaza on The Mono Project.

Why would Microsoft talk about such things? Arguably it is a kind of smokescreen, talking standards while busily promoting proprietary stuff like SharePoint and Silverlight. I think there is some of that; but that this new focus also reflects power shifts in the industry. In the new cloud-based era Microsoft has to compete with Google, Mozilla and others; and to make sure that its stuff works in some measure on a diversity of clients, from Android to iPhone. Note the session on Practical Strategies for Debugging Cross-Browser Display Issues.

I would not call this a conversion. I would say this is more about “Windows if we can, standards if we must”. That necessity is increasing though, and the sessions at Mix reflect that.

Windows Phone 7 development rumours abound

News about the Windows Phone 7 development platform is leaking out, ahead of its official unveiling at the Mix conference next month. Rumour has it that both Silverlight and the XNA gaming framework will be supported, for creating consumer-focused applications, together with limited access to native APIs subject to Microsoft’s specific approval.

The controversial aspect, if these ideas prove to be accurate, is lack of compatibility with existing applications. It seems possible that C++ applications written for previous versions of Windows Mobile will not run, while those written for the Compact Framework will need porting to the Silverlight UI.

While there is little love for Windows Mobile, it is used for business applications where it integrates well with the rest of Microsoft’s platform. Since Windows Phone 7 seems to target the consumer, Microsoft may argue that this does not matter, since businesses can continue to use Windows Mobile. You would imagine, though, that enthusiasm for continuing with Windows Mobile will be limited given the superior usability of Windows Phone 7. Maybe a professional edition to follow in 2011?

One thing we know for sure is that Adobe Flash is not supported in the first release, though Microsoft says it is not opposed to it appearing on the platform in future. That in itself is interesting, since Adobe is hardly likely or able to rewrite Flash in Silverlight or XNA. Will certain important developers have privileged access to a wider range of native APIs? Despite rumours, there is still plenty to speculate about.

A Silverlight UI for Windows Mobile 7, backward compatibility in doubt

Note: speculative post; I have no official information on this.

It’s been rumoured for ages; but at this point I would be surprised if the Windows Mobile 7 UI were not built with Silverlight. Consider:

  • Silverlight has to be supported – it should have been in 6.5 – otherwise nobody will take mobile Silverlight seriously
  • WM7 has to have excellent UI design; and WPF/Silverlight is Microsoft’s designer-friendly UI framework
  • Silverlight 4 already supports touch control in the current beta
  • Scaling/Zooming is baked into Silverlight and ideal for a mobile UI
  • If Silverlight is present on the device it would make sense to build the UI with it

If this is right, there are a couple of interesting aspects for developers. It will make Silverlight a more attractive platform in scenarios such as Enterprise roll-outs where the device can be specified.

The awkward question: what about all those existing Windows Mobile apps built either with native code or with the compact framework? Again, there are rumours of lack of backward compatibility. Does that mean that all Windows Mobile 7 apps with a UI will have to be done in Silverlight? That’s what John Biggs says:

WinMo 7 will not run 6.x code. End of story. It is based on Silverlight and .Net. Everything save a few basic programs will not work under WinMo 7. There is no expectation that this will be a “business device” and the focus is currently on games including some XBox Live functionality for gaming and messaging. There will be a Microsoft App store with an easy approval process.

I find this a stretch. I can believe that Microsoft might initially target the consumer market, or have crippled “consumer” versions; but not that it would give up on mobile business apps – we heard at PDC (to the point of tedium) how Microsoft is supporting “three screens and a cloud”, unified for developers by Visual Studio. There’s no reason why Silverlight should not be used for business apps.

What about backward compatibility though? Traditionally Microsoft does a good job of keeping your old stuff running, within reason; possibly too good – Windows is full of compatibility hacks that may be to its detriment overall.

Another point to bear in mind: WM7 needs a browser, and I don’t see Microsoft re-implementing IE in Silverlight.

So I’m sceptical about this too; but with Windows Mobile at such a low ebb could the company decide it has little to lose?

Silverlight 4 with COM can do anything – on Windows

At PDC Microsoft played down the significance of adding COM support to Silverlight 4 when run out of the browser and fully trusted (you can also be out of the browser and not fully trusted). The demos were of Office automation, and journalists were told that the feature was there to satisfy the requests of a few Enterprise customers.

Now former Microsoft Silverlight program manager Justin Angel, who has implemented his blog in Silverlight, has spelt out what we all knew, that Silverlight with COM support can do just about anything. His richly-illustrated blog post has code examples for:

  • reading and writing to any file (subject I guess to the permissions of the current user)
  • executing any command or file
  • emulating user input with WShell.SendKeys
  • pinning files to the Windows 7 taskbar
  • reading any registry values
  • adding an application to the Windows startup folder
  • doing text to speech using Windows built-in engine
  • accessing local databases with ODBC
  • automating scanners and cameras
  • using the Windows 7 location API, accessing the full .NET Framework
  • and of course … automating Microsoft Office.

Well, fully trusted means fully trusted; and these are great features for powerful though Windows-only Silverlight applications, though I hope no user installs and trusts one of these applets thinking it is “only Silverlight” and can’t do much harm.

The post also has comments on the lack of any equivalent feature for the Mac in Silverlight 4:       

If Microsoft chooses to not go ahead with Mac support in Silverlight 4 RTM, well, it’s not because they couldn’t

says Angel, suggesting that it would be easy to add AppleScript support. (I had to type that quote – no clipboard support in Silverlight 3).

Of course there is time for Microsoft to unveil such a feature, say at Mix10 in March, though I wouldn’t count on it.

A year of blogging: another crazy year in tech

At this time of year I allow myself a little introspection. Why do I write this blog? In part because I enjoy it; in part because it lets me write what I want to write, rather than what someone will commission; in part because I need to be visible on the Internet as an individual, not just as an author writing for various publications; in part because I highly value the feedback I get here.

Running a blog has its frustrations. Adding content here has to take a back seat to paying work at times. I also realise that the site is desperately in need of redesign; I’ve played around with some tweaks in an offline version but I’m cautious about making changes because the current format just about works and I don’t want to make it worse. I am a writer and developer, but not a designer.

One company actually offered to redesign the blog for me, but I held back for fear that a sense of obligation would prevent me from writing objectively. That said, I have considered doing something like Adobe’s Serge Jespers and offering a prize for a redesign; if you would like to supply such a prize, in return for a little publicity, let me know. One of my goals is to make use of WordPress widgets to add more interactivity and a degree of future-proofing. I hope 2010 will be the year of a new-look ITWriitng.com.

So what are you reading? Looking at the stats for the year proves something I was already aware of: that the most-read posts are not news stories but how-to articles that solve common problems. The readers are not subscribers, but individuals searching for a solution to their problem. For the record, the top five in order:

Annoying Word 2007 problem- can’t select text – when Office breaks

Cannot open the Outlook window – what sort of error message is that? – when Office breaks again

Visual Studio 6 on Vista – VB 6 just won’t die

Why Outlook 2007 is slow- Microsoft’s official answer – when Office frustrates

Outlook 2007 is slow, RSS broken – when Office still frustrates

The most popular news posts on ITWriting.com:

London Stock Exchange migrating from .NET to Oracle/UNIX platform -  case study becomes PR disaster

Parallel Programming: five reasons for caution. Reflections from Intel’s Parallel Studio briefing – a contrarian view

Apple Snow Leopard and Exchange- the real story – hyped new feature disappoints

Software development trends in emerging markets – are they what you expect?

QCon London 2009 – the best developer conference in the UK

and a few others that I’d like to highlight:

The end of Sun’s bold open source experiment – Sun is taken over by Oracle, though the deal has been subject to long delays thanks to EU scrutiny

Is Silverlight the problem with ITV Player- Microsoft, you have a problem – prophetic insofar as ITV later switched to Adobe Flash; it’s not as good as BBC iPlayer but it is better than before

Google Chrome OS – astonishing – a real first reaction written during the press briefing; my views have not changed much though many commentators don’t get its significance for some reason

Farewell to Personal Computer World- 30 years of personal computing – worth reading the comments if you have any affection for this gone-but-not-forgotten publication

Is high-resolution audio (like SACD) audibly better than than CD – still a question that fascinates me

When the unthinkable happens: Microsoft/Danger loses customer data – as a company Microsoft is not entirely dysfunctional but for some parts there is no better word

Adobe’s chameleon Flash shows its enterprise colours – some interesting comments on this Flash for the Enterprise story

Silverlight 4 ticks all the boxes, questions remain – in 2010 we should get some idea of Silverlight’s significance, now that Microsoft has fixed the most pressing technical issues

and finally HAPPY NEW YEAR

Moonlight 2 released; no Microsoft codecs unless you get it from Novell

The Mono Project has released Moonlight 2, its implementation of Silverlight for Linux. I tried my own database application and was pleased to find that it works fine; better than it did with the earlier release.

Note the right-click menu which offers some handy debugging features as well as the invitation to “Install Microsoft Media Pack”. If you choose this, you get a dialog offering the Microsoft codecs which are downloaded from Microsoft, not from Mono servers. You have to agree a EULA that restricts use to Moonlight running in a web browser.

That last bit is intriguing; it seems Microsoft is trying to prevent desktop or out-of-browser Moonlight (or Mono) from taking advantage of its codecs.

So what is in Moonlight 2? Miguel de Icaza explains:

Moonlight 2 is a superset of Silverlight 2. It contains everything that is part of Silverlight 2 but already ships with various features from Silverlight 3.

Those additional features include the pluggable pipeline, easing animation support, writeable bitmaps, and partial out-of-browser support. Further, de Icaza says:

We are moving quickly to complete our 3 support. Microsoft is not only providing us with test suites for Moonlight but also assisting us in making sure that flagship Silverlight applications work with Moonlight.

There is also a new patent covenant that:

ensures that other third party distributions can distribute Moonlight without their users fearing of getting sued over patent infringement by Microsoft

That said, the media pack is a source of friction. Only the Novell Moonlight distribution will raise the above dialog to install the Microsoft codecs; others will have to make their own arrangements; at least that is how I understand de Icaza’s post.

It seems an odd restriction, and means that most users should download from Novell.

Google Gears out, HTML 5 in: what this means for offline web apps

I was interested to read that Google is abandoning Gears in favour of HTML 5.

While that makes sense, it is a hassle for developers who have developed for Gears, since there are differences between features such as HTML 5 local storage and Gears LocalServer. The Gears API was tidy and effective so in some ways I’m sorry to see it go, though a broad standard will be much more useful.

Still, this does mean that you can develop to the HTML 5 standard for Offline Web Applications with some hope that, although broad implementation is lacking now, it will come in future. Even IE 9 is likely to have a fair amount of HTML 5 in it.

It is a critical standard because the success of something like Google’s Chrome OS will depend on it. Nobody can count on being always connected.

In the meantime, there are also offline features in Adobe Flash and Microsoft Silverlight.

PDC day two: Silverlight 4 and a free laptop

There were two big themes at PDC in Los Angeles today. One was the Silverlight 4 beta, the subject of the most impressive section at the keynote. The other was the announcement of free laptops for every attendee – aside from press and government. It is remarkable how a generous gift can change the atmosphere. The lack of breakfast or Universal Studios party was soon forgotten as the audience cheered its own good fortune.

There is actually some justification for handing out this hardware. It’s a decent machine, a modified Acer Aspire 1420P with Windows 7 x64, 2GB RAM, multi-touch display, and accelerometer. Most of us do not have multi-touch machines, and giving them to the core Windows developers who attend PDC may help stimulate the creation of applications that properly support this feature.

Otherwise, it was a Silverlight day. Although SharePoint 2010 was also in the keynote, the cheers it received felt more like relief, that it finally has sensible development and debugging tools in Visual Studio, than real enthusiasm. Somehow the keynote did not capture the potential of the product.

Silverlight though was well received. It is a huge release that opens up many new possibilities, though I am discovering some details that look awkward. There is also one troubling aspect, which is that Microsoft is introducing imbalance in its cross-platform story. The Windows version of Silverlight 4.0 supports COM automation, enabling integration with local APIs such as location on Windows 7, and Microsoft Office. There is no equivalent in the Mac release. It would not be so bad if Microsoft offered some route to similar functionality on the Mac, but there is none that I am aware of.

Microsoft folk that I spoke to about this dismissed it as a minor point, but it is not. Cross-platform is a discipline; this is a failure to observe that discipline and hands an advantage to Adobe Flash for developers that require broad reach.

Miguel de Icaza on eight years of Mono, its future, and the Silverlight desktop

Mono founder Miguel de Icaza spoke at the Monospace conference – 250 enthusiasts in Austin, Texas – on the past and future of the project. I wasn’t there but enjoyed listening to the keynote as posted by Redmonk’s Michael Coté.

“Never ask for permission, ask for forgiveness – that’s how we’ve done a lot of things in the Mono world,” said de Icaza, who also remarked that in the beginning “we thought it would be a walk in the park, we thought it would up and running in 6 months.” His motivation: “We think that .net is a fantastic development platform – we were envious when Microsoft came out with it.”

Eight years on and the Mono team is now around 35 people at Novell, plus 30-70 external contributors. “We don’t dictate the direction of mono, it’s mandated by the direction of the community,” says de Icaza. He talks about MonoDevelop, the Mono IDE, which is now licensed under LGPL allowing commercial plug-ins; about MonoTouch which lets you develop for Apple’s iPhone and “will expand towards Android”; and about XNATouch, a Mono game framework for iPhone.

The task of keeping up with Microsoft – insofar as Mono succeeds – has become easier thanks to open source. “In the last couple of years Microsoft has become very open-source friendly in some areas,” says de Icaza. “For example ASP.NET MVC, we don’t have to do anything, it just runs on our ASP.NET implementation.”

Someone asked about Mono’s plans for WPF, which is becoming more important on Windows, and this led to some intriguing comments on Moonlight/Silverlight and its future. “I think Silverlight has more potential than WPF has, because it runs on the Mac, it runs on Linux, it runs on Windows, and Silverlight is easier to learn than WPF is. We like the Silverlight model but we don’t like that it is limited to a sandbox on the browser,” he said.

“Moonlight can be used in two modes. One of them is moonlight in the plug-in, like you do with Microsoft, and you can out-of-browser if you want, but you are still restricted by the sandbox. We also offer the same graphical engine that we use for Silverlight [Moonlight] but with the .NET 4.0 APIs. You have full access to .NET 4.0 with the Silverlight UI. Isn’t that awesome?”

“WPF is interesting but a lot of work, and we don’t have the bandwidth and the resources. Our best possible option is to use Silverlight with the .NET 4.0 APIs. Our wish is to bring this expanded Silverlight to Windows and Mac OS. Maybe we’ll gently push Microsoft in that direction.”

One of his team is working on “the whole desktop rendered by Silverlight.”

In general I agree that Silverlight is more significant than WPF, particularly if Microsoft keeps up its current energetic level of development. I will be surprised if we don’t hear from Microsoft about an enhanced desktop Silverlight at the forthcoming PDC and Mix conferences.

There is another side to this though: if you can do your cross-platform .NET development in Microsoft Silverlight, do you still need Mono? Particularly if official ports to Linux start appearing?

Of course there is more to Mono than Moonlight. Running ASP.NET on Linux web servers is an attractive proposition, though historically its performance and reliability hasn’t matched that of Microsoft .NET – not surprising given its relatively small resources. Eight years on, and Mono has done more than just survived, yet has not quite tipped over into a platform popular enough to attract the level of contributions it needs.

WPF not Windows Forms gets the Windows 7 love

Microsoft’s Scott Guthrie has a blog post today about what’s new in Windows Presentation Foundation 4, and one of the things he mentions is Windows 7 multitouch support – as also described in this walkthrough – and integration with the Windows 7 taskbar, jump lists, icon overlays and so on. Taskbar support is wrapped in the System.Windows.Shell namespace in PresentationFramework.dll.

This means that Microsoft is making it easy for .NET developers to support Windows 7 in WPF applications. However it is not extending the same love to developers using Windows Forms, the older GUI framework. That said, there is always the Windows API Code Pack which covers many Windows 7 features including the taskbar and jump lists, or you can do your own COM and native code interop. No doubt with a bit of effort all the features can be be integrated into a Windows Forms application.

Still, there’s no doubt that Microsoft is now steering us towards WPF rather than Windows Forms for new desktop development. About time, you may say, considering that WPF first arrived in 2006. While that’s true, there have been good reasons to be cautious about adoption. WPF apps use more resources than Windows Forms applications, require the .NET Framework 3.0 or higher, and for a long time were talked down even by Microsoft as unsuitable for line of business applications.

That tune has now changed, though when you consider the large numbers of existing Windows Forms applications, and the fact that developers contemplating radical revisions or new projects may well be looking at web or rich internet clients, WPF is still something of a hard sell.

On the other hand, the improvements Guthrie describes are significant, not only for Windows 7 features, but also key areas like cached composition for graphics, which can greatly improve performance, and a new text rendering API.

It’s also worth noting that Windows Forms was never a great framework. It wraps the old Windows GUI API which makes resizable layouts and scaling for different display resolutions difficult, as well as lacking all the multimedia and effects goodness in WPF. Another factor is that WPF is designer friendly, with its own Expression Blend design tool. Windows Forms has nothing like that.

WPF has a family connection to Silverlight, which was originally called WPF Everywhere. Microsoft’s idea is that we code in WPF for the desktop, and transition to Silverlight for applications that require broad reach. So far though, mass migration to WPF has not happened, and Silverlight has an independent life as a platform for browser-hosted .NET applications that work cross-platform. Developers have many other choices for broad reach applications, including HTML and JavaScript, Java, and Adobe Flash.

Is it possible that broad adoption for Windows 7 could see renewed interest in WPF and Windows development? I think it will happen to a limited degree, but will not really disrupt the underlying trend towards web and cross-platform.