Наслаждайтесь этим изданием прямо сейчас, а также миллионами других - с бесплатной пробной версией

Только $9.99 в месяц после пробной версии. Можно отменить в любое время.

qooxdoo Beginner's Guide

qooxdoo Beginner's Guide

Автором Mohamed Raffi

Читать отрывок

qooxdoo Beginner's Guide

Автором Mohamed Raffi

910 pages
4 hours
Jan 5, 2012


This is a Packt beginner's guide. The unique style of the book is to set the requirements for an application, Team Twitter, in the first chapter and apply the concepts in the application as you learn in the following chapters. When you complete this book, you would have developed a complete application. Although the scope of this book is only on the Qooxdoo framework, which is a client side framework, we have explained how to set up one of the RPC servers and demonstrated the end to end application in the Team Twitter. This book is intended for the client side developers who design and develop internet web applications and enterprise web applications. If you want to start developing RIA applications in Qooxdoo, this book would be a great help to jump start your development. If you are already developing Qooxdoo applications, this book will help you to go through the Qooxdoo framework quickly to improve your contribution to your project. This book is also intended for the desktop application developers who want to move into RIA development and develop internet web applications and rich enterprise web applications. It also provides an idea for the Architects and Lead developers to know about Qooxdoo and evaluate the framework. It helps beginners in Qooxdoo to easily set up the development environment and explains the concepts in an order that is easily graspable by beginners.
Jan 5, 2012

Об авторе

Связано с qooxdoo Beginner's Guide

Похожие Книги

Похожие статьи

Предварительный просмотр книги

qooxdoo Beginner's Guide - Mohamed Raffi

Table of Contents



About the Authors

About the Reviewers


Support files, eBooks, discount offers, and more

Why Subscribe?

Free Access for Packt account holders


What this book covers

What you need for this book

Who this book is for


Time for action - heading

What just happened?

Pop quiz

Reader feedback

Customer support

Downloading the example code




1. What is qooxdoo?

A feel of an RIA developed in qooxdoo

Time for action - play with the feed reader application

Adding a feed to the feed reader

Checking the feeds

What just happened?

User context

Desktop characteristics

GUI library

Architecture of qooxdoo SDK

Core layer

Browser Abstraction layer

Low-Level layer

GUI Toolkit layer

Data Binding


qooxdoo framework features





API reference




Alternative programming models

Event-based rich UI programming

GUI widget library

Time for action - checking the demo browser and the playground applications

Demo browser


What just happened?

Application to be developed in this book—Team Twitter

Time for action - checking the Team Twitter application

Reading team tweets

Logging in to the Team Twitter application

Tweeting to the team

What just happened?

What you should know and what you don't need to know

Pop quiz


2. Say Hello to the qooxdoo World!

Installing qooxdoo tools

Time for action - installing qooxdoo tools

Installing ActivePython

Installing Cygwin

What just happened?

Installing qooxdoo SDK

Time for action - installing qooxdoo SDK






What just happened?

Creating a simple qooxdoo application

Time for action - creating a simple qooxdoo application

What just happened?






Passing data to the server

JSON standard format

What just happened?

Communicating with the server

Setting up an RPC connection

Making a call



Aborting a call

Error handling

Cross-domain calls

Parameter and result conversion

What just happened?

RPC servers

Integrating with the Java server

Time for action - integrating with the Java server

Working with Eclipse IDE

What just happened?

Pop quiz


3. Core Programming Concepts

Code comments and API documentation

Time for action - generating API documentation for Team Twitter

What just happened?

Object-oriented programming

Object and class












Constructor and destructor


Class members

Instance members


Static class

Singleton class

Abstract class

Inheritance in qooxdoo

Overriding in qooxdoo


Defining a mixin

Using a mixin in a class

Time for action - writing classes for Team Twitter

What just happened?

Pop quiz-I

qooxdoo properties

Property initialization

Predefined methods

Property configurations





Event—property level

Property features

Value checks




Advanced value handling


Memory management

Events—class level

Declaring events for a class

Adding listeners

Firing an event

