DDJ: We're talking today with Naren Karattup, product director of development tools at Trolltech.
Naren, I originally thought that Qt Jambi was Qt for Java. But it turns out that Jambi has a toolset for C++ developers too. So why would a C++ programmer use Qt Jambi instead of Qt?
NK: Java is an intuitive programming language generally considered -- and designed especially to be -- much less error prone than C++. Thus, it might be deemed both safer and easier to employ this programming language as the foundation for a software project. However, Java lacks power in areas such as accessing platform or hardware specific features, memory management and per-instruction speed optimizations. Also, a company may have legacy code written in C++, making the company less interested in rewriting in a new language.
To allow programmers to combine their C++ code with Java code, Qt Jambi has a tool which will establish a Java API based on C++ header files.
DDJ: Qt Jambi appears to offer an alternative to Swing. If I have existing Swing-based applications, can I port them to Qt Jambi?
NK: Yes, you can. Qt Jambi lets you combine Swing top-level windows with Qt Jambi top-level windows to make the porting process easier. The Qt Jambi team is also researching the possibility of combining the libraries on a widget basis (Swing widgets as children of Qt Jambi widgets and vice versa).
DDJ: What was the most challenging aspect of building Qt Jambi?
NK: The most challenging aspect has been the subtle, but quite immense differences between the C++ and Java languages. C++ is a lower level language than Java, and supports a great range of programming language mechanisms that are not available to Java programmers. Examples of such mechanisms are: Manual memory management, address by pointer, pass-by-value function calls, heterogeneous generics, multiple inheritance, non-virtual functions, function shadowing, function pointers, preprocessing, and many more. Mapping an API that uses these mechanisms into a language that does not support them has by far been the greatest challenge, although it has also been the most interesting part of the project. In the end, the Qt Jambi team has found good, intuitive solutions for all these inherent binding problems, and has created a Java version of the Qt API which expresses the same concepts and ideas as its original, despite the failure of Java to be able to express the same API concepts as C++.
DDJ: What's the #1 problem that Qt Jambi solves for developers?
NK: Java has failed to some extent in becoming a programming language for making desktop applications. Compared to other languages, there are very few successful desktop applications available that are written in Java.
We believe this is due to the lack of available tools that are good enough, intuitive enough and convenient enough to make Java attractive as a desktop application platform. This is where Qt Jambi shines the most. Qt Jambi is a well-documented, intuitive, and professionally supported toolkit, which lets programmers focus their energy on solving the specific problems and tasks of their own applications, instead of having to fight against their toolkit to make it do what they want. Qt Jambi is flexible and powerful while still maintaining a great degree of readability and sensible default behavior.
It will help make the routine work of application developers easier, faster, and more pleasant.
DDJ: Anything else?
NK: For more information and to download a free 30-day trial of Qt Jambi, readers can visit www.trolltech.com/products/qt/jambi.