Archive

Posts Tagged ‘gtk’

Microsoft and Mono

February 21st, 2009

The Linux Outlaws Podcast recently (in ep. #75) had an interview with Miguel de Icaza on the topic of Mono. Since this is often a heated topic among Linux hackers, I figured I’d chime in with my two cents.

Miguel is well know in Linux land, having started the GNOME desktop and countless other desktop applications for Linux. He’s done more for Linux in the past decade than most (including myself) will ever dream of doing, so critiquing such a leader can’t be done lightly.

Miguel unfortunately started out as a typical C-only guy who looked on C++ as large and useless. For years with GNOME he and application developers (myself included) slaved away using the C-based GTK+ library to make graphical applications. Man-centuries were wasted dealing with cumbersome C and its unforgiving API style. C++ was ignored, almost laughed at, despite the fact commercial C++ GUI libraries have been the norm. To this day, GTK+ is still an utter failure with respect to commercial application adoption.

Eventually, even Miguel realized that C was not the language for desktop application development as it was hurting GTK+ adoption. Rather than embrace C++, he threw out the baby with the bath water and embraced C# itself for GNOME application development with the Mono project.

The Mono project is an open source implementation of Microsoft’s C# language and runtime for Linux and other operating systems. Although one goal of this project is very honourable (allowing custom/vertical/boring applications from Windows-centric shops to be usable under Linux), I think in general Microsoft is making a sucker out of the Mono developers and users, and here’s why:

Microsoft was once an innovative, competitive company. That however, was along time ago. They’re now a convicted monopoly who still to this day function primary to lock people into their various technologies. I don’t want to sound like a typical “Microsoft is evil” parrot but this is what a monopoly does. I can’t fault them for it, but let’s not be naive. I can spend a blog post alone on Microsoft’s various transgressions, but for now I’ll simply rat off areas which they really like to maintain their monopoly lock-ins: file servers/smb, office formats, web browsers/ActiveX, web browsers/IE stagnation, media formats/codecs, flash/Silverlight. Heck, I can’t even access my company’s MS Exchange web interface in Firefox without getting a substandard interface to email. They can’t (well, don’t want to) even make a website without trying to lock-in you into Internet Explorer on Windows.

Microsoft is not stupid and understands that platforms are really about capturing and holding developer mind share. Java and similar truly multi-platform technologies that they didn’t control was viewed as a huge threat to the Windows empire. So Microsoft “embraced and extended” Java-principles, gave it a new name (C#) and injected a boat load of Windows-specific stuff into it. We can debate the finer differences between the languages until the cows come home, but fundamentally, at their core, they’re identical languages, except that C# isn’t multi-platform and is very Windows-centric. By the way, Adobe’s flash/Actionscript is the next threat and target after Java, so look out for a serious assault on that front from Silverlight.

Given this, it’s easy to see why Microsoft likes the Mono project. They get to pretend C# is multi-platform (“see, we’re not a monopoly!”) and friendly towards Linux and open source, but they don’t have to devote any of their own resources to it. Furthermore, Mono on Linux will never be a first class citizen (like in Java) and will always be a version or three behind, lacking in proprietary features. To get the “true” C# experience you’ll still be sold a Windows system. Microsoft gets to point to Mono and claim that C# is multi-platform, but will then tell you you must run their version on Windows to get the true, modern and full experience. This basically relegates Mono to (using the colloquial term) being Microsoft’s bitch.

Although I used to code a lot of Java, I’m not really a Java proponent. But honestly, if the Linux desktop needs a garbage-collected, byte code-interpreted, type safe and object-oriented language, then Java is hard to beat. Decade or two of testing, mature IDEs, plethora of libraries and truly multi-platform (first class citizenship for Linux) and now open source (I hear?) are all features that would be stupid to ignore. But for some reason, Novell decides to chase Microsoft’s ever changing specs while having to rebuild everything from the ground up.

Miguel ends off the interview with what I think is a little Stockholm syndrome. He says that most people unfairly demonize Microsoft, ignoring the specific points (like the above) those people make. Heck, he excuses Balmer’s public demonization of Linux as the spouting of a sales man, ignoring the fact that this is the CEO of the big ship Microsoft. One simply needs to use non-Microsoft operating systems and applications in a Microsoft-based shop to truly understand the breadth and effect of their monopolistic lock-in.

But alas, I realize that there are other factors here in Novell’s decision to fund Mono. Novell is scrambling for money and business opportunities, looking for any edge against Red Hat, even if that means dancing with the monopoly Microsoft. Although you can’t fault Novell for doing what they think is in their best business interests, let’s not get delusional into thinking Mono is on some level playing field with Microsoft.

Alex, General , , ,

Qt goes LGPL!

February 4th, 2009

In about a month, Nokia, owners of Troll Tech, makers of the Qt widget library will release Qt 4.5 under the LGPL license. In a web centric world desktop application programming may seem unhip and uninteresting but rest assured, this is huge news, especially for desktop app developers and potentially mobile app developers (Nokia’s primary intent here is to build a platform, after all).

Qt, for those that don’t know is a very nice, well polished, comprehensive graphical application building toolkit. It’s a complete C++ toolkit done right: multi-platform, easy to use and well thought out. It shows to the Java/C#/etc crowd that C++ development can be fun again, it just needed a unified, nice and easy to use “standard library” that covers ALL of the things developers want to do, on all platforms. The C++ “Standard Library” only covers the most basic of things, like strings and files, leaving the C++ developer to go hunt down other libraries to fill in that last 90%.

Prior to the LGPL version, you had to use either the GPL version (requiring your software to be also under the GPL, i.e. free) or you had to buy some commercial licenses, that aren’t cheap (a few thousand dollars, usually). The LGPL basically lets you have your cake and eat it too: use the free downloadable library to make applications under any license, for free. This will undoubtedly destroy Troll Tech’s income, but the mothership (Nokia) views this as a cheap sacrifice, if it gets them developer mindshare.

As a Linux (well really, multi-platform) desktop app developer, this is a godsend.

Unless you were willing to cough up the dough for the expensive commercial Qt licenses, you where left with few choices, each with their own downsides:

GTK+: poor support under Windows, missing lots of mature features, verbose/cumbersome API and worst off all: it’s a C library. Now, I know it’s cool to hate on C++, especially from people who don’t know the language (especially C programmers who’ve just dipped their toes in the language), but C++ is still the best way to write compiled-to-native code across multiple platforms with full performance. Period. Full stop. GTK+ programming tends to be so tedious, that everyone seems to do their own light C++ wrappers around the core classes, which has to tell you something. Heck, the GNOME desktop people are trying to push Mono (i.e. C# & GTK) as the new solution, because even they admit C & GTK+ is too messy. For the record, even though I like and use the GNOME desktop, the developer side of me hates the GTK+ library API.

GTK- -: a C++ wrapper around GTK+. Good idea, but it’s still cumbersome under Windows and dealing with a framework around another framework is frought with issues. It’s also not that popular, leading to less community support, application examples, testing, etc. You don’t want to commit your large application to a toolkit that isn’t supported, well tested, etc.

FLTK: never used it personally, but it seems small (in community and support), similar to GTK- -.

wxWidgets: After getting fed up with GTK+, I moved to wxWidgets. wxWidgets is a decent library, that seems to work for the most part with a few rough edges, nothing that can’t be worked around. These rough edges, a few missing features (database support, for example) and slower development progress is all simply a result of it being a fully volunteer effort. It’s a great library, and I’d still be using it if Qt wasn’t going LGPL.

So to sum up, Qt is awesome. It’s multi-platform, well documented, wildly adopted, broad in features and is joy to use. LGPL licensing will boost the quality and quantity of apps on the Linux desktop: by lowering the barrier to entry and by ported applications coming from Windows. Windows application developers will now be enticed with a free toolkit, which they can then later use to quickly bring their applications to Linux or Mac OS X. Finally, this same API can be used on mobile phones, making Nokia’s dream of “Qt Everywhere” come true.

Alex, General , , ,