Category Archives: mono

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.

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.

Microsoft brings Silverlight – not Mono – to Linux via Intel

Yesterday I speculated about what was meant by the inclusion of Silverlight among supported runtimes for Intel’s Moblin Linux, which is being used on netbooks using the Atom processor. I had assumed it was some new development of Moonlight, Mono’s Silverlight implementation, but apparently this is not the case. Here’s what Microsoft’s Brian Goldfarb, director of the Developer Platform Group at Microsoft, said:

Microsoft and Intel announced today that the two companies have agreed to work together to bring support for Silverlight 3 to Intel’s Atom-based Mobile Internet Devices (MID). These Atom-based devices run on Windows and Moblin, an open source, Linux-based operating system targeted at Atom-based devices. In order to help bring Silverlight content to these devices, Microsoft has provided Intel with Silverlight source code and test suites, and Intel will provide Microsoft with an optimized version of Silverlight for Moblin devices that Microsoft can then redistribute to OEMs.

There are a couple of curious aspects to this. One is why Microsoft would not simply feed optimisations into the Moonlight project, which would benefit Silverlight/Moonlight on all Linux systems. Goldfarb did add:

The Silverlight for Moblin announcement is independent from Microsoft’s work with Novell on Moonlight. The Intel/Moblin effort is specifically about building great out-of-box experiences for consumers on Atom-based devices. Microsoft’s efforts with Novell remain critical as they build an open-source, compatible, and broadly available Silverlight solution for Linux.

Another is whether Intel/Microsoft are devising some way for Silverlight to run as a desktop application, rather than just as a browser plug-in. I’m hopping to clarify these points soon.

Intel has a press release here.

Is Mono safe to use?

Microsoft has promised not to sue those who develop implementations of its C# language and Common Language Infrastructure – the heart of .NET.

You might assume that to be good news for Mono, the open source implementation of .NET sponsored by Novell; and I suppose it is, though not in any major way.

The key point here is that Microsoft’s .NET platform goes well beyond what is covered by the promise. ASP.NET, Windows Forms, ADO.NET, Windows Presentation Foundation, Silverlight: all this falls outside. The promise covers only what is standardised by ECMA.

Mono leader Miguel de Icaza is clear about the differences in his post, and says Mono will be split into safe and – presumably – unsafe parts:

In the next few months we will be working towards splitting the jumbo Mono source code that includes ECMA + A lot more into two separate source code distributions. One will be ECMA, the other will contain our implementation of ASP.NET, ADO.NET, Winforms and others.

A good thing? Well, it could help promote the core of Mono in the open source community, which is wary. Open source champion Richard Stallman recently stirred up debate on the subject by proclaiming C# dangerous, in what has become a somewhat perplexing post:

It is dangerous to depend on C#, so we need to discourage its use. … The problem is not unique to Mono; any free implementation of C# would raise the same issue. The danger is that Microsoft is probably planning to force all free C# implementations underground some day using software patents.

he says (and is unlikely to be comforted by Microsoft’s recent moves), though he adds:

This is not to say that implementing C# is a bad thing. Free C# implementations permit users to run their C# programs on free platforms, which is good. (The GNU Project has an implementation of C# also, called Portable.NET.) Ideally we want to provide free implementations for all languages that programmers have used.

Confusing. Still, it’s a valid and important question. Is Mono safe to use?

I have been asking myself this for many years; and have asked Microsoft about it on a number of occasions with no clear answer. However, to me the breakthrough came when Moonlight was announced, an implementation of Silverlight for Linux for which Microsoft has partnered with Mono. The dual significance is first, that Microsoft is working with Mono; and second, that it shows how Microsoft has realised that overall Mono is more a benefit than a threat to its platform.

Action against Mono now seems less likely than ever. That opinion is not based on legal knowledge, but on the business & PR case.

Nevertheless, there could be limits. Stallman’s recent statement was provoked by discussions over whether Mono should be part of the default Debian install. It is not; but it is rising higher on the list of packages that are likely to be installed sooner rather than later by users, because Mono applications are growing in number.

On the server, Mono’s implementation of ASP.NET is now rather good. I’m using it on ITWriting.com for a Silverlight demo. I’ve been impressed by its compatibility with Visual Studio, though I’ve also found it increasing resource usage more than I would like. I’m using what is now an old version though, so I expect this to improve.

The cost savings in using Linux+Mono rather than Windows+ASP.NET are significant, which implies that the potential cost to Microsoft is significant too. It’s only a potential cost, because frankly the official platform is still less risky for a commercial deployment, from a technical rather than legal perspective. Mono is currently more likely to attract free or hobbyist users; but that could change. If Microsoft saw server license sales bleeding away because of Mono, my guess is that there would be rumbles.

What then of de Icaza’s move to separate Mono into safe and unsafe parts? I see the sense of it, but wonder if it could be counter-productive. While Mono is, errm, monolithic, Microsoft cannot take action against the unsafe parts without also blocking the safe parts. After the split, it will be easier for Microsoft to agitate about the pieces of Mono which might (or might not; I’m no lawyer) infringe its rights.

It still strikes me as unlikely that Microsoft would risk full-on legal action against its partner and against what is now a significant part of its platform story. However, I doubt we will get any further comfort from the company, beyond what it has already given.

*updated to acknowledge that Silverlight and WPF are covered by the open spec promise – see links in the comments.

Code for Mac Cocoa in Visual Studio – surprised to see this?

I grabbed this screenshot from a preview just installed:

Cocoa app in Visual Studio

It comes from Delphi Prism, a new product from Embarcadero/Codegear which lets you code for .NET using the Delphi language, an object-oriented version of Pascal. The product is not as new as it first appears. It is based on an existing product from RemObjects, called Oxygene, which it now replaces.

Here’s the story in a nutshell. 2003: Borland, the company which created Delphi, decides (rightly) that .NET is here to stay, and releases Delphi 8, a pure .NET version. Nobody wants it, because it has no advantages to speak of over Win32 Delphi (which is faster), or C#, which is the Microsoft .NET language.

At that time some voices muttered that what Borland should do is to integrate Delphi into Visual Studio, rather than doing its own .NET IDE.  One was Marc Hoffman at RemObjects, only he did more than mutter: his company developed its own implementation of Delphi Pascal for Visual Studio, called Chrome.

Borland soldiers on with Delphi 2005, which does both .NET and Win32 in a single IDE. Developers are happy to have a new Win32 Delphi, but most still don’t see the point of the .NET stuff. Further, Delphi 2005 is buggy; many stick with Delphi 7. Next comes Delphi 2006: more of the same, but less buggy.

There’s a couple of problems with Delphi’s .NET support. First, it is always out-of-date compared to Microsoft’s .NET tools. Second, it has component library schizophrenia. There’s VCL for .NET, based on Delphi’s component and GUI library, but that’s not compatible with .NET components built for Windows Forms. There’s Windows Forms, but that’s not compatible with existing Delphi code. Borland decides to deprecate use of Delphi .NET with Windows Forms. This is really for VCL developers, it says.

Next comes Delphi 2007. Nice product, but where’s .NET? Gone. Nobody seems to mind [and it turns up later in RAD Studio 2007*]. Delphi 2009, gone again. But now there’s Prism, and it is a complete U-turn. Forget VCL.NET. It uses standard .NET libraries, runs in Visual Studio, supports Windows Forms, ASP.NET, WPF, and soon Silverlight. Oh, and it’s based on what that other guy did back in 2004, with some Borland Codegear Embarcadero technology thrown in: dbExpress database framework, client support for DataSnap multi-tier applications, and the Blackfish pure .NET database engine.

Very good; but there’s still that awkward question: why not use C#? The answer, I guess, being either that you love coding in the Delphi language, or you want to use one of the Delphi-compatible libraries.

Or that you want to use Mono, which of course is what enables those tasty Mac options in the New Project dialog above. You can also use C# with Mono – possibly you should, since it is Mono’s core language – but in Prism it comes nicely integrated into Visual Studio. Well, somewhat nicely. In practice there are a few extra steps you need to take to get it working. The recommendation is to run Visual Studio in a VM on a Mac, since Windows cannot run Cocoa applications. And you’re going to be using Apple’s Interface Builder; there’s no GUI designer in Visual Studio itself.

Hardly enterprise-ready then; but still an intriguing development.

*Added correction thanks to John Moshakis’ comment below.

Silverlight 2.0 is released, Eclipse tools for Silverlight announced

Microsoft’s Scott Guthrie has announced the final release of Silverlight 2.0, its browser plug-in which includes a cross-platform implementation of the .NET runtime as well as a multimedia rendering engine. It will be available for download tomorrow.

Not really a surprise, but nonetheless a significant moment for Microsoft. I have been watching the project closely since it was first announced at PDC 2005 as Windows Presentation Foundation Everywhere. I am particularly interested in the cross-platform aspect. When .NET was first released in 2001, as Microsoft’s answer to Java after falling out with Sun, it had obvious cross-platform potential, yet the company held back form any commercial implementation outside Windows. Miguel de Icaza took independent action to create an unofficial open source Linux implementation, that also runs on Mac and Windows, called Mono. Microsoft was initially wary of Mono, but in my view the company had more to gain than to lose by supporting it. That now appears to be recognized, with Microsoft working formally with Mono to support Moonlight, Silverlight on Linux, and to provide it with multimedia codecs.

Microsoft has also announced Eclipse tools for Silverlight, in partnership with Soyatec, the idea being to enable Java developers to develop for the Silverlight client within Eclipse.

One clarification: although the press release says “This includes support for Mac, Windows and Linux”, the Mac support for Silverlight 2.0 is Intel Mac only, and the Linux version lacks multimedia support and the 2.0 version is described as “Experimental”; it is a long way from full release. Although Microsoft is now working with Mono, cross-platform currently means Windows and Intel Mac, though this does account for a large proportion of active Web users.

Press release is here.

Technorati tags: , ,

Microsoft Silverlight: 10 reasons to love it, 10 reasons to hate it

A year or so a go I wrote a post called Adobe AIR: 10 reasons to love it, 10 reasons to hate it. Here’s the same kind of list for Microsoft’s Silverlight, based on the forthcoming Silverlight 2.0 rather than the current version. The items are not in any kind of order; they also reflect my interest in application development rather than design. It is not a definitive list, so there are many more points you could make – by all means comment – and it will be interesting to have another look a year from now when the real thing has been out for a while.

This Silverlight developer chart is available in full on Brad Abrams’ blog here, or in Joe Stegman’s Deep Zoom version here.

The pros…

1. The Silverlight plug-in means developers can target a single, consistent runtime for browser-based applications, rather than dealing with the complexity of multiple browsers in different versions. You also get video and multimedia effects that are hard or impossible with pure HTML and JavaScript; though Adobe’s Flash has the same advantages.

2. Execute .NET code without deploying the .NET runtime. Of course, the Silverlight plug-in does include a cut-down .NET runtime, but instead of dealing with a large download and the complexities of the Windows installer, the user has a small download of about 4MB, all handled within the browser. In my experience so far, installation is smooth and easy.

3. Performance is promising. Silverlight comes out well in this prime number calculator, thanks no doubt to JIT compilation to native code, though it may not compare so well for rendering graphics.

4. Support for Mono (Moonlight) means there will be an official open source implementation of Silverlight, mitigating the proprietary aspect.

5. Silverlight interprets XAML directly, whereas Adobe’s XML GUI language, MXML, gets converted to SWF at compile time. In fact, XAML pages are included as resources in the compiled .XAP binary used for deploying Silverlight applications. A .XAP file is just a ZIP with a different extension. This also means that search engines can potentially index text within a Silverlight application, just as they can with Flash.

6. Third-party component vendors are already well on with Silverlight add-ons. For example, Infragistics, ComponentOne and DevExpress.

7. Take your .NET code cross-platform. With Macs popping up everywhere, the ability to migrate VB or C# code to a cross-platform, browser-based Silverlight client will be increasingly useful. Clearly this only applies to existing .NET developers: I guess this is the main market for Silverlight, but it is a large one. The same applies to the next point:

8. Uses Visual Studio. Microsoft’s IDE is a mature and well-liked development environment; and since it is also the tool for ASP.NET, you can use it for server-side code as well as for the Silverlight client. For those who don’t get on with Visual Studio, the Silverlight SDK also supports command-line compilation.

9. Choose your language. Support for multiple languages has been part of .NET since its beginning, and having the .NET runtime in Silverlight 2.0 means you can code your client-side logic in C#, Visual Basic, or thanks to the DLR (Dynamic Language Runtime) Iron Ruby or Iron Python.

