Sei sulla pagina 1di 2

Current Programming: QT versus Java

Camila Alves de Medeiros kmila_medeiros@hotmail.com

ABSTRACT
This paper presents is present a comparison between Java and C++/QT in relation to programmer-efficiency, runtime-efficiency and memory-efficiency. Besides that, is present a comparison between resources those languages supplying in relation to concurrent programming.

1. Introduction
Java is well-know technologic used in varies areas their portability and efficiency. Create in 1991 by a group of Sun called "Green Team", Java went launched to digital cable television industry how this concept was very advanced for this time just in 1995, with the advent of internet, Java begin to be successful. Nowadays Java is present in mobile phones, handheld devices, games, navigation systems, e-business solutions [1]. QT was created in 1996 by Trolltech since that QT begins to be successful for developing high-performance cross-platform applications. Besides that, QT offers much functionality to develop complex GUI and console applications. Today, big companies like Google, Adobe, and Skype used QT in their applications [2]. As Java as QT could be used to develop current programs, in this paper is presented some different between this programming languages.

2. Advantages and Disadvantages


In this section is present a comparison between Java and C++/QT in relation to programmer-efficiency, runtime-efficiency and memory-efficiency. Besides that, is present a comparison between resources those languages supplying in relation to concurrent programming. Programmer-Efficiency describes how quickly and accurately a programmer, with a given degree of experience and knowledge, could implement on algorithm in one specific language. However, searches show it depends of the degree of the programmers experience and knowledge, so the programming language doesnt have influence on the overall project costs [3]. Runtime-efficiency to have connection with the time that tasks are CPU-bound. C++/QT to have better runitme-efficiency than Java because on algorithm inmplemented in C++/QT is compiled into a binary format that can be executed directly by the CPU while the same algorithm in Java is compiled into a "bytecode" which have to pass by the Java Virtual Machine (JVM) before to be executed by the CPU [3].

Memory-efficiency is relationship with the memory management. C++/QT to allow programmers to allocating and de-allocating memory as necessary, besides that, to allow programmers to delete blocks of memory that are no longer required. On the other hand, Java automatically de-allocates (frees) unused memory and dont allow programmers to deleted blocks of memory until the next garbage collection run. For this reason, in general Java consumes more memory than the C++/QT programs [3]. The table 2.1 presents the comparison between Java and C++/QT in relation to programmer-efficiency, runtime-efficiency and memory-efficiency. Table 2.1: Comparison between Java and C++/QT Languages JAVA C++/QT Programmer-Efficiency The same The same Is better Is better Runtime-efficiency Memory-efficiency

Java offer a widely group os packages to support the object-oriented programming. This packages make easier the program development. Specifically to support the concurrent programming, Java offers the class: java.lang.Thread and java.lang.Runnable. The java.lang.Runnable class is a interface that contains the method run(), represents which represents the code to be executed by the thread. When a new thread is created the first method to be executed is the method run().The Runnable class could receive different implementations because it declared just abstract methods and constant. The java.lang.Thread class allow to run or stop a thread, thread group, and specify the execution priority of the thread, in other words specify what thread will to occupy the CPU [4]. QT offers a set of APIs to write multi-threaded programs without using low-level threading primitives such as mutexes, read-write locks, wait conditions, or semaphores. Besides that, QT contains several STL-compatible container and iterator types, but works best with Qt containers that have random-access iterators, such as QList or QVector.Using QT, applications written today will continue to scale when deployed on multi-core systems in the future [2].

3. Conclusions
C++/QT to provide better runtime- efficiency and memory-efficiency than Java. Besides that, QT has more tools to develop concurrent programming than Java, making easier and faster the concurrent programming using QT.

4. References
[1]The History of Java Technology. . Acessado em 08 de 09 de 2010, disponvel em Java: http://www.java.com/en/javahistory. [2 Trolltech. (s.d.). Concurrent Programming. Acesso em 2010 de 09 de 08, disponvel em trolltech: http://doc.trolltech.com/4.6/threads-qtconcurrent.html [3] Dalheimer, M. K. (s.d.). A Comparison of Qt and Java for Large-Scale, IndustrialStrength GUI Development. [4] Silva, D. M. (s.d.). Introduo Programao Concorrente para a Internet. Acessado em 08 de 09 de 2010, disponvel em Francis Berenger Machado: http://www.inf.puc-rio.br/~francis/Intro_Prog_Concor.pdf

Potrebbero piacerti anche