Time for action - enhancing Team Twitter classes with properties

What just happened?

Pop quiz-II


4. Working with Layouts and Menus

Base classes for widgets


Object management

Event handling




Widget properties










Layout managers

Size hint of the widget and its parent widget

Layout properties

Auto sizing

Growing or shrinking









Time for action - designing layout managers for Team Twitter

What just happened?

Menu, MenuBar, and ToolBar


Menu creation



Pop quiz


5. Working with Widgets

Basic widgets




Time for action - enhancing the server application

What just happened?

Form widgets

Interface hierarchy

IBooleanForm, INumberForm, IDateForm, IColorForm, and IStringForm






Class hierarchy




















Time for action - adding widgets into Team Twitter

What just happened?

Special widgets

The popup widgets


The tooltip widgets


The control widgets




Custom widgets

Time for action - adding a custom widget to Team Twitter

What just happened?

Inline widgets

The table widget

Class hierarchy

Table construction

Remote table model

The tree widget

Class hierarchy

Tree construction

The treevirtual widget

Class hierarchy

TreeVirtual construction

Pop quiz


6. Working with Forms and Data

Form handling






Single column

Double column

Single column with placeholder


Time for action - enhancing the UserSignUpForm

What just happened?

Object pooling

Data binding

Single value binding

Property binding

Event binding

Hierarchical data binding

Array binding

Options map

Data controller

Object controller

List controller

Form controller

Tree controller

Data stores

JSON store

JSONP store

YQL store

Time for action - enhancing the UserSignUpForm again

What just happened?

Pop quiz


7. Testing and Debugging

Unit testing

Time for action - performing unit test

What just happened?

Integration testing

Integration test setup

Writing test cases

Simulator API documentation

Simulator class hierarchy

Selenium Java Client Driver API documentation

Locating strategy

Selenium locators

qooxdoo locators

Time for action - performing integration test

What just happened?


Logging statements in qooxdoo code

Console object



Variant qx.debug


Introduction to Firebug

Installing the Firebug add-on

IE developer tools

Tracing through AOP

Time for action - debugging

What just happened?

Pop quiz


8. Internationalization


Writing code to use internationalization



qx.locale.String, qx.locale.Number, qx.locale.Date, and qx.locale.Key

Writing PO files for various languages

Time for action - generating PO files for Team Twitter

What just happened?

Pop quiz


9. Working with Themes


Meta theme






Modern theme

Classic theme

Simple theme

Icon theme

Color theme

Font theme

Decoration theme





Writing new decorators

Appearance theme

Appearance selector (key)

Appearance entry (value)


Appearance map

Style entry in the appearance map

The include entry in the appearance map

The alias entry in the appearance map

Base calls


Appearance queue

Selector caching

Alias caching

Result caching

Time for action - customizing themes for Team Twitter

What just happened?

Pop quiz


10. Performance

Memory management

Object pooling



Compile-time tuning

Class optimizations




Base calls

Identifying unused classes

Lint check


Partitioning and lazy loading


Coding to load parts on demand


Recent improvements

Part collapsing or merging

Remove dependencies from the part loader

Load packages in parallel

Error handling


Time for action - partitioning

What just happened?

Good practices for performance

Restrict the data in certain widgets

Use filters


.gz compression

Pop quiz


11. Miscellaneous



Listing of keys in context

Job resolution

The extend key

The run key

The include key

Job shadowing and partial overriding


Time for action - migration

What just happened?

Back button support

Identify application states

Update history upon state change

Add the event listener to the history manager

Retrieve initial state

qooxdoo license

Pop quiz


A. Pop Quiz Answers

Chapter 1: What is qooxdoo?

Chapter 2: Say Hello to the qooxdoo World!

Chapter 3: Core Programming Concepts

Pop quiz-I

Pop quiz-II

Chapter 4: Working with Layouts and Menus

Chapter 5: Working with Widgets

Chapter 6: Working with Forms and Data

Chapter 7: Testing and Debugging

Chapter 8: Internationalization

Chapter 9: Working with Themes

Chapter 10: Performance