10. Isolated storage gives Silverlight applications local file access, but only in a protected location specific to the application, providing a relatively secure way to get this benefit.

The cons…

1. If Apple won’t even allow Flash on the iPhone, what chance is there for Silverlight?

2. Silverlight is late to the game. Flash is mature, well trusted and ubiquitous; Silverlight only comes out of beta in the Autumn (we hope) in the version we care about – the one that includes the .NET runtime – and will still lack support on mobile devices, even Windows Mobile, though this is promised at some unspecified later date.

3. The design tools are Expression Blend and Expression Design – but who uses them? The design world uses Adobe PhotoShop.

4. While having solution compatibility between Expression Blend and Visual Studio sounds good, it’s actually a hassle having to use two separate tools, especially when there are niggling incompatibilities, as in the current beta.

5. No support for the popular H.264 video codec. Instead hi-def video for Silverlight must be in VC-1, which is less common.

6. It’s another effort to promote proprietary technology rather than open standards.

7. Yes Linux will be supported via Moonlight, but when? It seems likely that the Linux implementation will always lag behind the Windows and Mac releases.

8. Silverlight supports SOAP web services, or REST provided you don’t use PUT or DELETE, but doesn’t have an optimized binary protocol like Adobe’s AMF (ActionScript Message Format), which likely means slower performance in some scenarios.

9. Silverlight is a browser-only solution, whereas Flash can be deployed for the desktop using AIR (Adobe Integrated Runtime). Having said that, yes I have seen this.

10. You have to develop on Windows. This is particularly a problem for the Expression design tools, since designers have a disproportionately high number of Macs.

Mono on the iPhone

Unlocked iPhone, of course. Miguel de Icaza has the details and some video links.

Flash, Silverlight, Mono, Java: surely Jobs won’t keep all these runtimes officially forbidden for ever? It strikes me that Flash has the best chance of getting there, simply because without it the Web is a little bit broken for iPhone users. It’s an influential device and its runtime support (or lack thereof) will be a factor in web development trends.

Technorati tags: , , , , ,

Moonlight update: Silverlight 2 on Linux hardly started

Miguel de Icaza has an update on Moonlight, a third-party but official implemention of Silverlight for Linux.

Although progress is rapid, it is disappointing to read that a Silverlight 2.0 implementation is hardly started:

Silverlight 2.0 Other than the JIT support for Silvelright 2.0 at this point we have not done any work on it (well there are 3 classes stubbed privately).

There are two reasons for this: the updated 2.0 API is not public and although we have access to it, it is a bit of a mess to try to keep two separate trees (public and private) to support this and since Mix is just around the corner, we will just wait until next week.

The second reason is that we want to focus on shipping 1.0, completing the media pack integration and working on the configuration aspects of Moonlight (auto-update configuration for instance).

Good reasons; but the question it raises is this: by how long will Linux implementations lag the Windows and Mac releases of Silverlight? Silverlight 2.0 is hugely important because it enables .NET code to run. I constantly meet folk who are developing for Silverlight but waiting for version 2.0 as the real thing. Version 1.0 is browser JavaScript only.

More positively, at least we know that Mono already has a decent desktop implementation of .NET, so the fundamentals are there.

Technorati tags: , , ,

Mono at Mix08

Back in 2003, I blogged about how Miguel de Icaza could not get his proposed Birds of a Feather session approved at Microsoft’s Professional Developers Conference.

There’s always been ambivalence at Microsoft about Mono. Extending the value of .NET – good. Making it possible to ditch Windows – bad. Mono events at Microsoft conferences have tended to be off-site affairs in nearby hotels.

Viewing the sessions for Mix08, it’s clear that Mono has been pretty much welcomed into the fold. The catalyst for change was Moonlight, which solves a problem for Microsoft by enabling Silverlight to run on Linux. Miguel de Icaza is participating in a panel discussion on open technologies (with Andi Gutmans at Zend and Mike Schroepfer from Mozilla), and has his own session on Moonlight, subtitled “Come experience .NET on Linux”.

Don’t expect Microsoft to open source Office any time soon. That said, the company has changed significantly since 2003. Yes, it’s been forced by the market; but it’s a welcome development nonetheless.

If the Yahoo deal goes ahead, open source at Microsoft will get even more interesting.