19 Sep 2000 aaronl   » (Master)

I've been ranting a lot recently, so here's another one to go along with them.

iain said he wanted to turn Gnapster into a bonobo component.

So I'd like to rant about component systems. Note that when I refer to "Bonobo" I am talking about component systems in general. This particular rant is about software design philosophy, not gnome-bashing.

Component systems blur the boundries of what is one application and what is another. This would be nice if it could be put to good use. But the fact is that the only thing it is good for is bloat. Once an application supports Bonobo or a similar library, it can do anything. As proven by Nautilus, it can browse the web, manage files, play MP3's, view images, launch progams.... I'm not saying that that code could be writen to make them do these things, as is the situation with Emacs, I'm saying that they can do them. By design. So, the application has no clear purpose. Well, except Nautilus. Nautilus' purpose is to do everything. But what about all other applications? Is there no need for new programs?

Let's assume for now that it is a good thing to abolish applications and only write new components. These would all run inside a huge mega-application like Nautilus. Doesn't this defeat the purpose of having a multitasking operating system? What if Nautilus crashes? What if Nautilus' UI doesn't match what would be needed for a specific application? In a classic X window-system display, you can run Gnome applications, KDE applications, Motif applications, etc etc. These might look and/or act a bit differently. But if we were to abandon applications and move to a component-based model, you would need one mega-app for gnome components, one mega-app for KDE components, etc... And then traditional X applications would look out-of-place.

My biggest gripe about component architecture is that I just don't understand when it would ever be needed. What are the shortcomings of a gtk widget in a shared library that Bonobo addresses? Mozilla, XEmacs, and other applications have sucessfully been embedded using GtkWidgets. I can understand why embedding might be nice in some circumstances, but I don't see why everything should become a component rather than a chuck of code in a library that the application using it calls directly.

Bonobo sounds like ActiveX: something that could embed parts of an application in a way that would be inferior to just running the application directly.

Bonobo does not sound like Emacs: A powerful, exstensible application that is oriented to a specific set of jobs. Emacs is for text editing and processing. Emacs cannot browse the web. Sure, you can write code that will let you browse the web in Emacs (and such code has been writen), but this actually has to be implemented inside Emacs. With a component system, your text editor can become a web browser if a component for web browsing is installed on the system. Say, for a real web browser to use. Now, instead of the code being in the web browser, it's in a component that can be used by any application.

I am definetely not anti-functionality, but I can't for the life of me see any reason why I would want to browse the web inside my word processor. It would be a neat hack, but in a realistic sense it is stupid. If I wanted to browse the web, I would lanuch my web browser. I would keep functionality seperated cleanly. So, flexibility is good, but I weigh the pros against the cons of every individual situation. And when there are no pros, the answer is usually very simple to arive at: the flexibility of this particular thing has no purpose, and therefore sucks.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!