Development On the Qt

The introduction of Microsoft Visual Studio .Net drew a lot of attention to issues like whether C# is preferable to Java and how the .Net framework compares with the Java 2 Enterprise Edition framework.

My recommendation is to go with Java and J2EE, in part because they're maturing so quickly, but mostly because they don't tie you to Windows as a development platform.

But with all this fuss being made about C# vs. Java and the competing frameworks, it's easy to forget that there are many other options for application development. My favorite is Qt, from Trolltech AS. The latest version of Qt, Version 3.0, is the foundation for the phenomenal K Desktop Environment (KDE). I'm crazy about KDE 3.0, so it should come as no surprise that I'm equally enamored with Qt.

Qt is a set of C++ libraries and visual development tools. It's available for Windows, Mac OS and just about every flavor of Unix—including Linux—and many handheld devices, such as the Sharp Zaurus. The Qt application programming interface (API) is virtually identical for all desktop platforms, so you can create a single source-code base and should be able to compile it without modification for all the supported operating systems.

The latest version of Qt includes support for SQL access to databases via plug-ins that support Open Database Connectivity, Oracle, Sybase, MySQL and PostgreSQL. It has a broad range of XML objects and functions and supports OpenGL 3-D graphics, customizable graphical user interface themes, layout managers to help an application look its best on any platform and more.

Trolltech is also working on a project that will allow you to add a JavaScript-like language for your Qt applications. This will give your Qt-based applications scripting facilities, much like today's productivity applications support various forms of Basic scripts, such as Visual Basic for Applications.

The Qt API has expanded so dramatically during the past couple of years that one might get the impression that it's getting too bloated to be useful. But you can get the source code to Qt, and the configuration step for compiling your own Qt libraries makes it very easy to eliminate the features you don't need, so you can trim Qt down to nearly any size you want.

The handheld support is especially fascinating. Trolltech offers a complete handheld desktop environment called Qtopia. Qtopia includes Java support and comes with dozens of applications, including a full range of personal information management programs like those you get with a Palm device.

All of the aforementioned software is open-source and free, as long as you distribute your applications according to the requirements of the GNU General Public License. (You must also make your source code available.) If you want to sell proprietary applications based on Qt, you have to pay license fees to Trolltech. The license fees seem a little steep at more than $3,000 per developer for the enterprise edition of Qt, but it's well worth it.

Some programmers balk at using Qt because it relies on C++ instead of C. Personally, I suspect that many of them claim the problem is with C++ but that their real reluctance lies in their inability to conceptualize object-oriented programming techniques. That's not to say that C++ is an ideal language. Java was designed to eliminate many of the weaknesses in C++, and it does that job very well. But there's still room for C++ in your arsenal of languages.

The other objection to C++ is that it's slower than C. But let's face it—we gave up some speed when we graduated from assembler to C many years ago. I don't see why we can't give up a bit more speed to gain the advantages of C++ and tools like Qt. Certainly, if you're considering Java or C#, you've already decided that raw speed isn't the determining factor in your choice of language.

Java boasts the best degree of platform neutrality. C# could eventually give Java and C++ with Qt some serious competition, if anyone successfully ports the .Net framework to other platforms. But if you want to use the lean, mean C++ to build applications that will have the widest audience, I don't see how you can beat the combination of C++ and Qt.

Nicholas Petreley is a computer consultant and author in Hayward, Calif. He can be reached at nicholas@petreley.com.

1by1.gif

SNAPSHOTS

Barriers to Web Services

Programmers say that the following are the biggest barriers to developing applications for Web services:

1 Ambiguous or missing standards
2 Lack of end-to-end security
3 Uncertainty about how to build Web services application architectures
4 Establishing trust among e-business partners
Base: 813 software developers in North America

Source: Evans Data Corp., Santa Cruz, Calif., March 2002 J2EE vs. .Net

Is your company more likely to commit to J2EE or .Net as its Web services foundation?

J2EE vs. .Net

Base: 100 CIOs (75 in the U.S., 25 in Europe)

Source: Merrill Lynch & Co., New York, March 2002 Three Phases

Adoption of Web services is expected to follow this timetable:

2002-03

Within the firewall

BENEFITS: Simplified application integration; increased developer productivity 2003-05

Controlled set of external users

BENEFITS: Simplified business partner connectivity; richer application functionality; subscription-based services 2005-08

Fully dynamic search and use

BENEFITS: Casual or ad hoc use of services; new business models possible; commoditization of software

Source: IDC, Framingham, Mass., February 2002

Special Report

New Tools, New Choices

Stories in this report:

Copyright © 2002 IDG Communications, Inc.

7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon