UNIVERSITI PUTRA MALAYSIA GRAPHICAL USER INTERFACE LAYOUT LANGUAGE USING COMBINATORS KHAIRUL AZHAR KASMIRAN FSKTM

Similar documents
SECURE-SPIN WITH HASHING TO SUPPORT MOBILITY AND SECURITY IN WIRELESS SENSOR NETWORK MOHAMMAD HOSSEIN AMRI UNIVERSITI TEKNOLOGI MALAYSIA

ONTOLOGY-BASED SEMANTIC HETEROGENEOUS DATA INTEGRATION FRAMEWORK FOR LEARNING ENVIRONMENT

AN IMPROVED PACKET FORWARDING APPROACH FOR SOURCE LOCATION PRIVACY IN WIRELESS SENSORS NETWORK MOHAMMAD ALI NASSIRI ABRISHAMCHI

UNIVERSITI PUTRA MALAYSIA KEY TRANSFORMATION APPROACH FOR RIJNDAEL SECURITY

ISOGEOMETRIC ANALYSIS OF PLANE STRESS STRUCTURE CHUM ZHI XIAN

INTEGRATION OF CUBIC MOTION AND VEHICLE DYNAMIC FOR YAW TRAJECTORY MOHD FIRDAUS BIN MAT GHANI

IMPROVED IMAGE COMPRESSION SCHEME USING HYBRID OF DISCRETE FOURIER, WAVELETS AND COSINE TRANSFORMATION MOH DALI MOUSTAFA ALSAYYH

DEVELOPMENT OF A MOBILE ROBOT SPATIAL DATA ACQUISITION SYSTEM OOI WEI HAN MASTER OF SCIENCE UNIVERSITI PUTRA MALAYSIA

UNIVERSITI PUTRA MALAYSIA

DEVELOPMENT OF COMMERCIAL VEHICLE SPEED WARNING SYSTEM NGO CHON CHET

SEMANTICS ORIENTED APPROACH FOR IMAGE RETRIEVAL IN LOW COMPLEX SCENES WANG HUI HUI

UNIVERSITI PUTRA MALAYSIA EFFECTS OF DATA TRANSFORMATION AND CLASSIFIER SELECTIONS ON URBAN FEATURE DISCRIMINATION USING HYPERSPECTRAL IMAGERY

IMPLEMENTATION OF UNMANNED AERIAL VEHICLE MOVING OBJECT DETECTION ALGORITHM ON INTEL ATOM EMBEDDED SYSTEM

STATISTICAL APPROACH FOR IMAGE RETRIEVAL KHOR SIAK WANG DOCTOR OF PHILOSOPHY UNIVERSITI PUTRA MALAYSIA

OPTIMIZE PERCEPTUALITY OF DIGITAL IMAGE FROM ENCRYPTION BASED ON QUADTREE HUSSEIN A. HUSSEIN

IMPLEMENTATION AND PERFORMANCE ANALYSIS OF IDENTITY- BASED AUTHENTICATION IN WIRELESS SENSOR NETWORKS MIR ALI REZAZADEH BAEE

PERFOMANCE ANALYSIS OF SEAMLESS VERTICAL HANDOVER IN 4G NETWOKS MOHAMED ABDINUR SAHAL

ENHANCEMENT OF UML-BASED WEB ENGINEERING FOR METAMODELS: HOMEPAGE DEVELOPMENT CASESTUDY KARZAN WAKIL SAID

DESIGN AND IMPLEMENTATION OF A MUSIC BOX USING FPGA TAN KIAN YIAK

A NEW STEGANOGRAPHY TECHNIQUE USING MAGIC SQUARE MATRIX AND AFFINE CIPHER WALEED S. HASAN AL-HASAN UNIVERSITI TEKNOLOGI MALAYSIA

THE COMPARISON OF IMAGE MANIFOLD METHOD AND VOLUME ESTIMATION METHOD IN CONSTRUCTING 3D BRAIN TUMOR IMAGE

HARDWARE-ACCELERATED LOCALIZATION FOR AUTOMATED LICENSE PLATE RECOGNITION SYSTEM CHIN TECK LOONG UNIVERSITI TEKNOLOGI MALAYSIA

HARDWARE/SOFTWARE SYSTEM-ON-CHIP CO-VERIFICATION PLATFORM BASED ON LOGIC-BASED ENVIRONMENT FOR APPLICATION PROGRAMMING INTERFACING TEO HONG YAP

UNIVERSITI PUTRA MALAYSIA RANK-ORDER WEIGHTING OF WEB ATTRIBUTES FOR WEBSITE EVALUATION MEHRI SAEID

ENHANCING WEB SERVICE SELECTION USING ENHANCED FILTERING MODEL AJAO, TAJUDEEN ADEYEMI

UNIVERSITI PUTRA MALAYSIA PERFORMANCE ENHANCEMENT OF AIMD ALGORITHM FOR CONGESTION AVOIDANCE AND CONTROL