Chapter 11: Miscellaneous

B. References




Copyright © 2011 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: December 2011

Production Reference: 1161211

Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.

ISBN 978-1-84951-370-8


Cover Image by Duraid Fatouhi (<duraidfatouhi@yahoo.com> )



Rajesh Kumar Bachu

Mohamed Raffi


Ehsun Behravesh

Liang Yuxian Eugene

Acquisition Editor

Dilip Venkatesh

Development Editor

Meeta Rajani

Technical Editors

Vrinda Amberkar

Kedar Bhat

Copy Editors

Brandt D'Mello

Leonard D'Silva

Project Coordinator

Michelle Quadros


Mario Cecere

Aaron Nash


Hemangini Bari


Valentina D'Silva

Manu Joseph

Production Coordinators

Prachali Bhiwandar

Alwin Roy

Cover Work

Prachali Bhiwandar

About the Authors

Rajesh Kumar Bachu has over six years experience in the design and development of enterprise applications and mobile games. He is good at programming in Java and J2EE technologies. He has worked extensively in qooxdoo application development and has migrated an enterprise application to qooxdoo. You can find more about him at http://in.linkedin.com/in/rajbachu.

I am pleased to acknowledge my colleagues with whom I worked and learned qooxdoo, my co-author, Raffi, for bringing me on-board to write this book and qooxdoo team, who have actually given me the pleasure to write on qooxdoo. My special thanks to my parents. I would like to thank all my friends who directly or indirectly helped me to complete this book. My thanks to all those who have been involved with this book, especially to Mary Nadar, Dilip Venkatesh, Michelle Quadros, Meeta Rajani, Ehsun Behravesh, Liang Yuxian Eugene, Vrinda Amberkar, and Kedar Bhat.

Mohamed Raffi is an Enterprise Application Specialist. His area of work includes architecture, design, development, training, and mentoring. He has over thirteen years of product development experience in a variety of Java and JavaScript-based technologies and frameworks. You can find more about him at http://in.linkedin.com/in/raffimd and he writes his thoughts at http://thoughtstoblog.blogspot.com.

My sincere thanks to Packt Publishing for this opportunity. I would like to thank my co-author Rajesh for sharing the effort of writing this book. I am proud of the qooxdoo team for creating such a wonderful RIA framework. Also, I would like to thank all my colleagues for all the learning they have provided me with. I appreciate all the support provided by my parents and my wife in writing this book. My grandpa would be so proud (I wish he would have been here to see this). My thanks to all who were involved with this book, especially to Mary Nadar, Dilip Venkatesh, Michelle Quadros, Meeta Rajani, Ehsun Behravesh, Liang Yuxian Eugene, Vrinda Amberkar, and Kedar Bhat.

About the Reviewers

