Cross Platform Open Source more successful?

Following on from musings on PHP as Disruptive Technology and Why MySQL Grew So Fast, it occurs to me that what hasn’t been said yet is both are technologies that aim to be cross platform, the platform being the operating system (and the web server in PHP’s case).

More precisely, they both run well under Windows. It may be an obvious point but getting started with “dynamic duo” is almost easier on Windows than it is on *Nix, at least for a standard installation. By being open to Windows, both are exposed to a huge user base. It may be your run your live site on a LAMP but, as a developer, you can set up an environment on Windows which is close enough to that which your code will end up running under.

When you consider MySQL relative to PostgreSQL, everyone who’s ever looked knows that PostgreSQL is much more mature, in terms of it’s functionality. So why isn’t PostgreSQL the big hit MySQL is? Perhaps the #1 reason is PostgreSQL has never made it easy for Windows users.

Python is another language that runs nicely on many platforms and does a great job of making life easy for Windows users. Although it’s not (yet) as big as Perl or PHP, over the last two years it’s seen a significant growth in popularity (all it needs now is some articles on Sitepoint…). Perl, by contrast, seems to have reached it’s ceiling in terms of uptake. Outside of ActivePerl think it’s fair to say Perl puts *Nix first – perhaps that’s the problem.

Another prime example is Firefox, which you might argue actually runs best on Windows (I’ve run into bugs with some Firefox extensions, when running on Linux, that don’t happen on Windows). The signs seem to suggest the it does such a good job on Windows it’s able to convert IE users. Remains to be seen whether Firefox can make a serious dent in IE but stats seem to suggest Mozilla based browsers are the first to show steady growth in user base since IE wiped the floor with Netscape.

Of the Open Source office suites, OpenOffice is certainly the leading player, getting most air time and serious consideration. It faces stiff competition with MS Office; despite being free to use, users no doubt happily stuck in a rut. Despite that, relative to the Open Source alternatives, thinks it’s fairly safe to assume it has the largest user base.

A controversial comparison is Java’s Swing GUI library vs. SWT (the Standard Widget Toolkit developed by IBM and used to build Eclipse’s User Interface). Swing aims to be platform independent while SWT aims to be cross platform. From a theoretical perspective Swing is a better choice as it isolates you from the platform your application in running on but in practice the cost in performance overhead is high and users tend to be critical of apps that don’t look “native”. Meanwhile SWT leverages the native GUI libraries of the platform it runs on (i.e. MFC on Windows) meaning it’s fast and looks “at home” where ever it runs.

Along the same lines in wxWidgets, a C++ library that uses the same approach as SWT. Some say it’s easier to work with wxWidgets than Microsoft’s own foundation classes, the end result on Windows is the same. It’s common to see Python users saying wxPython (a Python wrapper on wxWidgets) is the best GUI library for Python.

Anyway – it’s common to see a certain elitism amongst Open Source developers, when it comes to platform. Some even say “never” to Windows. May not be the best approach if you want your project to be a success…

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Gary Robinson

    > So why isn’t PostgreSQL the big hit MySQL is? Perhaps the #1 reason is PostgreSQL >has never made it easy for Windows users.

    We tried it on solaris and abandoned it because it had a tendency to corrupt files that we did not find in MySQL. That was certainly the reason we didn’t use it in the long run.

  • KenLars99

    Swing only isolates you further from the platform if you use one of the cross-platform look and feels. The other look and feels, like Mac or XP are architecturally similar to SWT; there are native widgets under there, at least for some of the widgets.

    SWT is built on top of AWT, and AWT has the same architecture as SWT, except that AWT was done poorly and SWT was done well.

    But I like your post, I use and enjoy many cross-platform products, including Eclipse, Firefox, Thunderbird, MySQL, and OpenOffice to some extent…

  • http://www.phppatterns.com HarryF

    We tried it on solaris and abandoned it because it had a tendency to corrupt files that we did not find in MySQL. That was certainly the reason we didn’t use it in the long run.

    Now I can point out my ‘get out of jail clause’ ;) : “PostgreSQL is much more mature, in terms of it’s functionality“. Was carefully trying to avoid mentioning stability. I’d guess that MySQL is the more stable, simply by being exposed to so many more users and it also seems to be the direction MySQL AB have chosen – put performance and stability first and worry about the reset later.

    Swing only isolates you further from the platform if you use one of the cross-platform look and feels. The other look and feels, like Mac or XP are architecturally similar to SWT; there are native widgets under there, at least for some of the widgets.

    SWT is built on top of AWT, and AWT has the same architecture as SWT, except that AWT was done poorly and SWT was done well.

    Thanks for point that out. My lack of knowledge to blame.

  • John Doe

    > Now I can point out my ‘get out of jail clause’ ;) : “PostgreSQL is much more mature, in terms of it’s functionality”. Was carefully trying to avoid mentioning stability. I’d guess that MySQL is the more stable, simply by being exposed to so many more users and it also seems to be the direction MySQL AB have chosen – put performance and stability first and worry about the reset later.

    *Cringe* I just couldn’t keep to myself. Your assertion is in error. There are many many issues with MySQL stability and integrity, a fair list to be found here: http://sql-info.de/mysql/gotchas.html Multi-platform support and more prominantly the chicken and egg effect are legitimate reasons for PostgreSQL not to be popular but data integrity is not on that list.

  • David Fetter

    HarryF forgot to mention that he is an employee of MySQL AB.

  • Daniel Carrera

    Yup! I am a member of the OpenOffice.org team, and being cross-platform is a huge factor for our uses. Not only are about half of our users Windows users, but the ones that are thinking of migrating to Linux often start by figuring out by using OOo under Windows first, and then changing the OS.

    OpenOffice.org definitely has the largest user-base among open source office suites (about 20-30 million users). I have heard (can’t confirm) that it has already surpassed Corel.

    Cheers,
    Daniel.

  • http://www.phppatterns.com HarryF

    There are many many issues with MySQL stability and integrity, a fair list to be found here: http://sql-info.de/mysql/gotchas.html Multi-platform support and more prominantly the chicken and egg effect are legitimate reasons for PostgreSQL not to be popular but data integrity is not on that list.

    Fair enough. Again I’m not in position to provide anything more than guesses. From a distant but logical point of view, you’d think MySQL should have a good record for stability given the exposure it’s getting. But you’re right – will be more careful with guesses in future.

    HarryF forgot to mention that he is an employee of MySQL AB.

    ;) Actually would love to see PostgreSQL get bigger. Personally, when given the option, I ask for it over MySQL – but I don’t get the option very often. At work we use Oracle (mainly) and were forced to use MySQL for web related activities. Amongst the developers we’re fairly sure we could cut out Oracle with PostgreSQL, and save a ton of $$$ in licenses – course that doesn’t cut it with management for the usual reasons (in particular because we’d need to spend alot to save alot).

    OpenOffice.org definitely has the largest user-base among open source office suites (about 20-30 million users). I have heard (can’t confirm) that it has already surpassed Corel.

    Wow – had no idea it was getting that big. Much as stats need be regarded with a pinch of salt, would be great if more Open Source projects published those kind of figures.

  • Muhammad Alkarouri

    As always, somebody has to say ‘Firebird':)
    I would like to know what is the problem with firebird sql, apart from poor marketing (seems Borland is against it, and no big company is behind it).
    It installs well in Windows and Linux. There are even no license problems, so companies like Redhat can use them with php without conflict. It is more stable and compliant than mysql, and easier (imho) than postgresql..
    You get the point..

  • Andrew Gould

    I looked at Firebird because it was cross-platform. The advantage that PostgreSQL (my ultimate choice) and MySQL (my initial choice) have over Firebird is that the level of documentation allows average computer users to become database administrators — I am a CPA, with no formal IS training. I could not find a basic tutorial for Firebird that would walk me through the basic steps for installation, database creation, database design, table creation and basic querying. This was a couple of years ago, and may have changed.

    I run PostgreSQL databases (38GB of data) on FreeBSD. This server has had no unplanned downtime since installation (2000). I periodically move data into MySQL tables for a peer who runs MySQL on a laptop running Windows.

  • Andrew Gould

    I use Python in both FreeBSD and Windows. I even have one MS Access application that calls Python scripts.

    I hate to say it, but I enjoy using PythonWin, the editor for Python in Windows, more than the editors in *nix.

  • Adam Ashenfelter

    One reason why Mysql is more popular the Postgress…

    Licence!

    In my opinion the BSD style licence tends to lower the popularity of a project (Not alway true (ie apache), but in general).

    For one thing BSD licenced code can be taken and put in with GPL licence code, but not the other way around. So the BSD licence developer has to re-iplement the wheel more often.

    Second, Some developers don’t want to contibute their code under the BSD licence.

    Third, For a company (ie Mysql) releasing under the BSD licence can result in their code being used in commercial products that do not give back their changes. For instance, I cannot repackage Mysql with one or two enhancements of my own (to the code) without giving those enhancements to everyone. I think this is the reason Postgres hasn’t had decent replication (OPEN + Not an external app) until very recently. I’d most likly would have stuck with Postgres a lot longer if good replication had been available.

  • Andrew Gould

    Timing, ease of deployment, and recognition are significant factors in the success of Open Source projects.

    Prior to version 7.0, PostgreSQL was a slower beast. It was in this pre-7 era that MySQL gained a great deal of recognition in the acronym “LAMP” – Linux, Apache, MySQL, Perl. During this time, compared to PostgreSQL, MySQL was much faster, easier to administer and had much more support (books, forums, etc) for web integration. Although many Linux distributions included both MySQL and PostgreSQL, most of these distributions had Apache and PHP support for MySQL only. Users had to recompile PHP for PostgreSQL support. Most of MySQL’s large user base have no reason to change.

    Another factor in a project’s relative success is the popularity of its appropriate use. For example, MySQL is a very popular and appropriate tool for web sites; and web development is a very popular activity. It’s easy to perceive MySQL’s success. Development of accounting applications, for example, is not a popular activity; but it’s here that you’ll see PostgreSQL more often than MySQL (my anecdotal perception). One reason for this is that PostgreSQL was ACID compliant before MySQL –> again, the importance of timing to market share.

    A third factor that should not be dismissed is online support for a project. Web help forums and email lists are critical to getting newbies past the first hurdles of deployment. In the example of MySQL vs PostgreSQL that I’ve been discussing; I have nothing but glowing remarks regarding the email list support. Both communities offer quick, friendly support (again, based upon my anecdotal experience).

  • Ka-Hing Cheung

    “Swing only isolates you further from the platform if you use one of the cross-platform look and feels. The other look and feels, like Mac or XP are architecturally similar to SWT; there are native widgets under there, at least for some of the widgets.”

    Not really. On XP it uses emulated look and feel. It does NOT use native widgets, besides the windows. On Linux it also uses emulated look and feel. Apple may be using native widgets for their OS X runtime (which is licensed from SUN, and includes their modifications).

    “SWT is built on top of AWT, and AWT has the same architecture as SWT, except that AWT was done poorly and SWT was done well.”

    I am not too familiar with SWT, so I don’t know how it is “built on top of AWT”. I have a feeling that it probably doesn’t use AWT’s native peers.

  • Ka-Hing Cheung

    It didn’t seem to post it the first time, let me try again…

    “Swing only isolates you further from the platform if you use one of the cross-platform look and feels. The other look and feels, like Mac or XP are architecturally similar to SWT; there are native widgets under there, at least for some of the widgets.”

    Not really. SUN’s VM on Windows XP does not use native widgets other than the window. The reason why it looks like XP widgets is that it emulates it by drawing the widgets _like_ how XP does it. “Like” is emphased because in some cases it’s easy to tell the difference.

    On OS X, Apple maybe using native widgets, I am not sure.

    “SWT is built on top of AWT, and AWT has the same architecture as SWT, except that AWT was done poorly and SWT was done well.”

    I don’t know too much about SWT, so I don’t know how it’s built on top of AWT, I have a feeling that it probably doesn’t use AWT’s native peer though, so it’s probably even less “built on top of AWT” than Swing.

    Now comment on the article itself. It is true that a functional windows port make Open Source projects have more users, but is # of users a good measurement of successfulness? For gaim (which I am a contributor of), there are many windows users after the port has been released, however, people who contribute code (as well as decent bug reports) still mostly come from *nix.

  • http://www.phppatterns.com HarryF

    It is true that a functional windows port make Open Source projects have more users, but is # of users a good measurement of successfulness? For gaim (which I am a contributor of), there are many windows users after the port has been released, however, people who contribute code (as well as decent bug reports) still mostly come from *nix.

    Good point and agree large numbers of users doesn’t necessarily mean a successful project. In PHP you used to see core developers wishing there were more people contributing to the foundations – things seem to have got a little better recently but I’d guess (here we go again) Perl (definately) and Python still have more people adding things in C than PHP does.

  • Andz

    Learn SQL under the more friendly MySQL environment first and then move to Firebird (and its professional SQL features) when you’ve become more confident.

  • Mark Wilson

    Firebird is excellent. It is mature (branched off from Borland’s Interbase). One feature that these other databases do not have (MySql, PostgreSQL) is that it is also deployable as “embedded” – that is, a zero-configuration client database residing with the client application. The embedded version has full transact-sql functionality. It has allowed me to write briefcase-type client applications where connections to the server applications are flaky (such as when deployed over the internet). When the client gets back into a better connection, the embedded database data can naturally update the server database without conversion because Firebird comes in both embedded and server versions. Furthermore, the full transact-sql features of the embedded database has made it possible to do complex data manipulations on the client when the client is disconnected.

    I wrote my app with wxPython 2.4 and Python 2.3, and compiled it into an executable in Windows using py2exe. Furthermore, because it was written in Python, part of the application calls COM Automation objects to launch Excel and manipulate the spreadsheet with Python data.

    Python is the future of the open source world.

  • Betcour

    “There are many many issues with MySQL stability and integrity, a fair list to be found here: http://sql-info.de/mysql/gotchas.html

    I think you are confusing stability and integrity. It’s true that MySQL doesn’t enforce integrity as strongly as Postgresql. Stability however is measured as “how often does the database crash” and “how often do my datas get completely lost beyond recovery”. In the stability department, MySQL is pretty good (at least from my 4 years experience running it on busy sites).

  • Anonymous

    “SWT is built on top of AWT, and AWT has the same architecture as SWT, except that AWT was done poorly and SWT was done well.”

    SWT was built from the ground up and does run atop AWT.

    http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/main.html#efficient

  • brian

    AMEN to this article. I found this while searching for cross-platform software links to add to my website. Not only does this sort of development include Windows users–it has the best chance of converting them to other operating systems.

    Just think of how many (less) windows users there would be if Word, Excel, IE and Outlook were waiting for them with a Penguin logo on the box.

    If windows users learn cross-platform alternatives on a windows box–it won’t be hard to get them to use the same apps on a different box.