Topics: Java, Programming language, Graphical user interface Pages: 14 (4547 words) Published: June 29, 2011
Qt vs. Java
A Comparison of Qt and Java for LargeScale, Industrial-Strength GUI Development Matthias Kalle Dalheimer
Klarälvdalens Datakonsult AB kalle@klaralvdalens-datakonsult.se

This white paper compares C++/Qt with Java/AWT/Swing for developing large-scale, real-world software with graphical user interfaces. References are made to independent reports that examine various aspects of the two toolsets.


A Comparison of Qt and Java

1. What Do We Compare?
When selecting an environment for a large software development project, there are many aspects that must be considered. The programming language is one of the most significant aspects, since its choice has considerable impact on what other options are available. For example, in a GUI development project, developers will need a GUI library that provides ready-made user interface components, for example, buttons and menus. Since the selection of the GUI library itself has a large impact on the development of a project, it is not uncommon for the GUI library to be chosen first, with the programming language being determined by the languages for which the library is available. Usually, there is only one language per library. Other software components like database access libraries or communication libraries must also be taken into consideration, but they rarely have such a strong impact on the overall design as the GUI libraries. In this white paper, the objective is to compare the C++/Qt environment with the Java/AWT/Swing environment. In order to do this in the most useful way, we will begin by comparing the programming languages involved, i.e., C++ and Java, and then compare the two GUI libraries, Qt for C++ and AWT/Swing for Java.

2. Comparing C++ and Java
When discussing the various benefits and drawbacks of particular programming languages, the debate often degenerates into arguments that are based on personal experience and preference rather than any objective criteria. Personal preferences and experience should be taken into account when selecting a programming language for a project, but because it is subjective, it cannot be considered here. Instead we will look at issues such as programmer-efficiency, runtime-efficiency and memory-efficiency since these can be quantified and have been examined in scientifically conducted research, although we will also incorporate information based on the practical exerience of projects that have been implemented in our own company.

2.1. Programmer-efficiency
Programmer-efficiency describes how efficiently (i.e. how quickly and accurately) a programmer with a given degree of experience and knowledge can implement a certain set of requirements in a particular programming language, including debugging and project setup time. Since developer salaries are one of the primary cost factors for any programming project, programmer-efficiency greatly affects the


A Comparison of Qt and Java cost-efficiency of the project. To some extent, programmer-efficiency is also determined by the tools available. The main design goal of Java is increased programmer-efficiency compared to other general-purpose programming languages, rather than increased memory- or runtime-efficiency. Java has several features designed to make it more programmer-efficient. For example, unlike C++ (or C), the programmer does not have to explicitly "free" (give back) allocated memory resources to the operating system. Freeing unused memory (garbage collection) is handled automatically by the Java runtime system, at the expense of memory- and runtime-efficiency (see below). This liberates the programmer from the burden of keeping track of allocated memory, a tedious task that is a major cause of bugs. This feature alone should significantly increase the programmer-efficiency of Java programmers, compared to C++ (or C) programmers. Research shows that in practice, garbage collection and other Java features, do not have a major influence on the...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Java vs. C++ Essay
  • Java vs .Net Essay
  • JAVA Essay
  • Java Essay
  • Java vs..Net Programming Essay
  • Java vs .Net Essay
  • Essay on Java
  • Comparison of Java, Javascript, Java Applets and Java Beans Essay

Become a StudyMode Member

Sign Up - It's Free