Category Archives: software development

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.

Visual Studio 2010 and .NET Framework 4.0 – a simply huge release

I’ve been exercising the new beta 2 of Visual 2010. It is hard to encapsulate in a few words because this is a simply huge release. OK, so I did download the Ultimate version; but the changes at every level seem greater than in Visual Studio 2008. One of the reasons is that this is the first full update to the .NET Framework since version 2.0 in late 2005. Versions  3.0 and 3.5 extended 2.0 but did not replace it. Another factor is that Visual Studio 2010 has a new editor built with Windows Presentation Foundation, and has a different look and feel than its predecessor. In addition, there is a new language, Visual F#, though I don’t hear much buzz about it; I think elevating IronRuby or IronPython to this status would have attracted more interest – but they are dynamic languages, whereas Visual F# is a functional language. 

When you are assessing Visual Studio you are in part assessing Microsoft’s platform, and as that platform has sprawled, so too has the tool. It is now so large that it is difficult to have in-depth knowledge of the entire thing. I also notice this when speaking to Microsoft folk about the product.

So what is new?

If you need to acclimatise, I suggest you start with What’s new in .NET Framework 4.0. This is a large topic in itself. Some of the things to look out for are What’s new in the Base Class Library, including Complex numbers, Location API, IObservable<T> for observable collections, and other tweaks and enhancements.

Then there are things like in-process side-by-side execution – the ability to run two versions of the Framework at once in the same process, which is remarkable.

Parallel programming with PLINQ and the Task Parallel Library is another major topic.

COM interop is changing; you no longer need to deploy Primary Interop Assemblies, because the compiler can include only the types you need in your application.

Next, take a look at what’s new in specific frameworks, such as WPF version 4 and ASP.NET MVC 2.

After that, you might be ready to look at new stuff in specific languages: including the dynamic keyword in C#, implicit line continuation in VB, lambda expressions in VC++, the concurrency runtime, and the arrival of Visual F#.

With that sorted, check out the new tools in the Visual Studio IDE. I’m thinking of the new code editor, the updated WPF visual designer, the new visual designer for Silverlight, and the Tools for SharePoint development; and not forgetting the updated modelling and application lifecycle management tools.

But isn’t this the era of cloud computing? That’s another part of the problem; the Windows-oriented tools seem less important if you are immersed in the latest cloud news. That said, don’t forget Windows Azure, though I was disappointed to find that the Windows Azure Tools for Visual Studio are a separate download, and not done yet.

I’m impressed that Microsoft seems to be pulling all this together successfully; it is a significant integration task. And as ever I’d be interested in what developers think – was the new code editor really necessary? Is Microsoft addressing the right areas? Has Microsoft done enough to support new Windows 7 features? And is performance OK in this version (it was a problem in beta 1)?

Salesforce.com partners with Adobe for Flash Builder for Force.com

Adobe and Salesforce.com have announced Flash Builder for Force.com, a special version of Flash Builder that lets you create Flex applications that interact with Force.com web services. The preview will be available for download today from developerforce.

I asked Dave Gruber from Adobe and Eric Stahl from salesforce.com what is really new here, since force.com has always exposed a SOAP web service API, and Flash Builder has the ability to import WSDL service descriptions in order to call them. In addition, a Force.com Toolkit for Adobe AIR and Flex has been available for some time.

Gruber explained that there is now a “custom interface to the Force API” that reduces the amount of code you have to write to wrap these services. In addition – and this may be more significant – some parts of LiveCycle Data Services have been integrated into the Force.com platform, including the data synchronisation piece. The illustration above shows an AIR application with a Sync tab, and this is the kind of online/offline application that should now be easier to build.

“We have a lot of customers asking us for that desktop connected, disconnected scenario. We want to give people a great set of tools for building those kind of apps,” says Stahl.

According to Gruber, Flex developers who want to take advantage of the new framework will have to purchase Flash Builder for Force.com even if they already have Adobe Flash Builder. “It’s a unique offering, this is not going to be built into the standard Flash Builder product”, he told me.

