Development Platform
I’m afraid I have a confession to make. A couple of weeks ago, I purchased an iPhone. And to make matters worse, I’m wonderfully happy with it.
Now, I know that I should have got something more compatible with the community that I’m a member of. Maybe one of those OpenMoko powered Neo FreeRunner devices or even an Ubuntu Mobile powered prototype device.
But an iPhone it was. Why?
Well, frankly I needed something that works today.
The iPhone is a fascinating device. Don’t worry, I’m not going to go on about its features and all of its bling. What fascinates me is how easily Apple brought it to market, and now that the App Store is up and running, how quickly native applications are being written for it.
The most breath-taking thing is that this device is effectively running a version of Mac OS X ported to the ARM processor, and with any unnecessary bits for the smaller platform removed. The graphics, audio and other core libraries are basically the same as on the bigger brother computers.
In other words, Apple have done what Linux always promised; turned Darwin into a truly scalable platform.
What’s more, the pace at which new applications have been developed for it shows that this platform is easy to write for. My phone has rich, native applications for Twitter, Facebook, Flickr and Google; none of which came pre-installed.
I have a theory about how they’ve managed to scale their platform so quickly down to a size that fits in my pocket whilst also running on a machine that barely fits on my desk. The same theory explains why developers have been so quick to develop applications for it.
It’s not that their platform is better, or more capable, or even necessarily more flexible.
It’s that their platform is better componentised.
The core technologies of their platform are grouped into easy to understand components. It’s easy to draw boxes that show how these stack up to provide functionality to the developers, and it’s easy to see which boxes you can remove when scaling the platform down. Documentation is easier to write too, each component has a specific function and tech writers can turn that into a story and write simple to understand overviews and rich API documentation.
Audio playback is a great example here.
In Linux, you want to play sounds from your application, so you have a quick hunt around for Linux audio APIs. Your resulting list looks something like this:
- libcanberra - “a simple abstract interface for playing event sounds”
- gnome-sound - “Sound playing routines”
- GStreamer - “Media framework”
- PulseAudio - “Sound Server”
- ESD - “Enlightened Sound Daemon”
- libasound2 - “ALSA library”
- ALSA - “Advanced Linux Sound Architecture”
And those are just the libraries and daemons installed by default, and I didn’t even include the format libraries such as libogg. If I were to include those, and the various other sound daemons, mixers and framework libraries (hello, Phonon), we’d be here all night.
Where is an application developer actually supposed to start?
Even I have no real idea where GStreamer, PulseAudio and ALSA begin and end; and where they overlap and contradict each other, which I’m supposed to use.
Apple developers have it much easier. If you want to do anything with audio, you want Core Audio.
If I were to try and do something more interesting, like putting things on the screen, a somewhat common requirement for GUI applications, I’d have to read up on Clutter, Pigment, GTK+, GDK, Cairo, Pango, FreeType, Xft and X11. At least.
An analogy can be drawn with Lego.
When I was a young kid, if I wanted to make cars to sit on the roads around my lego town, you used to have to build them from scratch. I didn’t really care about lego cars, but the town looked silly without them, so it was a chore.
The chassis for each car was the same. A 1×4 flat at each end for the bumpers, with a 2×4 end on in the middle to make the wheel arches. These were joined by a 4×4 to make the car floor. (Sadly I couldn’t find any images on Google).
You had to know how to do it, but when you did there was a certain pride in being able to build a car from memory and knowing how all the pieces fit together. If you cared about cars, anyway.
Then an amazing thing occurred. Lego released a new car, and in the box was a single piece that made the chassis. No more mucking around and searching for lost bits, or realising you’d built it upside down. Now you could instead spend more time deciding what colour the body and windows would be, or if you really didn’t care, spend more time on the houses and other buildings that were more fun to build.
If the single piece wasn’t right, nothing stopped you building your own custom chassis, but it was a great time-saver. Nowadays they probably have a box where a complete car rolls out, but that’s ok too. Those are the boxes for people who really don’t care about cars, but understand that they need them to fill the multi-storey car park. They do other boxes with a thousand pieces to build a single car for those people who like making cars. Those are neat, the engines look like they’re working and everything!
Apple’s approach is somewhat like this. Their APIs are grouped into big components that you can quickly get to grips with, and spend your time on the interesting bits of the application. Linux’s API stack is more like a box of bits, you have to know how to fit them together and build the chassis before you start.
The only people that really delight in the differences between GTK+, GDK, Cairo and X11 are the authors of those particular parts of the platforms. The rest of us really wish we just had a single piece marked “InterfaceKit” that we could use.






Zyga:
So true and so sad at the same time. This is one of a really good examples that illustrate how choice is a bad thing. Seeing choice only as a good thing has lead to the huge complicated, antiquated and messy fracture that is the Linux-as-a-platform.
11 August 2008, 8:25 ampinaraf:
> The rest of us really wish we just had a single piece marked “InterfaceKit” that we could use.
11 August 2008, 8:27 amIt’s called Qt.
Wirelizard:
Bracing for outraged *nix geeks mixed with Apple fanbois in… five… four… three… two…
11 August 2008, 8:39 amLure:
This is why Nokia bought Trolltech, as Qt is this kind of “InterfaceKit” that you could use. And yes, Phonon (= sound) is part of it.
11 August 2008, 9:04 amdave:
Speaking as an Apple and Mac fan, I’m not entirely convinced. Quote: “If you want to do anything with audio, you want Core Audio.” My immediate thought was “What about Quicktime?” And indeed if you follow that link you provide, the very first paragraph lists for use in various situations:
* Core MIDI
* OpenAL
* Quicktime
* Audio Hardware Abstraction Layer
* I/O Kit
Just from reading the names I have no idea when you’d want I/O versus Audio HAL, and you can’t guarantee that both wouldn’t overlap to some extent as I’m pretty sure Quicktime used to be the home for MIDI and various other interactive audio things, not just “audio in the context of video” as it states on that page. Most of these “Core” things are new developments and may not cover everything you need to do (yet) causing you to fall back on legacy API’s. I’m not even sure if the whole of Quicktime is accessible via Cocoa rather than Carbon or whether that’s a goal for the ambitious Quicktime X rewrite that aims to lose some of the cruft they’ve built up over the years.
In the writing to the screen section there are similar overlapping APIs such as ATSUI and MLTE.
When a single, fairly narrowly focused company has so many conflicting, overlapping and deprecated APIs I think it’s unfair to expect Linux to be even better.
11 August 2008, 10:57 amChris Jones:
Hey Scott.
I too picked up an iPhone because I wanted a decent web experience in my pocket RightNow.
I kinda agree about the standardisation, but we (where “we” means the whole FOSS community) can’t really do that because nobody is driving it from the top, and competition could be argued to be driving some progress.
However, that’s not to say that individual distros could drive these things. Sure it’s nice that Ubuntu ships with thousands of things in its repositories, but for most people that’s just a number in a spec sheet. We already make hard choices to limit what is available in the default install (partly for size reasons I grant you, but consistency and duplication are factors too afaics).
We could go further and bless a core set of libraries/technologies and actively discourage use of things which don’t meet those.
I expect ISV partners would appreciate it, system integrators probably would too, but our traditional base would utterly hate it. The question is, does that matter if the future is an agile platform like Darwin? It’s entirely possible that netbook/MID versions of Ubuntu will significantly outnumber desktop versions in a few years, at which point the issues you outline become hugely more significant.
I’m all up for it, I’d rather alienate some ex-Debian users who really only like Ubuntu because it’s like Debian, but more relevant, than risk losing the future markets that personal computing is moving into, by pandering to the past.
Or, perhaps our purchasing of iPhones means that we’ve sold out too much and our opinions are tainted
11 August 2008, 11:14 amLucian:
You have a point, that’s why I love Qt.
11 August 2008, 11:24 amMikkel Kamstrup Erlandsen:
Amen brother. Amen.
This is exactly the point I’ve also been banging on about in my blog a few times. Gnome feels like a collection of libraries, not a professional development platform. The bad thing is that I don’t think Gnome 3.0 will change this…
11 August 2008, 12:06 pmColin Walters:
The iPhone is successful simply because Apple has a ton of engineers and a lot of good designers. I mean, it was clearly successful even before anyone had written applications, so…
By the nature of the Free Software community we’re always going to have a plethora of tools; the community is driven both by companies interested in pushing their development tools and by various organic sources with no strong central direction.
11 August 2008, 12:33 pmScott:
Too bad the iphone app store is broken by design by using DRM. Still, even, maemo ‘works’ today and doesn’t really need special rich apps because its got a real web browser on board. I’m using a tablet alongside a blackberry phone, since blackberry (at least the one I have) doesn’t restrict who can develop for its platform like Apple does. I’ve got apps for flickr, facebook, gtalk, gmail, etc. I’m not really impressed with the twitter client, but thats OK, because I prefer twitter IM (if they’d ever fix it).
Still, accepting a device that requires signed code from a single party is exactly what many have attempted to avoid from Redmond, and instead we got it from Cupertino and people are taking it hook-line-sinker.
11 August 2008, 1:58 pmTom:
I love my HTC Diamond. Opera 9.5 is as good Safari and I have twice as many Pixels on a smaller Phone.
Comparision:
Hardware has way more features and is more advanced ( only drawbacks are the pressure sensitive touch screen and “only” 4 GB of space )
Software is in places on par, but mostly it is worse.
BUT it is cheaper and way more open. I _am allowed_ to change and relace nearly every part of the OS and I can open nearly all content I can find. No DRM/lockdown hell.
AND the hardware will probably run Android really soon after it is released ( whenever that will happen )
Conclusion: Way better (RIGHT_NOW) choice for FOSS person.
11 August 2008, 2:54 pmrawsausage:
Although QT is technically sufficient, there has been so far in its history no good looking and usable gui built with it. It seems to attract people with certain mindset, which produces awesome amounts of plain brainfarts. So, no, QT is not the answer.
11 August 2008, 3:12 pmTobias:
Here you can find the Lego image:
http://www.peeron.com/scans/1496-1/2
I hope it’s the right on.
11 August 2008, 3:27 pmdanw:
> Still, accepting a device that requires signed code from a single party is exactly what many have attempted to avoid from Redmond, and instead we got it from Cupertino and people are taking it hook-line-sinker.
This is because people weren’t actually avoiding WinCE-based devices on ideological grounds. They were avoiding them because WinCE-based devices suck. (Or perhaps more charitably, “because they are optimized for Somebody Else’s Use Case”.)
11 August 2008, 3:42 pmScott James Remnant:
@Tobias: That’s exactly what I was looking for
It seems I remember it being a bit simpler than I thought, only adding to my point, really
11 August 2008, 5:19 pmDarwin OS:
I prefer to be a Prisoner in a big city, than free in a Desert! - it’s the difference between OPenmoko and other FOSS Mobile Platform und Apple’s iPhone!
11 August 2008, 5:43 pmVadim P.:
Well of course, you get much better results when you have absolute control.
No time wasted on arguing etc.
11 August 2008, 6:43 pmMikael Hermansson:
I just bought and Nokia E71 with SymbianOS S60 series which is OpenSource too
Also S60 supports Python
Hopefully I get it tomorrow or Wednesday soo its Chrismas for me already
11 August 2008, 7:23 pmWayne:
I’ll say Amen to this as well. I wish that Ubuntu will take the lead here. If that hurts some people, well so be it. The future of Linux is at stake. Linux can have a very bright future but it lacks strong leadership.
11 August 2008, 7:32 pmJanne:
“Too bad the iphone app store is broken by design by using DRM.”
And guess what? Most people don’t care. What they see is that on the iPhone you can install lots of kick-ass apps very, very easily, while on similar (that don’t really even exist) Linux-devises it’s nowhere near as smooth. If you at that moment started telling those people that “but the iPhone-approach is broken by design!”, you would just get lots of blank stares. They would be thinking “so, the iPhone is easy to use and the apps are great and easy to install, and it’s supposedly “broken”, whereas this other unsexy device that is nowhere near as smooth and polished is not broken? Huh?”.
I’m sorry, but that’s the way it works. And I think that the DRM in the Appstore is there because large part of those apps are sold for profit. The developers of those for-profit-apps would consider Apple to be irrespionsible if they didn’t try to prevent unlimited copying of apps.
11 August 2008, 7:37 pmArpad Borsos:
I have been thinking about this problem a lot, which is really typical to OSS.
The community really needs to embrace the following sentence: Cooperation instead of competition! Too much choice leads to confusion. And creating “yet another” software or library is not helping. At least not if it is not finished or not used by anyone.
Take another example: init replacements. Everybody has been saying the same thing over and over again: sysvinit is broken and obsolete. And there are a dozen of replacements for it, but none is really fixing the problem. Ubuntu has introduced upstart but it was never used to its full potential since the 2 (?) years it is included.
Everybody is doing his own thing, but no one really succeeds because the only way to succeed is to work together on a single peace of software!
As others already said: There needs to be someone driving from the top. But of course, the people need to follow instead of going on to do their own thing.
Another thing that Apple does really well is abandoning deprecated APIs. As someone who is willing to work on OSS, I am too much deterred by code that is obfuscated with configures and ifdefs which are only there to support systems that noone uses or have been abandoned for years.
11 August 2008, 9:11 pmLSD & LF:
This is what LSD & the Linux Foundation are supposed to be working to fix… maybe you should consider joining them since you clearly understand this.
11 August 2008, 9:36 pmUbuntu@MacVillage » Gedanken zum iPhone:
[...] Ubuntu-Entwickler Scott James Remnant hat seine eigene Theorie aufgestellt, warum das geschlossene AppStore-Ökosystem so erfolgreich ist und sich dermaßen [...]
11 August 2008, 9:56 pmjldugger:
I won’t criticize the decision to buy an iPhone — openMoko is far from ready, as you can see from their major bugs list. Hint: you shouldn’t call it a phone if you can’t reliably make calls.
But I will say this: there are a number of people who disliked the transition away from basic blocks to custom molding that only worked for a specific purpose. Enough so that they’ve announced they’re returning to the old style with fewer one-purpose parts.
11 August 2008, 10:24 pmLunarcloud:
So what you really want is a small device running KDE4.
CoreAudio =~ Phonon
Seriously, the pillars:
12 August 2008, 12:22 amPlasma, Solid, Phonon, Decibel, (Oxygen)
Michael Krog:
Spot on!
I dont think is Linux is ever gonna make it big on Desktop, unless some kind of preffered interface for
developers is promoted.
Im a Java-, Python- and C developer, and I find it so easy to get around Java(even though it
has drawbacks), because the path has been laid with an included API. Sure, I can use other API’s than
the included ones if I like it better, but if I use the included ones it seems easier to get started.
Plus a big userbase on ONE API seems to enchance quality and documentation on that lib.
I stopped using Gnome libs for the same reason - plus the reason that I dont like the Gnome API.
12 August 2008, 9:54 amThe next C/C++ or python project I come along is absolutely gonna use QT.
M.S.:
Nice post which kind of stripes the issues developers are faced with. To add another example, the guys writing the Linux Flash plugin at Adobe have also complained about these kind of things.
It is good developers have so much choice on Linux, however I would clearly state that it is the responsibility of projects like GNOME (or KDE) to make bring the clutter together into a defined streamlined experience for developers and users. Sure FD, LSD and LF also have this responsibility, although I think they don’t have the “power” to introduce the changes as the main desktop projects have.
12 August 2008, 11:25 amAnon:
Also see Mike Melanson’s Welcome to the [Linux sound] jungle.
12 August 2008, 7:04 pmJohannes Jensen:
Nice post - you bring up some very good points about development on the Linux platform today. An important read for any OSS developer!
12 August 2008, 11:51 pmJeff Bailey:
Hmm. Don’t they run on Mach? Perhaps this means that it’s time to do a Hurd port to the iPhone…
14 August 2008, 2:03 pmTroy’s Weblog » Another ubuntu member talks about his iPhone:
[...] across this post today (I know it’s probably a week or two old) from a ubuntu member who talks about the [...]
17 August 2008, 6:37 pmIan MacQueen:
While at a wine tasting the other week I met several travelers from South Africa (I live in the United States). Without bloating the anecdote, I’ll just convey that our conversation went something like this: wine –> grapes from South Africa –> the sense of smell –> artificial “smell” –> artificial intelligence –> software –> Ubuntu. The word ubuntu used as a name for software was immediately taken as an insult; however, after some effort of my explaining the philosophies of fsf, gnu, opensource, etc. combined with their attempts to strengthen my understanding of the term, we agreed that Ubuntu (the OS) has potential ubuntu.
Apple–as demonstrated through the iPhone–has lost its ubuntu.
As to the developmental aspects and out-of-the-box capability you speak of, sure — there are good lessons to be learned.
20 August 2008, 6:12 pmHamish:
Hey guys…
26 August 2008, 3:43 amWhat about programming with something like JAVA, Realbasic, MONO, Runtime revolution or GAMBAS (I’m sure there are many others)? Programming “in a box” would seem to solve this issue? I know it’s cheating but it seems to be an awfully simple solution to an awfully complex problem? Thoughts?
Tom:
>The rest of us really wish we just had a single piece marked “InterfaceKit” that we could use.
I choose to develop with Qt for a reason.
28 August 2008, 6:17 pmThis is it.
Blog::new » Blog Archive » iPhone vs. Openmoko:
[...] WiFi, I can ssh to it now”. At the same time, by some strange coincidence, I came across this blog post linked from the Linux Hater’s Blog (which I wholeheartedly recommend - so far I’ve yet [...]
28 August 2008, 8:27 pmRandom Guy:
“What about programming with something like JAVA, Realbasic, MONO, Runtime revolution or GAMBAS (I’m sure there are many others)?”
You know, every self-respecting Linux programmer hates Java. Vocally. That made kind of sense back when Java was proprietary, but now that Java has been open-sourced there is little reason left to bash it.
Java would mostly solve the sound API issue, for example. Application developers would use Java sound API. OpenJDK/IcedTea would then translate these API calls to ALSA/libcanberra/libwhatever calls. If Linux audio developers some day decide that libghettoblaster was a bad idea and decide to move to libfatlady, only OpenJDK would need to be fixed - not every Java app ever written.
Since it’s not healthy to hold one’s breath waiting for GTK and Qt to merge (or either of them to die), the next best thing would be to promote Java as the common development platform for Linux. Gnome fans would code native GTK apps, KDE fans would code native Qt apps and the rest of the world would code Java apps.
Java has millions of developers, extensive standard libraries, cross-platform support and modern, full-featured open-source IDEs. Now that it’s open source, it would be epic fail to not make it a first-class Linux citizen.
28 August 2008, 10:52 pm