Monialustaiset avoimen lähdekoodin ikkunointikirjastot
Valonen, Juho (2010)
Diplomityö
Valonen, Juho
2010
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi-fe201004151679
https://urn.fi/URN:NBN:fi-fe201004151679
Tiivistelmä
Tämän tutkimuksen tavoitteena oli löytää vastauksia siihen, mikä on tärkeimpien avoimen lähdekoodin kirjastojen toteutuksen tämän hetkinen taso. Työssä tutkittiin WxWidgetsin, GTK+:n ja Qt:n toteutuksen tasoa käytämällä hyväksi McCaben, Henry&Kafuran ja Chidamberin & Kemererin esittelemiä staattisia menetelmiä. Lisäksi ikkunointikirjastojen lähdekoodin käännetty koko mitattiin eri käyttöjärjestelmissä. Tutkimuksessa esitellään valittujen kirjastojen arkkitehtuuri ja vertaillaan esiteltävien kirjastojen arkkitehtuurisia ratkaisuja toisiinsa. Tämän jälkeen arvioidaan staattisten menetelmien tuottamien tuloksien merkitystä kahdesta näkökulmasta: mitä tulokset kertovat kirjastoista kun niitä verrataan toisiinsa ja mitä silloin kun niitä verrataan kyseisen kirjaston ja muiden kirjastojen arkkitehtuurisiin ratkaisuihin.
Tutkimuksessa havaittiin Qt:n sisältävän kaikkein vähiten kirjaston ulkopuolisia riippuvuuksia. Tämän lisäksi sen huomattiin sisältävän muista kirjastoista puuttuvia ominaisuuksia. Osittain edellämainitusta syystä johtuen Qt:n ongelmakohdaksi havaittiin joidenkin sen osien suuri monimutkaisuus ja tästä seuraava mahdollinen vaikeasti ylläpidettävä lähdekoodi. GTK+:n lähdekoodi sisältää muita kirjastoja vähemmän sisäisiä riippuvuuksia samaan kirjastoon, on korkeammalla abstraktiotasolla ja kirjaston osat ovat siirrettävissä ja erotettavissa toisistaan. Joissakin kohdissa GTK+:n ja etenkin sen C++-rajapinnan GTKmm:n lähdekoodi on kuitenkin tarpeettoman monimutkaista. WxWidgetsin toteutuksen havaittiin Qt:n tavoin olevan hyvin itsenäinen kokonaisuus, WxWidgetsin lähdekoodin monimutkaisuus on useimmiten jotakin GTK+:n ja Qt:n väliltä. WxWidgets on Qt:a vähemmän itsenäinen mutta kuitenkin itsenäisempi kuin GTK+. Kuten muutkin kirjastot myös wxWidgetsillä on omat kohtansa, joissa sen lähdekoodi on tarpeettoman monimutkaista. The target of this research was to find answers to the current quality of the implementation of the open source widget toolkits. In the research wxWidgets, GTK+ and Qt implementation quality was studied by using statical methods proposed by McCabe, Henry&Kafura and Chidamber&Kemerer. Additionally the compiled source code size was measured in the different operating systems. In the research the architecture of the widget toolkits is presented and different architectural solutions of the libraries are compared against each other. After that the meaning of the results coming from the statical methods is analyzed from the two perspectives: what the results mean when the libraries are compared against each other and what then when they're compared to their own architectural solutions and architectural solutions of the other libraries.
In the research it was noticed that Qt contains less external dependencies to the external libraries than other libraries. Additionally it was also noticed that it contains features missing from the other libraries. Partly previously mentioned reasons problematic areas in Qt were found. Some of its parts are unnecessarily complex and thus they can be hard to maintain. GTK+ contains less internal dependencies than other libraries. It is of higher abstraction and the parts of the GTK+ are easier to move and to separate. At some places the source code of the GTK+ and especially its C++-interface GTKmm is unnecessarily complex. The implementation of the WxWidgets, like Qt, was identified as being independent. Most of the time the complexity of the WxWidgets source code is something between Qt and GTK+. WxWidgets is less independent than Qt, but more independent than GTK+. Like the other libraries, source code of the WxWidgets has some locations where it is more complex than in the other libraries.
Tutkimuksessa havaittiin Qt:n sisältävän kaikkein vähiten kirjaston ulkopuolisia riippuvuuksia. Tämän lisäksi sen huomattiin sisältävän muista kirjastoista puuttuvia ominaisuuksia. Osittain edellämainitusta syystä johtuen Qt:n ongelmakohdaksi havaittiin joidenkin sen osien suuri monimutkaisuus ja tästä seuraava mahdollinen vaikeasti ylläpidettävä lähdekoodi. GTK+:n lähdekoodi sisältää muita kirjastoja vähemmän sisäisiä riippuvuuksia samaan kirjastoon, on korkeammalla abstraktiotasolla ja kirjaston osat ovat siirrettävissä ja erotettavissa toisistaan. Joissakin kohdissa GTK+:n ja etenkin sen C++-rajapinnan GTKmm:n lähdekoodi on kuitenkin tarpeettoman monimutkaista. WxWidgetsin toteutuksen havaittiin Qt:n tavoin olevan hyvin itsenäinen kokonaisuus, WxWidgetsin lähdekoodin monimutkaisuus on useimmiten jotakin GTK+:n ja Qt:n väliltä. WxWidgets on Qt:a vähemmän itsenäinen mutta kuitenkin itsenäisempi kuin GTK+. Kuten muutkin kirjastot myös wxWidgetsillä on omat kohtansa, joissa sen lähdekoodi on tarpeettoman monimutkaista.
In the research it was noticed that Qt contains less external dependencies to the external libraries than other libraries. Additionally it was also noticed that it contains features missing from the other libraries. Partly previously mentioned reasons problematic areas in Qt were found. Some of its parts are unnecessarily complex and thus they can be hard to maintain. GTK+ contains less internal dependencies than other libraries. It is of higher abstraction and the parts of the GTK+ are easier to move and to separate. At some places the source code of the GTK+ and especially its C++-interface GTKmm is unnecessarily complex. The implementation of the WxWidgets, like Qt, was identified as being independent. Most of the time the complexity of the WxWidgets source code is something between Qt and GTK+. WxWidgets is less independent than Qt, but more independent than GTK+. Like the other libraries, source code of the WxWidgets has some locations where it is more complex than in the other libraries.