Salesforce.com has toolkits for many client platforms, but offering a custom IDE for Flex demonstrates a significant partnership. “Adobe is clearly the leader in rich internet applications, it’s a synergistic relationship,” says Stahl.

Blast from the past: how Adobe praised XAML at PDC 2003

I’ve been trawling back through material from Microsoft’s Professional Developer’s Conference in 2003 for a piece that will be posted shortly. I believe that the vision that was presented at PDC 2003, and how it fell apart, sheds a lot of light on why Windows is as it is today.

In doing so I came across this snippet about Adobe’s participation in the PDC keynote. It’s still online in Microsoft’s PDC press release:

Adobe Systems, a leading developer of software for consumers, creative professionals and enterprises, demonstrated the possibilities for ISVs created by integrating the new "Avalon" presentation technology and declarative programming techniques for Windows. Using these technologies, a prototype version of Adobe After Effects showed how developers could unify documents, cutting-edge graphics and media. For example, developers would now be able to build animated charts and graphs that are linked to back-end data sources to produce a smart solution that displays stock prices, sales and other information within a high-end professionally designed format.

"Many developers have not taken the visual design of their applications seriously enough, with the most innovative work restricted to creative professional software and games," said Greg Gilley, vice president of Graphics Applications Development at Adobe. "Longhorns new Avalon technology brings the designer and developer closer, so they can truly collaborate on creating software applications that are as beautiful as they are functional."

The odd thing is, this quote could come from the Adobe MAX 2009 conference from which I have just returned. “Animated charts and graphs … linked to back-end data sources” is what we saw in applications build with Mosaic, Adobe’s new framework for LiveCycle ES2 clients.

The difference: Adobe is doing all this with Flex and MXML, not XAML, and the client platform is the Flash runtime, not Avalon running on Windows.

Gilley of course was speaking before Adobe’s acquisition of Macromedia (and Flash and MXML) in 2005. Furthermore, nobody at PDC in 2003 could have guessed how long it would take Microsoft to deliver XAML.

Technorati Tags: ,,

Visual Studio 2010 to launch March 22 with Azure, Team Foundation Server for all

Microsoft has announced more details about Visual Studio 2010 and .NET Framework 4.0. Beta 2 of both products is available round about now, at least for MSDN subscribers, while thee are a few interesting packaging changes:

  • No more roles – there will be three paid-for versions of Visual Studio, Professional, Premium and Ultimate. I’ve been told that Premium will be pretty much the current Development and Database editions combined, while Ultimate has everything.
  • Team Foundation Server comes with every version, meaning that all Visual Studio developers will be able to use it if they choose. General Manager Jason Zander has the details of TFS Basic, which can even run on the client machine.
  • There will be a number of Azure hours bundled with each edition, so that developers can get started with Microsoft’s cloud platform without further payment. For example, Visual Studio 2010 Premium will come with 750 Azure hours initially, though this will supposedly reduce to 100 hours at a later date.

Visual Studio 2010 includes a new editor based on WPF, and users have complained of performance problems. Apparently this has been addressed, though now that beta 2 is out we will soon discover for sure.

I’ve also learned that the price of Visual Studio is increasing, by around 9%. To soften the blow, Microsoft has a special offer for those with current MSDN subscriptions when Visual Studio 2010 is released. These subscribers will get an automatic upgrade, not only to the equivalent 2010 edition, but to the one above. Thus, Professional subscribers will get Premium, and Team System subscribers will get Ultimate.

There is also an MSDN redesign, though it looks minor to me, and the most important section, the reference library, seems little changed. There is a ton of useful material on MSDN, but I still find Microsoft’s plethora of development and technical sites confusing to navigate, especially with specialist sites like Silverlight.Net offering overlapping content.

Ars technica has a handy product matrix.

Is Apple iPhone now unstoppable in the mobile platform wars?