OPTIMIZED BURST ASSEMBLY ALGORITHM FOR MULTI-RANKED TRAFFIC OVER OPTICAL BURST SWITCHING NETWORK OLA MAALI MOUSTAFA AHMED SAIFELDEEN

SUPERVISED MACHINE LEARNING APPROACH FOR DETECTION OF MALICIOUS EXECUTABLES YAHYE ABUKAR AHMED

A SEED GENERATION TECHNIQUE BASED ON ELLIPTIC CURVE FOR PROVIDING SYNCHRONIZATION IN SECUERED IMMERSIVE TELECONFERENCING VAHIDREZA KHOUBIARI

LOGICAL OPERATORS AND ITS APPLICATION IN DETERMINING VULNERABLE WEBSITES CAUSED BY SQL INJECTION AMONG UTM FACULTY WEBSITES NURUL FARIHA BINTI MOKHTER

UNIVERSITI PUTRA MALAYSIA MULTI-LEVEL MOBILE CACHE CONSISTENCY SCHEMES BASED ON APPLICATION REQUIREMENTS DOHA ELSHARIEF MAHMOUD YAGOUB

A LEVY FLIGHT PARTICLE SWARM OPTIMIZER FOR MACHINING PERFORMANCES OPTIMIZATION ANIS FARHAN BINTI KAMARUZAMAN UNIVERSITI TEKNOLOGI MALAYSIA

ENHANCING SRAM PERFORMANCE OF COMMON GATE FINFET BY USING CONTROLLABLE INDEPENDENT DOUBLE GATES CHONG CHUNG KEONG UNIVERSITI TEKNOLOGI MALAYSIA

HARDWARE AND SOFTWARE CO-SIMULATION PLATFORM FOR CONVOLUTION OR CORRELATION BASED IMAGE PROCESSING ALGORITHMS SAYED OMID AYAT

MICRO-SEQUENCER BASED CONTROL UNIT DESIGN FOR A CENTRAL PROCESSING UNIT TAN CHANG HAI

HERMAN. A thesis submitted in fulfilment of the requirements for the award of the degree of Doctor of Philosophy (Computer Science)

UNIVERSITI PUTRA MALAYSIA AMTREE PROTOCOL ENHANCEMENT BY MULTICAST TREE MODIFICATION AND INCORPORATION OF MULTIPLE SOURCES ALI MOHAMMED ALI AL SHARAFI

VIRTUAL PRIVATE NETWORK: ARCHITECTURE AND IMPLEMENTATIONS

AUTOMATIC APPLICATION PROGRAMMING INTERFACE FOR MULTI HOP WIRELESS FIDELITY WIRELESS SENSOR NETWORK

This item is protected by original copyright

ARM PROCESSOR EMULATOR MOHAMAD HASRUZAIRIN B MOHD HASHIM

UNIVERSITI PUTRA MALAYSIA RELIABILITY PERFORMANCE EVALUATION AND INTEGRATION OF ROUTING ALGORITHM IN SHUFFLE EXCHANGE WITH MINUS ONE STAGE

UNIVERSITI PUTRA MALAYSIA DEVELOPMENT OF A REAL-TIME EMBEDDED REMOTE TRIGGERING AND MONITORING SYSTEM CHUI YEW LEONG FK

UNIVERSITI PUTRA MALAYSIA AN INTEGRATED FIREWALL SYSTEM MODEL IN A MULTICLIENT- SERVER ENVIRONMENT HUSSEIN A. TAQI AL-KAZWINI FK

COLOUR IMAGE WATERMARKING USING DISCRETE COSINE TRANSFORM AND TWO-LEVEL SINGULAR VALUE DECOMPOSITION BOKAN OMAR ALI

SYSTEMATIC SECURE DESIGN GUIDELINE TO IMPROVE INTEGRITY AND AVAILABILITY OF SYSTEM SECURITY ASHVINI DEVI A/P KRISHNAN

UNIVERSITI PUTRA MALAYSIA IMPROVED WAVELET DENOISING OF HYPERSPECTRAL REFLECTANCE USING LEVEL-INDEPENDENT WAVELET THRESHOLDING

UNIVERSITI PUTRA MALAYSIA A MATRIX USAGE FOR LOAD BALANCING IN SHORTEST PATH ROUTING NOR MUSLIZA MUSTAFA FSKTM

ENHANCING TIME-STAMPING TECHNIQUE BY IMPLEMENTING MEDIA ACCESS CONTROL ADDRESS PACU PUTRA SUARLI

UNIVERSITI PUTRA MALAYSIA WEIGHTED WINDOW FOR TCP FAIR BANDWIDTH ALLOCATION IN WIRELESS LANS

UNIVERSITI PUTRA MALAYSIA DEVELOPMENT OF CLASS 2 AND CLASS 3 SURGE PROTECTION DEVICES FOR LOW VOLTAGE PROTECTION SYSTEMS

UNIVERSITI SAINS MALAYSIA. CMT322/CMM323 Web Engineering & Technologies [Kejuruteraan & Teknologi Web]

