Tim,
As a former Linux user, I see one main ingredient missing in the Open Source world. That is components. What is needed on Linux is a component standard and development tools that are as easy to use as COM & Microsoft Visual Studio. Anyone serious about moving Open Source forward should become very familiar with COM / ActiveX, as well as CORBA / JavaBeans. As a developer I like the idea of every application exposing an object model so that I can embed it in my application or automate it. The whole idea behind Office 2000, IE5, ASP, & everything else that Microsoft is doing lately is making Unix shell scripting look like ancient technology. I don't care if TCL/TK, Perl, or Java is used instead of VBA / VBScript, I just want scriptable applications and components.
At this point on my web site at http://www.componentsnotebook.com/, the focus is COM, but my real interest is component development. As soon as I see Open Source and Linux moving in this direction I will include that on my web page. For now I will see about adding the rest of the O'Reilly Windows books to my site.
-- Bill
Bill,
Looks like you jumped ship a little too soon! Like Windows, the Linux world is moving towards a component model. That's one of the major points of Gnome (the GNu Object Model Environment), which provides a way of scripting objects through Corba. The Gnome Corba request broker is called Orbit.
Steve Figgins from our tech support department (one of the guys who answers mail sent to bookquestions@oreilly.com) points out that there is some work going on with visual development as well. For example, he says, "VDKBuilder is a GPL'd rapid development tool using the C++ wrapper to GTK, the graphic toolkit Gnome uses. There is also work being done on a port of the Speedsoft Sibyl IDE - a visual Pascal tool originally developed for OS/2."
You can find some information on these developments in the May/June 1999 issue of Visual Developer Magazine.
Paula Ferguson, our chief web books editor, also pointed out that the Mozilla project is working on something called XPCOM. She said: "As I understand it, XPCOM is a lightweight, cross-platform COM-like system where the components are implemented in C++. (See http://www.mozilla.org/projects/xpcom/) There's also a related project called XPConnect, which allows JavaScript calls to XPCOM objects."
Not to be left out, Mike Loukides, our chief Java editor, pointed out that you can script JavaBeans and Enterprise Java Beans with JPython, the Java-Python scripting interface. While Java is not Open Source, it is an important platform technology, and one that you have at least as good a chance to work with from the Linux side as from Windows! Now that Microsoft is turning away from Java, chances are good that you'll find Linux a more congenial development environment for Java than Windows.
(In that regard, I should also point out that at the recent JavaOne conference, JavaSoft announced that they were contributing the Java Servlet classes and the Java Server Pages API to the Apache project. Sun is definitely reaching out to the Open Source community!)
I'd also like to point out that as Microsoft exposes their object model, and as it is documented clearly (as we're doing in a series of forthcoming books from O'Reilly), the Microsoft objects themselves are increasingly accessible to Open Source scripting tools. Perl (see Learning Perl on Win32 Systems) and Python both talk to COM objects, finally bringing some of the benefits of scripting to the Windows world. ActiveState's PerlCom product, part of the Win32 Perl Resource Kit, as well as available for download from http://www.activestate.com, actually instantiates the perl interpreter as a COM object, so you can work things the other way around.
But finally, while I do agree that components are an important wave of the future (which is why we're working on what we think will be the definitive set of books on COM), I wouldn't be so quick to dismiss "UNIX Shell scripting" and the text-based tradition with which it is associated.
Shell scripting, and the sequence of programming languages that evolved from it, most notably Perl, represents an under-appreciated area of computer science. The idea of programs able to handle standard input and output with plain ASCII text as the common data format was probably the single greatest component framework ever invented. The way that UNIX and Linux have evolved through community contributions rather than a centralized corporate architecture is a testament to just how powerful a component model this is.
The web is an outgrowth of this same tradition. HTTP is a text-based protocol, which is why the UNIX scripting languages have worked so well with it, when heavier-weight component architectures such as ActiveX have failed to get much traction in the marketplace.
And in fact, you can argue that web sites themselves are the components of the future! Jon Udell explores this fascinating idea in his upcoming book, Practical Internet Groupware. While his focus is specifically on applications for collaboration and community, he makes some astonishing points about the paradigm shift implicit in the way that you can, for instance, use AltaVista's public server as the search engine for your own private site.
Jon says: "One of the main themes running through this book is the notion that Web sites, and the applications that run on them (e.g. CGI scripts, Java servlets), have a dual nature. From the perspective of a person running a browser, a web site is an interactive application. We think of a URL as an address that produces a web page. From the perspective of a script--specifically, a web-client script that programmatically uses the HTTP protocol, a web site is a software component. In this case, the same URL acts like a function call, possibly parameterized, which may produce output. When you use a web site or one of its applications this way, it's useful to think of it as implementing an API."
A further point that might be underscored is that since the HTTP realm completely deemphasizes the operating system, it doesn't matter whether you stay with Linux or switch to NT, since all the same strategies apply, and in the same ways.
I've written about a related idea in my essay for our book Open Sources. The idea I explore there is that a lot of the web-based applications that we use today are not software as we've known it, but a new class of "infoware" applications, which use documents (rather than software components) for their interface.
All this gets even more interesting when you bring XML into the picture. In the infoware world, XML represents the logical equivalent of software component architectures. We're seeing some fascinating work, such as Dave Winer's xml-rpc, which, as Dave summarizes it, "is a Remote Procedure Calling protocol that works over the Internet. An XML-RPC message is an HTTP-POST request. The body of the request is in XML. A procedure executes on the server and the value it returns is also formatted in XML."
One of the points I really like to drill home is that the web created so many new opportunities because it was a real paradigm shift, just like the PC revolution before it. The desktop component architectures we're looking at with both Windows and GNOME are a refinement of the software development paradigm behind the PC revolution. The web is still the next revolution, and we've barely seen the beginning!
As web sites adopt XML, they will increasingly be scriptable and their data shareable. Right now, we still think of the action on the web as being the simple interaction between web browsers and web servers. In years to come, I expect to see a whole lot more server-to-server communication, in which servers are exchanging XML-structured data, and providing all kinds of services to each other, and the application the user interacts with is just the tip of the iceberg. Sun's trademarked slogan, "The network is the computer," is going to come true in ways we're only beginning to understand.
And as a result, our understanding of what a component is, and how it needs to work, is going to evolve as well.
That's a long answer to your question, but I hope it gives you some food for thought.
--Tim
Two readers wrote in to expand on Tim's column with information about other useful tools:
To: ask_tim@oreilly.com
From: Mark van der Kraan
Subject: beanshell (just a remark)
I have no question, but I would like to remark that when you say in your column that Java can be scripted with JPython, do not forget BeanShell by O'Reilly author Pat Niemeyer ("Exploring Java") (http://www.ooi.com/beanshell/). I just downloaded this and I think it is great! It allows you to use Java itself as a scripting language, so it is _very_ easy to learn.
-- Mark
To: ask_tim@ora.com
From: John Zedlewski
Subject: A response to latest Ask Tim--Components/Scripting for Linux
Woah, woah, woah, wait a sec there partner! I was proud to see your defense of Linux component architectures, but then shocked to see that you missed the only complete linux-native component suite with full scripting capability: KOM/Open Parts. KOM is the KDE Object Model, a CORBA-based component architecture, and Open Parts is the GUI component of KOM, allowing you to embed, say, a mail reader GUI in your organizer application. The object model will form the heart of the upcoming KDE 2.0 release and is already in extensive use in KOffice. Thus, you can embed a KImageShop graphic in a KSpread spreadsheet, then embed that sheet in a KPresenter screen presentation. Just as with MS Office, KOffice will allow you to edit the spreadsheet without ever leaveing the KPresenter interface. Furthermore, KOM supports multiple scripting languages, including KScript, a high-level, C-like native scripting language. Most applications also support at least Python interfaces. Since you also discussed XML in your column, I should probably point out that XML is the native file format of KOffice as well. Just a few thoughts! I highly recommend checking out www.kde.org, or the excellent article on the Future of KDE from Linux Today (look in the right sidebar on www.linuxtoday.com, sorry I don't have the specific URL).
--JZ
Return to: Ask Tim Archive
Copyright © 2007 O'Reilly Media, Inc.