I’ve been reflecting on a chat I had with a mobile application developer at Qt Developer Days last week. He thinks that Apple has all-but won in the battle to dominate the SmartPhone platform.

His reasoning is based on a couple of things. The first is that Apple is easily outpacing others in application availability and number of app installations. I guess there are many ways of counting this, but have a look at these figures. Handango, which has been in this game for over a decade, reported in January that it had over 140,000 apps and 100 million all-time downloads across a number of SmartPhone platforms. Apple reported this month that it has 85,000 apps and 2 billion downloads.

His second point is that Apple is one of the few companies to understand that users like consistency better than choice. “If I pick up an iPhone, my fingers know what to do,” he told me. This makes users reluctant to switch, except to another iPhone. By contrast, Nokia has a zillion different devices supposedly tailored for the needs of different customer segments, but as a result there is no sense of a consistent platform and users can easily switch away. Windows Mobile has the same problem but with multiple vendors as well as frequent design changes from each vendor.

These are points well made. If the much-rumoured Apple tablet appears, we can expect the App Store concept to extend its reach to larger devices as well. No wonder Adobe is so determined not to be left out on this platform, announcing a compiler to convert Flash applications to native iPhone code, as well as stepping up its campaign for Flash in the iPhone browser.

That said, I can think of counter-arguments. One is that iPhone isn’t yet, as far as I know, strong for corporate development. Windows Mobile has some advantages here, for Microsoft platform companies, while Java (not available on iPhone so far) is also appealing to corporate developers.

Another is that Google Android will give strong competition and take advantage of Apple’s weakness, its reluctance to abandon premium pricing.

Third, the consistency argument only goes so far. If you look at today’s iPod touch, for example, compared to the first iPods, there are huge differences. Users will in fact switch if there is convincing value in what is new.

Fourth, the more iPhone grows in importance, the more discontent over the closed nature of its platform will grow.

It is still early days for SmartPhones as a development platform; and while it is fun to speculate, things may look very different in a couple of years.

Still, let’s acknowledge that right now it is advantage Apple.

See also: What’s your choice in the mobile battleground?

and this great rant from a frustrated Symbian/Nokia developer:

Calling all Nokia & Symbian geniuses: Am I wrong?

Silverlight data, image upload example code

Some time ago I created a simple example of CRUD (Create, Retrieve, Update, Delete) in Silverlight with ASP.NET – you can view it online here. I originally posted it in April; see this post for details. Several people asked me for the code and I’ve not done so until now – mainly because of the hassle involved in making a Visual Studio solution portable as a demo. The Silverlight app was originally written in Visual Basic and I’ve now ported it to C# for convenience. The version on this site runs on Mono, but the demo code is for Visual Studio 2008 on Windows – there really is no difference apart from the database code.

One issue I had with the demo was providing a database. I wanted something easier than just providing the SQL to create a database, ideally a solution that would just open and run immediately. I tried using SQL Server Compact Edition but Microsoft has actually hard-coded something that stops you using this for an ASP.NET application and I got an exception accordingly. I’ve therefore used Access. I wouldn’t consider this for a real web app, but it is convenient for a demo.

The code is somewhat retro – no entity framework, no WCF, no LINQ – except an expression to filter the datagrid – and old-style ASP.NET Forms Authentication. It would be good to convert it to use RIA Services, which I may do if I can find the time. This may mean the code is no use to you at the moment.

Although it is a simple app and not production-ready, I found it interesting to do. Silverlight code is easy to write, but interacting with remote web services for all the content is more challenging. There are flaws – for example, I’ve not handled what happens when multiple users edit the data simultaneously.

There are a few little hacks too. For example, I have an edit form where you can upload an image. I want to have the image display as soon as it is uploaded, but found that if I try to display it in the WebClient’s OpenWriteCompleted event handler it fails; somehow the file is not quite ready to be served. I use a timer to insert a small delay.

Another issue was faking synchronous web service calls.