UNIVERSITI PUTRA MALAYSIA CLASSIFICATION SYSTEM FOR HEART DISEASE USING BAYESIAN CLASSIFIER

STUDY OF FLOATING BODIES IN WAVE BY USING SMOOTHED PARTICLE HYDRODYNAMICS (SPH) HA CHEUN YUEN UNIVERSITI TEKNOLOGI MALAYSIA

IMAGE SLICING AND STATISTICAL LAYER APPROACHES FOR CONTENT-BASED IMAGE RETRIEVAL JEHAD QUBIEL ODEH AL-NIHOUD

DYNAMIC TIMESLOT ALLOCATION TECHNIQUE FOR WIRELESS SENSOR NETWORK OON ERIXNO

BORANG PENGESAHAN STATUS TESIS

CLOUD COMPUTING ADOPTION IN BANKING SYSTEM (UTM) IN TERMS OF CUSTOMERS PERSPECTIVES SHAHLA ASADI

UNIVERSITI PUTRA MALAYSIA

1100 O 9 ) f. o( 11 O O O 8 )!: 'l. '''' t ''!!K. Ragb Orner Mohamed Saleh. PUSAT PEMBELAJARAN DIGITAL SULTANAH NUR ZAHIRAH. ,.',)_ j,i...

SLANTING EDGE METHOD FOR MODULATION TRANSFER FUNCTION COMPUTATION OF X-RAY SYSTEM FARHANK SABER BRAIM UNIVERSITI TEKNOLOGI MALAYSIA

RESOURCE ALLOCATION SCHEME FOR FUTURE USER-CENTRIC WIRELESS NETWORK WAHEEDA JABBAR UNIVERSITI TEKNOLOGI MALAYSIA

UNIVERSITI PUTRA MALAYSIA ADAPTIVE METHOD TO IMPROVE WEB RECOMMENDATION SYSTEM FOR ANONYMOUS USERS

ADAPTIVE ONLINE FAULT DETECTION ON NETWORK-ON-CHIP BASED ON PACKET LOGGING MECHANISM LOO LING KIM UNIVERSITI TEKNOLOGI MALAYSIA

UNIVERSITI PUTRA MALAYSIA FACE DETECTION TECHNIQUE BASED ON SKIN COLOR AND FACIAL FEATURES

LINK QUALITY AWARE ROUTING ALGORITHM IN MOBILE WIRELESS SENSOR NETWORKS RIBWAR BAKHTYAR IBRAHIM UNIVERSITI TEKNOLOGI MALAYSIA

MAGNETIC FLUX LEAKAGE SYSTEM FOR WIRE ROPE INSPECTION USING BLUETOOTH COMMUNICATION MUHAMMAD MAHFUZ BIN SALEHHON UNIVERSITI TEKNOLOGI MALAYSIA

BLOCK-BASED NEURAL NETWORK MAPPING ON GRAPHICS PROCESSOR UNIT ONG CHIN TONG UNIVERSITI TEKNOLOGI MALAYSIA

RECOGNITION OF PARTIALLY OCCLUDED OBJECTS IN 2D IMAGES ALMUASHI MOHAMMED ALI UNIVERSITI TEKNOLOGI MALAYSIA

UNIVERSITI PUTRA MALAYSIA A WEB-BASED CONTROL AND MONITORING SYSTEM AHMAD ABDUSALAM FIRJANI FK

UNIVERSITI PUTRA MALAYSIA EXTRACTING OBJECT ORIENTED SOFTWARE ARCHITECTURE FROM C++ SOURCE CODE ALI HUSSEIN A. MRESA FSKTM

IMPROVED IMPLEMENTATION OF DIGITAL WATERMARKING TECHNIQUES AHMED SABEEH YOUSIF UNIVERSITI TEKNOLOGI MALAYSIA

LOCALIZING NON-IDEAL IRISES VIA CHAN-VESE MODEL AND VARIATIONAL LEVEL SET OF ACTIVE CONTOURS WITHTOUT RE- INITIALIZATION QADIR KAMAL MOHAMMED ALI

INSTRUCTION: This section consists of FOUR (4) structured questions. Answer ALL questions.

UNIVERSITI PUTRA MALAYSIA IMPROVED MULTICROSSOVER GENETIC ALGORITHM FOR TWO- DIMENSIONAL RECTANGULAR BIN PACKING PROBLEM MARYAM SARABIAN FS

PERFORMANCE OF TRANSMISSION CONTROL PROTOCOL (TCP) CONGESTION CONTROL OVER WIRELESS LINKS USING MODIFIED SNOOP PROTOCOL

UNIVERSITI PUTRA MALAYSIA EMBEDDED ETHERNET WEB SERVER FOR A ROBOT ARM CONTROL TOE OO ZAW FK

MAC PROTOCOL FOR WIRELESS COGNITIVE NETWORK FARAH NAJWA BINTI MOKHTAR

SOLUTION AND INTERPOLATION OF ONE-DIMENSIONAL HEAT EQUATION BY USING CRANK-NICOLSON, CUBIC SPLINE AND CUBIC B-SPLINE WAN KHADIJAH BINTI WAN SULAIMAN

AUTOMATIC PET FEEDER WITH CLIENT/SERVER APPLICATION KHAIRUL ANWAR B MOHD YAKOP UNIVERSITI MALAYSIA PAHANG

AMBA AXI BUS TO NETWORK-ON-CHIP BRIDGE NG KENG YOKE UNIVERSITI TEKNOLOGI MALAYSIA

DETECTION OF WORMHOLE ATTACK IN MOBILE AD-HOC NETWORKS MOJTABA GHANAATPISHEH SANAEI

UNIVERSITI PUTRA MALAYSIA AN INVESTIGATION AND SIMULATION OF NOVEL DYNAMIC ROUTING METHODS MOHAMMAD SALEH FSKTM

UNIVERSITI PUTRA MALAYSIA ENHANCED MOBILITY SOLUTION IN MOBILE IPV6 NETWORK

BORANG PENGESAHAN STATUS TESIS

INFORM DEPARTURE AND ARRIVING OF BUSSES USING BLUETOOTH MOHD SUHKRI BIN YASRI

UNIVERSITI MALAYSIA PAHANG

PROBLEMS ASSOCIATED WITH EVALUATION OF EXTENSION OF TIME (EOT) CLAIM IN GOVERNMENT PROJECTS

ssk 2023 asas komunikasi dan rangkaian TOPIK 4.0 PENGALAMATAN RANGKAIAN Minggu 11

MICRO-MOBILITY ENHANCEMENT IN MULTICAST MOBILE IPv6 WIRELESS NETWORKS. By YONG CHU EU

UNIVERSITI PUTRA MALAYSIA A NEW APPROACH FOR INSTANCE-BASED SCHEMA MATCHING

UNIVERSITI PUTRA MALAYSIA BOOLEAN ROUTING ON HIGH DEGREE CHORDAL RING NETWORKS ATHEER ABBAS MATROUD BASHI FSKTM

ADAPTIVE LOOK-AHEAD ROUTING FOR LOW LATENCY NETWORK ON-CHIP NADERA NAJIB QAID AL AREQI UNIVERSITI TEKNOLOGI MALAYSIA

DEVELOPMENT OF VENDING MACHINE WITH PREPAID PAYMENT METHOD AMAR SAFUAN BIN ALYUSI

UNIVERSITI SAINS MALAYSIA. CPT211-CPM313 Programming Language Concepts & Paradigm [Konsep & Paradigma Bahasa Pengaturcaraan]

INSTRUCTION: This section consists of TWO (2) structured questions. Answer ALL questions.

CAMERA CALIBRATION FOR UNMANNED AERIAL VEHICLE MAPPING AHMAD RAZALI BIN YUSOFF

ISU DAN CABARAN PELAKSANAAN SISTEM PENGURUSAN KESELAMATAN MAKLUMAT (ISMS) 15 Jun 2016 Dewan Taklimat Serdang

Signature :.~... Name of supervisor :.. ~NA.lf... l.?.~mk.. :... 4./qD F. Universiti Teknikal Malaysia Melaka

DESIGN ANALYSIS OF EXTERIOR CAR BODY PART BASTIAN WIBAR BIN MOMANG

Transcription:

UNIVERSITI PUTRA MALAYSIA GRAPHICAL USER INTERFACE LAYOUT LANGUAGE USING COMBINATORS KHAIRUL AZHAR KASMIRAN FSKTM 2006 3

GRAPIDCAL USER INTERFACE LAYOUT LANGUAGE USING COMBINATORS By KHAffiUL AZHAR KASMlRAN Thesis Submitted to the School of Graduate Studies, Universiti Putra Malaysia, in Fulfilment of the Requirements for the Degree of Master of Science March 2006

Abstract of thesis presented to the Senate of Universiti Putra Malaysia in fulfilment of the requirement for the degree of Master of Science GRAPHICAL USER INTERFACE LAYOUT LANGUAGE USING COMBINATORS By KHAIRUL AZHAR KASMIRAN March 2006 Chairman: Associate Professor Abdul Azim Abd. Ghani, PhD Faculty: Computer Science and Information Technology While Java is a popular general-purpose programming language, there are certain areas where the syntax of Java is lacking for the task at hand. One of them is in the area of layout handling, i.e., the task of placing controls in a Graphical User Interface (GUI) with regard to their relative position and size. This is because the syntax of Java is targeted towards imperative programming, where code is written in the form of a list of instructions. A list of instructions does not adequately mirror the hierarchical structure of a layout. To overcome that weakness, this thesis describes and evaluates a new domainspecific programming language designed specifically for layout handling, named Swing GUI Layout Language (SGLL). One of the primary features of SGLL is the use of combinators, a concept used in functional languages. We propose that combinators are a more intuitive concept compared to the approach taken by Java, which involves adding controls to a layout manager. Furthermore, we suggest that elimination of clutter and better support for the abstractions in layout handling can provide an increase in programmer productivity and understandability of the source ii

code. In this thesis, we focus on the GridLayout manager class, since it is rather easy to understand and provides a good starting point. To validate our approach, we evaluated Java and SGLL in both productivity and understandability. We found out that SGLL does provide a significant improvement in productivity and understandability for the task of layout handling. iii

Abstrak tesis yang dikemukakan kepada Senat Universiti Putra Malaysia sebagai memenuhi keperluan untuk ijazah Master Sains BAHASA PENGATURCARAAN SUSUN ATUR MENGGUNAKAN PENGHUBUNG UNTUK ANT ARAMUKA GRAFIK Oleh KHAIRUL AZHAR KASMIRAN Mac 2006 Pengerusi: Fakulti: Profesor Madya Abdul Azim Abd. Ghani, PhD Sa ins Komputer dan Teknologi Maklumat WaJaupun Java merupakan bahasa pengaturcaraan serbaguna yang popular, masih ada beberapa bidang di mana sintaks Java kurang sesuai untuk tugas yang diberi. Salah satu daripadanya adalah dalam bidang pengendalian susun atur, iaitu tugas meletakkan alat kawalan dalam satu antara muka pengguna grafik (Graphical User Interface) dengan merujuk kepada kedudukan sesama mereka dan saiz mereka. Ini adalah kerana sintaks Java lebih tertumpu kepada pengaturcaraan imperatif, di mana kod ditulis dalam bentuk satu senarai arahan. Satu senarai arahan kurang mencerminkan struktur hierarki sesebuah susun atur. Untuk membetulkan kelemahan tersebut, tesis ini menerang dan menilai satu bahasa pengaturcaraan domain-khusus baharu yang direka bentuk khas untuk pengendalian susun atur, dinamakan SGLL. Salah satu ciri utama SGLL adalah penggunaan penghubung, yang merupakan satu konsep yang digunakan dalam bahasa pengaturcaraan fungsian. Kami merasakan bahawa penghubung merupakan satu konsep yang lebih senang difahami berbanding pendekatan yang digunakan oleh Java, yang melibatkan penambahan alat kawalan kepada sebuah pengurus susun atur. Tambahan pula, kami percaya bahawa penyingkiran penyelerakan dan sokongan iv

rtnru" I H.I-\I-\I'; ;'UL II-\I ImUUL :li-livii-iu UNIVffi" TI fjutra MALA YllA yang lebih baik untuk pengabstrakan dalam pengendalian susun atur dapat meningkatkan produktiviti pengaturcara dan pemahaman kod sumber. Dalam tesis ini, kami memberikan tumpuan kepada kelas pengurus GridLayout, memandangkan kelas tersebut senang untuk difahami dan merupakan satu titik pennulaan yang baik. Untuk mengesahsahihkan pendekatan kami, kami telah menilai Java dan SGLL dalam kedua-dua produktiviti dan pemahaman. Kami mendapati bahawa hasil kami menunjukkan bahawa SGLL dapat meningkatkan produktiviti dan pemahaman untuk tugas pengendalian susun atur. v

GRAPHICAL USER INTERFACE LAYOUT LANGUAGE USING COMBINATORS By KHAIRUL AZHAR KASMIRAN Thesis Submitted to the School of Graduate Studies, Universiti Putra Malaysia, in Fulfilment of the Requirements for the Degree of Master of Science March 2006

Abstract of thesis presented to the Senate of Universiti Putra Malaysia in fulfilment of the requirement for the degree of Master of Science GRAPHICAL USER INTERFACE LAYOUT LANGUAGE USING COMBINATORS By KHAffiUL AZHAR KASMIRAN March 2006 Chairman: Faculty: Associate Professor Abdul Azim Abd. Ghani, PhD Computer Science and Information Technology While Java is a popular general-purpose programming language, there are certain areas where the syntax of Java is lacking for the task at hand. One of them is in the area of layout handling, i.e., the task of placing controls in a Graphical User Interface (GUI) with regard to their relative position and size. This is because the syntax of Java is targeted towards imperative programming, where code is written in the form of a list of instructions. A list of instructions does not adequately mirror the hierarchical structure of a layout. To overcome that weakness, this thesis describes and evaluates a new domainspecific programming language designed specifically for layout handling, named Swing GUI Layout Language (SGLL). One of the primary features of SGLL is the use of combinators, a concept used in functional languages. We propose that combinators are a more intuitive concept compared to the approach taken by Java, which involves adding controls to a layout manager. Furthermore, we suggest that elimination of clutter and better support for the abstractions in layout handling can provide an increase in programmer productivity and understandability of the source ii

code. In this thesis, we focus on the GridLayout manager class, since it is rather easy to understand and provides a good starting point. To validate our approach, we evaluated Java and SGLL in both productivity and understandability. We found out that SGLL does provide a significant improvement in productivity and understandability for the task of layout handling. iii

Abstrak tesis yang dikemukakan kepada Senat Universiti Putra Malaysia sebagai memenuhi keperluan untuk ijazah Master Sains BAHASA PENGATURCARAAN SUSUN ATUR MENGGUNAKAN PENGHUBUNG UNTUK ANTARAMUKA GRAFIK Oleh KHAIRUL AZHAR KASMIRAN Mac 2006 Pengerusi: Fakulti: Profesor Madya Abdul Azim Abd. Ghani, PhD Sains Komputer dan Teknologi Maklumat Walaupun Java merupakan bahasa pengaturcaraan serbaguna yang popular, masih ada beberapa bidang di mana sintaks Java kurang sesuai untuk tugas yang diberi. Salah satu daripadanya adalah dalam bidang pengendalian susun atur, iaitu tugas meletakkan alat kawalan dalam satu antara muka pengguna grafik (Graphical User Interface) dengan merujuk kepada kedudukan sesama mereka dan saiz mereka. Ini adalah kerana sintaks Java lebih tertumpu kepada pengaturcaraan imperatif, di mana kod ditulis dalam bentuk satu senarai arahan. Satu senarai arahan kurang mencerminkan struktur hierarki sesebuah susun atur. Untuk membetulkan kelemahan terse but, tesis ini menerang dan menilai satu bahasa pengaturcaraan domain-khusus baharu yang direka bentuk khas untuk pengendalian susun atur, dinamakan SGLL. Salah satu ciri utama SGLL adalah penggunaan penghubung, yang merupakan satu konsep yang digunakan dalam bahasa pengaturcaraan fungsian. Kami merasakan bahawa penghubung merupakan satu konsep yang lebih senang difahami berbanding pendekatan yang digunakan oleh Java, yang melibatkan penambahan alat kawalan kepada sebuah pengurus susun atur. Tambahan pula, kami percaya bahawa penyingkiran penyelerakan dan sokongan iv

\.J1:"\ '..,'::'I,'.,\P.iI'-; S:I_'N N:DtJL SAMAD UNlVf:fti64TI IlVTRA MALA VIlA yang lebih baik untuk pengabstrakan dalam pengendalian susun atur dapat meningkatkan produktiviti pengaturcara dan pemahaman kod sumber. Dalam tesis ini, kami memberikan tumpuan kepada kelas pengurus GridLayout, memandangkan kelas tersebut senang untuk difahami dan merupakan satu titik permulaan yang baik. Untuk mengesahsahihkan pendekatan kami, kami telah menilai Java dan SGLL dalam kedua-dua produktiviti dan pemahaman. Kami mendapati bahawa hasil kami menunjukkan bahawa SGLL dapat meningkatkan produktiviti dan pemahaman untuk tugas pengendalian susun atur. v

ACKNOWLEDGEMENTS Praise be to Allah for giving me the strength and wisdom to complete this work. Without Allah's help and blessing, I would not have succeeded. Firstly, I would like to thank my supervisor, Prof. Madya Dr. Abdul Azim Abd. Ghani, Dean of the Faculty of Computer Science and Information Technology, for invaluable discussion and commentary. Also, I would like to thank my co-supervisor, Prof. Madya Dr. Hj. Md. Nasir Hj. Sulaiman, for his support and encouragement I would also like to express my thanks to the Faculty of Computer Science and Technology, especially the ICT unit, for providing general help and assistance for the experiments. Also, I'd like to thank the Library and the School of Graduate Studies for helpfully fulfilling my every request. Special thanks to my friends and colleagues at the Faculty of Computer Science and Information Technology for their support and advice. Your help will not be forgotten. Finally, I would like to thank my family for giving me the motivation and moral support needed to complete this thesis. Only Allah can truly reward what they have done. Khairul Azhar Kasmiran March 2006 vi

I certify that an Examination Committee has met on 17 March 2006 to conduct the final examination of Khairul Azhar Kasmiran on his Master of Science thesis entitled "Graphical User Interface Layout Language Using Combinators" in accordance with Universiti Pertanian Malaysia (Higher Degree) Act 1980 and Universiti Pertanian Malaysia (Higher Degree) Regulations 1981. The Committee recommends that the candidate be awarded the relevant degree. Members of the Examination Committee are as follows: RAMLAN MAHMOD, PhD Associate Professor Faculty of Computer Science and Information Technology Universiti Putra Malaysia (Chairman) FATlMAH AHMAD, PhD Associate Professor Faculty of Computer Science and Information Technology Universiti Putra Malaysia (Internal Examiner) RUSLI ABDULLAH, PhD Lecturer Faculty of Computer Science and Information Technology Universiti Putra Malaysia (Internal Examiner) MD. YAZID MOHD. SAMAN, PhD Professor Faculty of Science and Technology Kolej Universiti Sains dan Teknologi Malaysia (External Examiner) PH......,. GHAZALI, PhD P Dean Schoo Graduate Studies Universiti Putra Malaysia Date: '11 JUL 2006 vii

This thesis submitted to the Senate of Universiti Putra Malaysia and has been accepted as fulfilment of the requirement for the degree of Master of Science. The members of the Supervisory Committee are as follows: ABDUL AZIM ADD. GHANI, PhD Associate Professor Faculty of Computer Science and Information Technology Universiti Putra Malaysia (Chainnan) MD. NASIR SULAIMAN, PhD Associate Professor Faculty of Computer Science and Information Technology Universiti Putra Malaysia (Member) AINI IDERIS, PhD ProfessorlDean School of Graduate Studies Universiti Putra Malaysia Date: viii

DECLARATION I hereby declare that the thesis is based on my original work except for quotations and citations which have been duly acknowledged. I also declare that it has not been previously or concurrently submitted for any other degree at UPM or other institutions. KHAIRUL AZHAR KASMIRAN Date: 13 /0 I zoot ix

TABLE OF CONTENTS Page ABSTRACT ABSTRAK ACKNOWLEDGEMENTS APPROVAL DECLARATION LIST OF TABLES LIST OF FIGURES LIST OF ABBREVIATIONS ii iv vi vii ix xii xiii xv CHAPTER 1 INTRODUCTION 1 1.1 Background 1 1.2 Problem Statement 3 1.3 Objective of the Research 4 1.4 Scope of the Research 4 1.5 Thesis Outline 5 2 LITERATURE REVIEW 8 2.1 Introduction 8 2.2 Graphical User Interface Tenns and Definitions 8 2.3 Domain-specific Languages 10 2.4 Programming Language Attributes 11 2.4.1 General Language Criteria 11 2.4.2 Productivity (Writability) 15 2.4.3 Understandability (Readability) 16 2.5 Layout Handling 17 2.5.1 Functional Languages 17 2.5.2 Declarative Languages 21 2.5.3 Imperative Languages 23 2.6 Java and Swing 24 2.7 Evaluation of Programming Languages 26 2.8 Summary 28 3 METHODOLOGY 31 3.1 Introduction 3.2 Design ofsgll 31 3.2.1 Syntax ofsgll 32 3.2.2 Semantics of SGLL 33 3.3 Compiler Implementation Methodology 34 3.4 Experimental Design for the Productivity Experiment 35 3.4.1 Productivity Experiment Implementation 38 3.4.2 Confounding Factors for the Productivity Experiment 39 3.5 Experimental Design for the Understandability Experiment 3.5.1 Understandability Experiment Implementation 46 3.5.2 Confounding Factors for the Understandability Experiment 46 31 41 x

3.6 Summary 47 4 IMPLEMENTATION 48 4.1 Introduction 48 4.2 Syntax of SGLL (Support for Abstraction) 48 4.2. 1 Support for the Control Hierarchy 49 4.2.2 Combinators 51 4.2.3 Support for Control Properties 53 4.3 Semantics of SGLL 4.3.1 Semantic Equivalence 4.3.2 Abstract Syntactic Domains Abstract Production Rules Semantic Domains 56 4.3.5 Semantic Functions 59 4.3.3 4.3.4 4.3.6 Semantic Equations 61 4.3.7 Auxiliary Functions 62 4.3.8 Comments 64 4.4 Compiler Implementation 65 4.4. 1 Steps Taken in Building the Compiler 70 4.5 Summary 74 5 ANALYSIS AND DISCUSSION OF RESULTS 5.1 Introduction 75 5.2 Productivity Experiment 75 5.3 Understandability Experiment 79 Summary 83 5.4 6 CONCLUSION AND FUTURE WORK 84 6.1 Introduction 84 6.2 Contributions of the Research 84 6.3 Future Work 85 6.3.1 Additional Features 85 6.3.2 Further Evaluation 85 6.3.3 Tool Development 86 6.4 Conclusion 87 REFERENCES 88 APPENDICES 91 BIODATA OF THE AUTHOR 127 54 54 55 55 75 xi

LIST OF TABLES Tabl e Page 2.1 List of language criteria from Appleby and VandeKopple (1997) 12 3.1 Experimental design for the productivity experiment 35 3.2 Experimental design for the understandability experiment 41 5.1 Data from the Java productivity experiment 76 5.2 Data from the SGLL productivity experiment 77 5.3 Raw data for the ANOVA test for productivity (units are seconds) 78 5.4 Data from the Java understandability experiment 80 5.5 Data from the SGLL understandability experiment 81 5.6 Raw data for the Friedman test for understandability (units are percentages) 82 xii

LIST OF FIGURES Figure 1.1 Layout handling pseudocode for Java 2.1 Layout produced by TkGofer for "(A «B) /V\ C" 2.2 Layout produced by FranTk for "title 'beside' timevalue" 2.3 Example of GroovyMarkup code 2.4 Example of Eve code 2.5 Example of Tk code 2.6 Example of Java code 4. 1 A sample layout 4.2 Partitioning of the layout in Figure 4.1 4.3 SGLL code for the layout in Figure 4.2 4.4 Java code for the layout in Figure 4.2 4.5 Separated containers version of Figure 4.3 4.6 The 'above' combinator 4.7 The 'beside' combinator 4.8 Setting properties in Java 4.9 Setting properties in SGLL 4.10 Overall structure of the SGLL compiler 4.11 Example SGLL layout 4.12 Layout trees for SGLL layout in Figure 4.11 4.13 A layout with no children 4.14 Tree for layout in Figure 4.13 4.15 Control table structure 4.16 Smallest SGLL program Page 3 20 20 22 23 24 25 49 49 49 50 51 52 52 53 53 66 67 67 68 68 69 70 xiii

4.17 Example of a one-control program 4.18 Example of an n-control, one combinator program 4.19 Example of an n-combinator (single type) program 4.20 Example of a nested containers + y-axis combinator program 4.21 Example of single/multi-line comments 4.22 Example of a separated containers program 70 71 71 72 73 73 xiv

LIST OF ABBREVIATIONS DSL GRAIL GUI IDE MSDOS SGLL Domain-specific Language Genuinely Readable And Intuitive Language Graphical User Interface Integrated Development Environment Microsoft Disk Operating System Swing Gill Layout Language xv

CHAPTER 1 INTRODUCTION 1.1 Background In 1995, Sun Microsystems presented the Java (Sun Microsystems, 2005) language to the world. Nowadays, it is one of the most popular programming languages, as evidenced informally by the TIOBE Programming Community Index (Tiobe Software, 2005). Java is an object-oriented imperative language, i.e., it has support for objects as an abstraction method, as well as being based on the von Neumann architecture, with its emphasis towards variables, assignment statements and the iterative form of repetition. Imperative programming has a long history, starting with FORTRAN in the 1950s and continuing on with languages such as C (in the 1970s) and Java (Sebesta, 1999). Since Java is a general-purpose programming language, its syntax will not be heavily tailored towards any specific programming task. Therefore, there are cases where a domain-specific language (or special-purpose language), tailored for a certain task, is more appropriate for the job. Such languages can provide significant boosts in productivity, usually by allowing the programmer to write less code for the same results (Spinellis and Guruprasad, 1997).

One area, in which we consider Java syntax to be deficient to the task at hand, is for the task of layout handling. A layout specifies the relative position and size of controls in an application's Graphical User Interface (GUI). While it is certainly possible to write layout handling code in Java itself, we suggest that it would be better for the programmer if a domain-specific language is used instead, since a domain-specific language can provide greater expressive power (van Deursen, et al., 2000). Thereby, we present a new domain-specific language based on Java that is designed for layout handling, named Swing GUI Layout Language or SGLL (Swing is the official GUI toolkit for Java). We present evidence in this thesis that our language provides significant boosts in programmer productivity and source code understandability compared to Java. In this thesis, we define productivity as the time taken to perfonn a specific layouthandling task. We also defme understandability generally as the ease in which programs can be read and understood, and empirically as the percentage of the answer containing errors when converting a layout in source code form to a layout in graphical form, given a fixed amount of time. The compiler for SGLL is a source code generator. The generator produces Java code from a specification written in SGLL. The Java code produced can be compiled and executed like a normal Java program. The SGLL language itself is declarative. We represent a layout using a data structure, rather than as computer instructions. 2

There has been work done in the literature using a source code generator with initial results that show development of a complete user interface using that generator to be faster than using raw Java (da Silva, et al., 2000). In this study, instead of developing a source code generator that can produce a complete user interface in Java, we concentrate only on the layout manager approach used by Java, since comparison of individual language features provide the most scientific results (Furuta and Kemp, 1979). 1.2 Problem Statement Currently, Java uses the layout manager approach for layout handling. In the layout manager approach, each container (or parent for a group of controls) has a layout manager associated with it. The task of this layout manager is to arrange the controls under its supervision using a certain set of rules, specific to each layout manager. Figure 1.1 shows the general structure of layout handling pseudocode for Java. container.setlayout(new LayoutManager(initial parameters)); container. add (controll, layout parameters); container. add (contro12, layout parameters); container. add (contro13, layout parameters); Figure 1.1: Layout handling pseudocode for Java Therefore, we have identified the following problems with the current approach: The layout resulting from that code is not apparent from the code itself. More specifically, the linear adding of controls does not correspond well to the tree structure of a layout hierarchy, thus reducing understandability. 3

There is redundancy in the Java approach. More specifically, the programmer needs to type "container. add" every time he or she adds a new control to a container. Not only does such redundancy reduce productivity by adding the programmer's workload unnecessarily, but such redundancy also reduces understandability by cluttering up the source code. 1.3 Objective of the Research The objective of this research is to design and implement a GUI layout language for Swing. During language design, emphasis will be given on the language attributes of productivity and understandability. For productivity, the measurement to be used is the time taken to produce a layout, using either the Java or SGLL programming language as appropriate. For understandability, the measurement to be used is the percentage of the answer containing errors. The answer here refers to a hand-drawn layout that is directly derived from Java or SGLL source code as appropriate. Our definitions of productivity and understandability are equivalent to Sebesta's definitions of writability and readability respectively (Sebesta, 1999). We have chosen the two attributes for evaluation in this study because, according to Sebesta (1999), they are considered to be the most important attributes for language users. 1.4 Scope of the Research This research is scoped according to the following delimitations: 4