Ehsun Behravesh is a 28 year old post-graduate student at Universiti Putra, Malaysia (http://www.upm.edu.my/). He is majoring in Distributed and Parallel Computing. He is holds a bachelor's degree from the London Metropolitan University (http://www.londonmet.ac.uk/). He started programming when he was in high school and he has developed software systems for almost 10 years. He is a fan of open source software and one of his open source projects, MyPasswords (http://sourceforge.net/projects/mypasswords7/), won a comparison competition on LinuxFormat, January 2011 magazine. He loves computer programming, music, and animals.

I want to thank my wife who has always encouraged me to work and study. I also want to thank my parents who helped me to study abroad.

Liang Yuxian Eugene most recently completed an internship as a frontend engineer with Yahoo!, Taiwan after completing a double degree in Business Administration and Computer Science at National Cheng Chi University, Taipei, Taiwan.

He is also the author of JavaScript Testing Beginner's Guide, Packt Publishing.

Eugene enjoys solving difficult problems creatively in the form of building web applications using Python/Django/Tornado Web and JavaScript/jQuery. He is also passionate about social media, social network analysis, social computing, recommendation algorithms, link analysis, data visualization, data mining, information retrieval, business intelligence, and intelligent user interfaces.

Eugene seeks to solve business problems with Computer Science.

He can be reached at http://www.liangeugene.com.

Firstly, as a technical reviewer, I want to thank all the great folks at Packt Publishing for giving me the opportunity to work with such a great team of people. Secondly, I want to thank my family and friends for their kind understanding and putting up with my incredibly busy schedule. Lastly, I want to thank all the people I have met and have helped me out here-and-there along the way. It has been a great journey.


Support files, eBooks, discount offers, and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.


Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

Why Subscribe?

Fully searchable across every book published by Packt

Copy and paste, print and bookmark content

On demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.


Rich Internet Application (RIA) provides the capability to deliver feature-rich web applications, enables you to develop web applications with most of the desktop application's characteristics, and improves the usability of the web application. Over the last few years, many frameworks have arrived and are available to develop the Rich Internet Applications in different technologies.

qooxdoo is one of the comprehensive open source RIA frameworks. qooxdoo allows you to develop cross-browser RIAs in object-oriented JavaScript, which helps greatly to re-use application code, and hence reduces the application size. It provides a wide range of off-the-shelf UI widgets. qooxdoo comes with a rich feature set when compared to most of the other RIA frameworks. qooxdoo is completely based on JavaScript. It provides a variety of tools to build, optimize, generate documentation, and more. qooxdoo framework supports multiple browsers, multi-language deployment, custom look and feel, unit testing, automation testing, and much more.

In the past few years, all the major Internet applications or enterprise applications have been developed or migrated to RIA to support all the features that are provided in the desktop applications. This helps the organizations to keep the customers happy and also improves application deployment and maintenance.

qooxdoo is an open source framework. It has been there since 2005 and it is a quite stable framework now. If you are watching and waiting for the right time to migrate your application to qooxdoo, this is the right time, in my opinion.

What this book covers

Chapter 1, What is qooxdoo?, helps the developer to get an overview of the qooxdoo framework, to get to know what the framework provides, to know the architecture of the qooxdoo framework, and to get a feel of the RIA developed in qooxdoo.

Chapter 2, Say Hello to qooxdoo World!, guides the developer in setting up the development environment for the qooxdoo framework, to understand the communication with the server, and to set up one of the RPC servers that comes as a contribution project.

Chapter 3, Core Programming Concepts, explains the core programming concepts of qooxdoo. This chapter is a very important chapter as it explains the implementation syntax of basic object-oriented concepts such as class, interface, and so on. This chapter will help the developer to construct the application code in an object-oriented way.

Chapter 4, Working with Layouts and Menus, explains the layout design, toolbars, and menu bars.

Chapter 5, Working with Widgets, helps the developer to know about the various widgets available in the qooxdoo framework.

Chapter 6, Working with Forms and Data, explains form handling and data store support in the qooxdoo framework.

Chapter 7, Testing and Debugging, explains how to test and debug the qooxdoo application, as well as how to fix the identified issues.

Chapter 8, Internationalization, helps the developer to internationalize and localize the qooxdoo application to multiple languages.

Chapter 9, Working with Themes, aids the developer in understanding the theme support in qooxdoo and in designing a custom theme for the application.

Chapter 10, Performance, helps the developer to monitor and improve the performance of the qooxdoo application.

Chapter 11, Miscellaneous, covers a few miscellaneous topics that complete your understanding of qooxdoo.

Appendix, Pop Quiz Answers, contains the answers to all the pop quiz questions for all the chapters.

References: It contains the references used in this book.

What you need for this book

qooxdoo is completely based on object-oriented JavaScript. So, what you should be well versed in is just JavaScript. If you know the object-oriented concepts and have worked with any object-oriented language, such as Java, it will really help you to understand the qooxdoo programming concepts pretty quickly. Even if you haven't worked with any of the object-oriented languages, it is okay; you can learn the object-oriented concepts with qooxdoo.

Even though it is web development, you don't need to know HTML, DOM, CSS, and so on. qooxdoo generates HTML in runtime from the JavaScript code that you have written.

Who this book is for

This book is intended for the client-side developers who design and develop Internet web applications and enterprise web applications. If you want to start developing RIA in qooxdoo, this book would be of great help to jump start your development. If you are already developing qooxdoo applications, this book will help you to go through the qooxdoo framework quickly to improve your contribution to your project.

This book helps the beginners in qooxdoo to easily set up the development environment and explains the concepts in an order that can easily be grasped by beginners.

This book also provides an idea for the architects and lead developers to know about qooxdoo and evaluate the framework.

This book is also intended for the desktop application developers who want to move into RIA development and develop rich Internet applications and rich enterprise web applications.


In this book, you will find several headings appearing frequently.

To give clear instructions of how to complete a procedure or task, we use:

Time for action - heading

Action 1

Action 2

Action 3

Instructions often need some extra explanation so that they make sense, so they are followed with:

What just happened?

This heading explains the working of tasks or instructions that you have just completed.

You will also find some other learning aids in the book, including:

Pop quiz

These are short multiple-choice questions intended to help you test your own understanding.

You will also find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: Besides regular classes, it offers abstract, static, or singleton classes.

A block of code is set as follows:

-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd>

http://www.w3.org/1999/xhtml xml:lang=en>

Content-Type content=text/html; charset=utf-8


Any command-line input or output is written as follows:


ActivePython (ActiveState Software Inc.) based on

Python 2.7.1 (r271:86832, Feb 7 2011, 11:30:38) [MSC v.1500 32 bit (Intel)] on win32

Type help, copyright, credits or license for more information.


New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: Click on the Add Feed menu in the toolbar and add any feed that you want to put into the feed reader.


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to<feedback@packtpub.com>, and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.


Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at<copyright@packtpub.com> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.


You can contact us at<questions@packtpub.com> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. What is qooxdoo?

This chapter introduces the qooxdoo framework to you, explains the architecture, explores the framework features, briefs you about the GUI widget library, and provides an overall understanding about the qooxdoo framework. It takes you through an application developed in qooxdoo and also explains the application that we are going to develop throughout this book.

In this chapter, we'll cover the following:

A feel of an RIA developed in qooxdoo

Architecture of the qooxdoo SDK

qooxdoo framework features

Event-based Rich UI Programming

GUI Library

The application to be developed in this book—Team Twitter

What you should know and what you don't need to know

By the end of this chapter, you will have an understanding of the qooxdoo RIA framework and the programming languages or technologies required to develop an application in qooxdoo.

Let's begin to understand qooxdoo.

A feel of an RIA developed in qooxdoo

Before anything, let's get a feel for an application developed in qooxdoo. This will give a rough idea about the things that you can develop, depending on the features in that application. You can do more than that with qooxdoo. The following screenshot will give you an overview of the feed reader application:

Time for action - play with the feed reader application

Go to the qooxdoo demo feed reader URL (http://demo.qooxdoo.org/current/feedreader/), play with the feed reader application, and feel the qooxdoo application. Perform all the operations available in the application; observe the AJAX behavior, desktop-like features, and so on. Compare the behavior of this application with any typical web application. You can perform the following operations:

Adding a feed to the feed reader

Click on the Add Feed menu in the toolbar and add any feed that you want to put into the feed reader. Let's add the feed to the Google Open Source Blog. Enter Google Open Source Blog in the Title field and http://feeds.feedburner.com/GoogleOpenSourceBlog in the URL field. Click on the Add button. This will add a feed to the User Feeds section:


You must have observed that the add feed action displayed a modal dialog box without disturbing the existing content, and on add action, it just added a feed under the User Feeds section. It did not reload the entire page displayed in the browser. That is the beauty of AJAX applications.

Checking the feeds

Clicking on the RSS feed nodes on the tree panel will load the feeds on the right-hand side panel. Once you click on a particular feed post on the top pane in the right-hand side panel, it will load the details of that particular feed post

Вы достигли конца предварительного просмотра. Зарегистрируйтесь, чтобы узнать больше!
Страница 1 из 1


Что люди думают о qooxdoo Beginner's Guide

0 оценки / 0 Обзоры
Ваше мнение?
Рейтинг: 0 из 5 звезд

Отзывы читателей