Anyway, I’ve now uploaded the code and you can find it here. If there is enough interest I’ll put it in a repository to make it easier to add bug-fixes and so on.

IntelliJ IDEA goes free and open source

Yesterday JetBrains announced that its core product, the IDEA IDE for Java, is becoming open source under the Apache 2.0 license. There will be a free Community Edition and a commercial edition with more features. This list of additional features not in the free edition is rather extensive, including UML class diagrams, code coverage, Android support, JSP debugging, JavaScript debugging, support for other languages such as Ruby, SQL, HTML, JavaScript, ActionScript, PHP, support for additional version control systems including Team Foundation Server, ClearCase and Perforce, and above all specific support for frameworks and technologies including Rails, Spring, EJB, Tomcat, JBoss and WebSphere, and even Adobe AIR.

In other words, the free part is the core IDE plus a few features; the commercial edition adds a lot of value for most users.

CEO Sergey Dimitriev remarks:

Open source has become the mainstream, and we continue to embrace it as an exciting challenge. In brief, we’re not changing direction — we’re moving forward.

IDEA is an excellent and popular IDE and last time I looked I found it more productive and enjoyable to use than its obvious alternative, Eclipse. I imagine that IntelliJ is hoping to strengthen the community and availability of add-ons for IDEA, as well as attracting new users.

Although this is welcome news – and I’d encourage any Java developer to try the product – it would be interesting to know more about why JebBrains is taking this step. Borland’s JBuilder was once highly successful, until the free Eclipse offering eroded its market share. Seeing how important the add-on community was in Eclipse, Borland belatedly issued a free JBuilder and sought to make it an alternative IDE platform for third parties, but by then it was too late. JBuilder was discontinued and a new product of the same name appeared in its place, built on Eclipse; it is still available but is now a niche product. I’ve not got any up-to-date figures but I’d expect JBuilder’s market share to be tiny now.

Unlike JBuilder, IDEA has remained popular despite Eclipse. Comments on stackoverflow, for example, show how well liked it is:

Eclipse was the first IDE to move me off of XEmacs. However, when my employer offered to buy me a Intellij IDEA license if I wanted one it only took 3 days with an evaluation copy to convince me to go for it.

It seems like so many small things are just nicer.

The problem is that the free Eclipse, or free NetBeans, or free Oracle JDeveloper, are good enough to get your work done, making it hard to compete; and I am not sure whether the addition of free IntelliJ IDEA to the list is a sign of strength or weakness.

My guess is that serious users will still want the commercial edition with its many additional features, so this may not be as radical a step as it first appears.

Qt goes mobile, gets bling, aims for broader appeal

Here at Qt Developer Days in Munich we’ve heard how Nokia wants to see “Qt everywhere”, and will be supporting Qt on its Maemo operating system and on Symbian, as well as adding specific support for Windows 7 and Mac OS X 10.6, “Snow Leopard”. Qt already works on Microsoft Windows Mobile, and of course on Linux which is where it all started. What about Google Android, Palm WebOS, Apple iPhone? Nothing has been promised, but there is hope that Qt will eventually work on at least some of these other systems.

So is “Qt everywhere” a realistic proposition? Here’s a few impressions from the conference. First, a bit of context. Qt is a C++ framework for cross-platform development. and although bindings for other languages exist, Nokia says it is focused on excellence in C++ rather than working with multiple languages. Developers get the advantages of both native code executables and cross-platform support, and Qt is popular on embedded systems as well as desktops and mobile devices.

Qt is an open source framework which was developed by a company called Trolltech which Nokia acquired in 2008. Its motivation, one assumes, was to simplify development for its own multiple operating systems, especially Maemo and Symbian. Still, it has also taken its responsibilities to the open source community seriously. Qt was originally available either under the GPL, which requires developers to make their own applications available under the GPL as well, or under a commercial license. This limited Qt’s take-up. In March Nokia introduced a third option, the LGPL, which is a more liberal and allows commercial development using the free license. The result, we were told, has been a 250% increase in usage (though how this is defined is uncertain) accompanied by “a small drop in revenue.”

Although the revenue decrease is troubling, it is not a disaster for Nokia whose main business is selling hardware; and if take up continues to increase I’d expect revenue to follow.

Since the Nokia acquisition, Qt has been energetically developed. 2009 has seen the release of a dedicated IDE called Qt Creator. I was interested to see a company that has chosen not to go the Eclipse route for its primary IDE, though there are plug-ins for both Eclipse and Visual Studio. The trolls explained that Eclipse came with too much baggage and they wanted something more perfectly suited to its purpose, a lean approach that is in keeping with the Qt philosophy.

Another important move is the inclusion of Webkit within the framework, the same open source HTML engine that powers Apple’s Safari, Adobe AIR, and the browser in numerous Smartphones. Webkit also comes with a Javascript engine, which Nokia is exploiting in several interesting ways.

The big deal at Qt Developer Days was another new project called Kinetic. This is comprised of four parts:

1. An animation API.

2. A state machine.

3. A graphical effects API.

4. A declarative API, currently called QML (Qt Markup Language), though this may change.

Many of these pieces, though not the last, are already present in Qt 4.6, just released in technical preview. Nokia has not announced a specific date for Kinetic, though there were mutters about “first half of 2010”.

The thinking behind Kinetic is to make it easier to support the graphical effects and transitions that users have come to expect, as well as improving the designer-developer workflow – showing that it is not only Adobe and Microsoft who are thinking about this.

QML is significant for several reasons. It is a JavaScript-like API: we were told that Nokia started out with XML but found it cumbersome, and settled on JavaScript instead. It is designed to work well with visual design tools, and Nokia has one code-named Bauhaus which will be part of Qt Creator. Finally, it allows snippets of JavaScript so that developers can create dynamic user interfaces.

At runtime, QML is rendered by a viewer widget, which can be programmatically controlled in C++ just like other Qt widgets.  

Nokia’s hope is that designers can be persuaded to work directly in the QML designer, enabling free exchange of code between designers and developers. It is a nice idea, though I doubt designers will easily transition from the more comfortable world of Photoshop and Flash. However, even if in the end QML is used more by developers than designers, it does greatly simplify the task of creating a dynamic Qt UI. Note that there is already a visual GUI designer in Qt Creator but this is geared towards static layouts.

Long term, who knows, we may see entire applications written in QML, opening up Qt to a new and broader audience.

You can see the latest Qt roadmap here.

Qt pros and cons

I was impressed that attendance here has increased – from around 500 last year to around 700 – despite the economy. Those developers I spoke to seemed to like Qt, praising the way it self-manages memory, though some find the model-view aspect too complex and apparently this is to be improved. Nokia’s stewardship and openness is appreciated and the Qt roadmap generally liked, though there is concern that its understandable focus on mobile may leave the desktop under-served.

Cross-platform capability is increasingly important, and for those who want the performance and capability of C++ along with really good Linux support – important for embedded use – Qt is a strong contender. The focus on mobile is right, not only because of Nokia’s own needs, but because demand for Smartphone apps can only increase.

Integrating with Webkit is a smart move, opening up possibilities for hybrid web/desktop applications and giving Windows developers an alternative to embedded IE with all its quirks.

The open source aspect is another strength. This is now a good selling point if you developing for certain governments (the UK is one such) or other organisations that have a bias towards open source.

That said, talk of Qt everywhere is premature. The mobile space is fractured, and without iPhone, WebOS or Android Nokia cannot claim to have a universal solution. Nor has anyone else; but I’m just back from Adobe MAX where we heard about wider support for the Flash runtime. Then again, few choose between C++ or Flash; Adobe’s runtime is pretty much off the map for attendees here.

Qt is well-established in its niche, and is in good hands. I will be interested to see whether Nokia is successful in broadening its appeal.

Incidentally, if you can get to San Francisco you can still catch Qt Developer Days as it is running there from November 2nd-4th.