Qooxdoo Documentation Release 5.0.2

Total Page:16

File Type:pdf, Size:1020Kb

Qooxdoo Documentation Release 5.0.2 qooxdoo Documentation Release 5.0.2 qooxdoo developers January 12, 2017 Copyright ©2011–2017 1&1 Internet AG CONTENTS 1 Introduction 1 1.1 About...................................................1 1.1.1 Framework...........................................1 1.1.2 GUI Toolkit...........................................1 1.1.3 Communication.........................................1 1.1.4 More Information (online)...................................2 1.2 Feature Overview............................................2 1.2.1 Runtimes............................................2 1.2.2 Object-orientation........................................2 1.2.3 Programming..........................................2 1.2.4 Internationalization.......................................3 1.2.5 API reference..........................................3 1.2.6 Testing.............................................3 1.2.7 Deployment...........................................3 1.2.8 Migration............................................4 1.3 Architectural Overview.........................................4 1.4 Getting Started..............................................4 1.4.1 qx.Website...........................................4 1.4.2 qx.Desktop...........................................6 1.4.3 qx.Mobile............................................7 1.4.4 qx.Server............................................8 1.4.5 Others.............................................. 10 2 Core 11 2.1 Object Orientation............................................ 11 2.1.1 Introduction to Object Orientation............................... 11 2.1.2 Features of Object Orientation................................. 12 2.1.3 Classes............................................. 18 2.1.4 Interfaces............................................ 24 2.1.5 Mixins.............................................. 27 2.2 Properties................................................. 29 2.2.1 Introduction to Properties.................................... 29 2.2.2 Properties in more detail.................................... 33 2.2.3 Initialization Behavior..................................... 43 2.2.4 Property features summarized................................. 44 2.3 Environment............................................... 46 2.3.1 Environment.......................................... 46 2.4 Data Binding............................................... 51 2.4.1 Data Binding.......................................... 51 i 2.5 Interaction Events............................................ 64 2.5.1 Pointer Events.......................................... 64 2.5.2 Gesture Events......................................... 64 3 qx.Website 67 3.1 General.................................................. 67 3.1.1 qx.Website Overview...................................... 67 3.1.2 Module Overview........................................ 68 3.2 Widget Library.............................................. 74 3.2.1 qx.Website Widgets....................................... 74 3.3 Tutorials................................................. 76 3.3.1 Tutorial: Building Notifications................................ 76 3.4 Layouts.................................................. 80 3.4.1 Layouts............................................. 80 3.5 Technical Topics............................................. 81 3.5.1 Plugins............................................. 81 3.5.2 Referring to the qx.bom API.................................. 82 4 qx.Desktop 89 4.1 Overview................................................. 89 4.1.1 Widgets............................................. 89 4.1.2 Composites........................................... 89 4.1.3 Roots.............................................. 90 4.1.4 Applications........................................... 90 4.1.5 Communication......................................... 91 4.2 How to Develop a qx.Desktop Application............................... 91 4.2.1 General Cycle of Activities................................... 91 4.2.2 Build Version.......................................... 91 4.2.3 Running the Source Version through a Web Server...................... 92 4.3 Widgets Introduction........................................... 93 4.3.1 Widget............................................. 93 4.3.2 Basic Widgets.......................................... 94 4.3.3 Interaction............................................ 96 4.3.4 Resources............................................ 99 4.3.5 Selection Handling....................................... 102 4.3.6 Drag & Drop.......................................... 105 4.3.7 Inline Widgets.......................................... 109 4.3.8 Custom Widgets........................................ 111 4.3.9 Form Handling......................................... 116 4.3.10 Menu Handling......................................... 132 4.3.11 Window Management...................................... 136 4.3.12 Table Styling.......................................... 137 4.3.13 Widget Reference........................................ 151 4.4 Layouts.................................................. 151 4.4.1 Layouting............................................ 151 4.5 Themes.................................................. 156 4.5.1 Theming............................................. 156 4.5.2 Appearance........................................... 164 4.5.3 Custom Themes......................................... 170 4.5.4 Decorators............................................ 172 4.5.5 Web Fonts............................................ 174 4.5.6 Using themes of contributions in your application....................... 175 4.5.7 Three steps for efficient theme development.......................... 177 4.6 Technical Concepts............................................ 179 ii 4.6.1 The Event Layer........................................ 179 4.6.2 HTML Element Handling.................................... 180 4.6.3 The Focus Layer........................................ 182 4.6.4 Using qx.Website in qx.Desktop................................ 184 4.7 Tutorials................................................. 185 4.7.1 Tutorial Part 1: The Beginning of a Tweets App........................ 185 4.7.2 Tutorial Part 2: Finishing the UI................................ 187 4.7.3 Tutorial Part 3: Time for Communication........................... 191 4.7.4 Tutorial Part 4.1: Form Handling................................ 196 4.7.5 Tutorial Part 4.2: Custom Widgets............................... 198 4.7.6 Tutorial Part 4.2.1: Basic Theming............................... 204 4.7.7 Tutorial Part 4.3: Translation.................................. 208 4.7.8 Tutorial Part 4.4: Unit Testing................................. 212 4.7.9 Tutorial Part 4.5: Virtual List.................................. 217 4.8 Migration................................................. 220 4.8.1 Migration from qx.Desktop 2.x................................. 220 5 qx.Mobile 223 5.1 General.................................................. 223 5.1.1 Overview............................................ 223 5.1.2 qx.Mobile Requirements.................................... 225 5.1.3 Getting Started with qooxdoo qx.Mobile............................ 226 5.2 Tutorials................................................. 227 5.2.1 Tutorial: Creating a Tweets Client with qooxdoo mobile................... 227 5.3 Development............................................... 236 5.3.1 Mobile and tablet switch.................................... 236 5.3.2 Theming............................................. 240 5.3.3 Migrating a qx.Mobile theme to another version........................ 244 5.3.4 Resolution and Pixel Density.................................. 249 5.3.5 Debugging........................................... 252 5.4 Deployment............................................... 254 5.4.1 Deployment........................................... 254 6 qx.Server 255 6.1 Server Overview............................................. 255 6.1.1 Included Features........................................ 255 6.1.2 Supported Runtimes...................................... 255 6.1.3 Installation........................................... 256 6.1.4 Basic Example......................................... 256 6.1.5 Additional Scenarios...................................... 256 6.2 qx.Server Requirements......................................... 256 6.2.1 Runtimes............................................ 257 6.2.2 Installation........................................... 257 6.3 RequireJS Support............................................ 257 6.3.1 Representable interface..................................... 258 6.3.2 Config file............................................ 258 7 Communication 261 7.1 Low-level requests............................................ 261 7.2 Higher-level requests........................................... 261 7.2.1 Higher-level requests...................................... 261 7.2.2 AJAX.............................................. 266 7.3 REST................................................... 268 7.3.1 REST (Representational State Transfer)............................ 268 iii 7.4 Remote Procedure Calls (RPC)..................................... 272 7.4.1 RPC (Remote Procedure Call)................................. 272 7.4.2 RPC Servers........................................... 277 7.5 Specific Widget Communication..................................... 281 7.5.1 Using the remote table
Recommended publications
  • Introduction to React.Js
    Introduction to React A workshop for COMP 523 Aaron Smith Monday, Feb. 10, 2020 What is React? • React is a JavaScript framework • Used for front end web development • Think of jQuery, but more structured • Created and used by Facebook • Famous for implementing a virtual dom Timeline of front-end JavaScript frameworks jQuery* AngularJS React Vue Angular (2006) (2010) (2013) (2014) (2014) * jQuery is more often considered a library than a framework Common tasks in front-end development App state Data definition, organization, and storage User actions Event handlers respond to user actions Templates Design and render HTML templates Routing Resolve URLs Data fetching Interact with server(s) through APIs and AJAX Fundamentals of React 1. JavaScript and HTML in the same file (JSX) 2. Embrace functional programming 3. Components everywhere JavaScript and HTML in the same file HTML CSS JS JSX CSS or JSS Traditional React approach approach JSX: the React programming language const first = "Aaron"; const last = "Smith"; const name = <span>{first} {last}</span>; const list = ( const listWithTitle = ( <ul> <> <li>Dr. David Stotts</li> <h1>COMP 523</h1> <li>{name}</li> <ul> </ul> <li>Dr. David Stotts</li> ); <li>{name}</li> </ul> </> ); “React is just JavaScript” Functional programming 1. Functions are “first class citizens” 2. Variables are immutable 3. Functions have no side effects Functional programming Functions are “first class citizens” let add = function() { console.log('Now adding numbers'); const five = 3 + 2; }; function foo() { return
    [Show full text]
  • Remote Procedure Calls
    Lectures on distributed systems Remote Procedure Calls Paul Krzyzanowski Introduction, or what’s wrong with sockets? OCKETS are a fundamental part of client-server networking. They provide a S relatively easy mechanism for a program to establish a connection to another program, either on a remote or local machine and send messages back and forth (we can even use read and write system calls). This interface, however, forces us to design our distributed applications using a read/write (input/output) inter- face which is not how we generally design non-distributed applications. In design- ing centralized applications, the procedure call is usually the standard interface model. If we want to make distributed computing look like centralized comput- ing, input-output-based communications is not the way to accomplish this. In 1984, Birrell and Nelson devised a mechanism to allow programs to call procedures on other machines. A process on machine A can call a procedure on machine B. The process on A is suspended and execution continues on B. When B returns, the return value is passed to A and A continues execution. This mechanism is called the Remote Procedure Call (RPC). To the programmer, the goal is that it should appear as if a normal procedure call is taking place. Obvi- ously, a remote procedure call is different from a local one in the underlying implementation. Steps in a remote procedure call Clearly, there is no architectural support for making remote procedure calls. A local procedure call generally involves placing the calling parameters on the stack and executing some form of a call instruction to the address of the proce- dure.
    [Show full text]
  • THE FUTURE of SCREENS from James Stanton a Little Bit About Me
    THE FUTURE OF SCREENS From james stanton A little bit about me. Hi I am James (Mckenzie) Stanton Thinker / Designer / Engineer / Director / Executive / Artist / Human / Practitioner / Gardner / Builder / and much more... Born in Essex, United Kingdom and survived a few hair raising moments and learnt digital from the ground up. Ok enough of the pleasantries I have been working in the design field since 1999 from the Falmouth School of Art and onwards to the RCA, and many companies. Ok. less about me and more about what I have seen… Today we are going to cover - SCREENS CONCEPTS - DIGITAL TRANSFORMATION - WHY ASSETS LIBRARIES - CODE LIBRARIES - COST EFFECTIVE SOLUTION FOR IMPLEMENTATION I know, I know, I know. That's all good and well, but what does this all mean to a company like mine? We are about to see a massive change in consumer behavior so let's get ready. DIGITAL TRANSFORMATION AS A USP Getting this correct will change your company forever. DIGITAL TRANSFORMATION USP-01 Digital transformation (DT) – the use of technology to radically improve performance or reach of enterprises – is becoming a hot topic for companies across the globe. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-02 Companies face common pressures from customers, employees and competitors to begin or speed up their digital transformation. However they are transforming at different paces with different results. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-03 Successful digital transformation comes not from implementing new technologies but from transforming your organisation to take advantage of the possibilities that new technologies provide.
    [Show full text]
  • Mixins and Traits
    ◦ ◦◦◦ TECHNISCHE UNIVERSITAT¨ MUNCHEN¨ ◦◦◦◦ ◦ ◦ ◦◦◦ ◦◦◦◦ ¨ ¨ ◦ ◦◦ FAKULTAT FUR INFORMATIK Programming Languages Mixins and Traits Dr. Michael Petter Winter 2016/17 What advanced techiques are there besides multiple implementation inheritance? Outline Design Problems Cons of Implementation Inheritance 1 Inheritance vs Aggregation 1 2 (De-)Composition Problems Lack of finegrained Control 2 Inappropriate Hierarchies Inheritance in Detail A Focus on Traits 1 A Model for single inheritance 1 2 Inheritance Calculus with Separation of Composition and Inheritance Expressions Modeling 2 3 Modeling Mixins Trait Calculus Mixins in Languages Traits in Languages 1 (Virtual) Extension Methods 1 Simulating Mixins 2 Squeak 2 Native Mixins Reusability ≡ Inheritance? Codesharing in Object Oriented Systems is often inheritance-centric. Inheritance itself comes in different flavours: I single inheritance I multiple inheritance All flavours of inheritance tackle problems of decomposition and composition The Adventure Game Door ShortDoor LockedDoor canPass(Person p) canOpen(Person p) ? ShortLockedDoor canOpen(Person p) canPass(Person p) The Adventure Game Door <interface>Doorlike canPass(Person p) canOpen(Person p) Short canPass(Person p) Locked canOpen(Person p) ShortLockedDoor ! Aggregation & S.-Inheritance Door must explicitely provide canOpen(Person p) chaining canPass(Person p) Doorlike must anticipate wrappers ) Multiple Inheritance X The Wrapper FileStream SocketStream read() read() write() write() ? SynchRW acquireLock() releaseLock() ! Inappropriate Hierarchies
    [Show full text]
  • Declaring Vars in Class Php
    Declaring Vars In Class Php Is Tobe Esculapian or misformed after aluminous Neall plopping so magnanimously? Forrest corresponds prolixly? Forbidden Osmund sometimes pargets any lilliputian yell guardedly. How variable as int, php in using interpolation rather than configured one of people prefer to override whatever information useful whenever you call it leads to expose parts that We daily work with advertisers relevant to our readers. Acceptable in php programmers and retry saving again, declaration must be. Declaring a property but a class is an exact task use one table the keyword public protected or private followed by a normal variable declaration If. If you wrong there holding an IE bug with var a foo only declaring a global for file scope. Your class declaration format is declared protected field? You help also define methods in the class that allow tool to manipulate the values of object properties and perform operations on objects. PHP Class Properties Tutorials by Supun Kavinda. An amazon associate we declare the class in declarations as containers for our clients in the usages of a name given client exits and in? How clean and in declaring a class declaration scope in the vars of that are their parent selector. Using long array syntax array 1 2 3 for declaring arrays is generally. By declaring a class declaration, classes and see for? It turns out some interview situations, every time to magento source and other class names but you have a common occurrence, therefore considered a value. The var keyword in PHP is used to declare the property or variable of class which is primitive by default The var keyword is alike as out when declaring variables or root of a class Note The var keyword was deprecated from version 50.
    [Show full text]
  • Distributed Objects in C
    Rochester Institute of Technology RIT Scholar Works Theses 2006 Distributed Objects in C# Xiaoyun Xie Follow this and additional works at: https://scholarworks.rit.edu/theses Recommended Citation Xie, Xiaoyun, "Distributed Objects in C#" (2006). Thesis. Rochester Institute of Technology. Accessed from This Master's Project is brought to you for free and open access by RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact [email protected]. Rochester Institute of Technology Department of Computer Science Master of Science Project Distributed Objects System in C# Submitted By: Xie, Xiaoyun (Sherry) Date: February 2004 Chairman: Dr. Axel T. Schreiner Reader: Dr. Hans-Peter Bischof Observer: Dr. James Heliotis 2 ABSTRACT Today more and more programs run over a collection of autonomous computers linked by a network and are designed to produce an integrated computing facility. Java Distributed Objects (JDO) proposed by Dr. Axel T. Schreiner [1] builds an infrastructure which allows distributed program components to communicate over a network in a transparent, reliable, efficient, and generic way. JDO was originally intended as a teaching device to assess design parameters for distributed objects. This project focuses on porting JDO, which is implemented in Java on Sun’s JDK, to C# on Microsoft’s .NET. On one hand, it builds an infrastructure in C# that simplifies the construction of distributed programs by hiding the distributed nature of remote objects. On the other hand, it generates insights into the differences between two platforms, namely, Java on Sun and C# on .NET, in the distributed objects area.
    [Show full text]
  • IADIS Conference Template
    www.seipub.org/ie Information Engineering (IE) Volume 3, 2014 Performance and Quality Evaluation of jQuery Javascript Framework Andreas Gizas, Sotiris P. Christodoulou, Tzanetos Pomonis HPCLab, Computer Engineering & Informatics Dept., University of Patras Rion, Patras Received Jun 10, 2013; Revised Jun 21, 2013; Accepted Mar 12, 2014; Published Jun 12, 2014 © 2014 Science and Engineering Publishing Company Abstract devices. Mobile web is the name of this new field of The scope of this work is to provide a thorough web applications and JavaScript is expected to play a methodology for quality and performance evaluation of the major role in its development with the evolution of most popular JavaScript framework, the jQuery Framework, new devices and standards (ex. iPhone, Android) or as by taking into account well established software quality the heart of cross platform applications (like factors and performance tests. The JavaScript programming phonegap.com). There are also proposals for language is widely used for web programming and employing JavaScript in server-side applications increasingly, for general purpose of computing. Since the (Server-Side JavaScript Reference v1.2). growth of its popularity and the beginning of web 2.0 era, many JavaScript frameworks have become available for Due to the plethora of applications that JavaScript programming rich client-side interactions in web serves and the variety of programming needs, applications. The jQuery project and its community serve frameworks have been created in order to help both today as a major part of web programmers. The main programmers and end-users. These frameworks aim to outcome of this work is to highlight the pros and cons of be a useful tool for simplifying JavaScript code jQuery in various areas of interest and signify which and development and repeat blocks of code by using just a where the weak points of its code are.
    [Show full text]
  • Learning Javascript Design Patterns
    Learning JavaScript Design Patterns Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Learning JavaScript Design Patterns by Addy Osmani Copyright © 2012 Addy Osmani. All rights reserved. Revision History for the : 2012-05-01 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449331818 for release details. ISBN: 978-1-449-33181-8 1335906805 Table of Contents Preface ..................................................................... ix 1. Introduction ........................................................... 1 2. What is a Pattern? ...................................................... 3 We already use patterns everyday 4 3. 'Pattern'-ity Testing, Proto-Patterns & The Rule Of Three ...................... 7 4. The Structure Of A Design Pattern ......................................... 9 5. Writing Design Patterns ................................................. 11 6. Anti-Patterns ......................................................... 13 7. Categories Of Design Pattern ............................................ 15 Creational Design Patterns 15 Structural Design Patterns 16 Behavioral Design Patterns 16 8. Design Pattern Categorization ........................................... 17 A brief note on classes 17 9. JavaScript Design Patterns .............................................. 21 The Creational Pattern 22 The Constructor Pattern 23 Basic Constructors 23 Constructors With Prototypes 24 The Singleton Pattern 24 The Module Pattern 27 iii Modules 27 Object Literals 27 The Module Pattern
    [Show full text]
  • The Snap Framework: a Web Toolkit for Haskell
    The Functional Web The Snap Framework A Web Toolkit for Haskell Gregory Collins • Google Switzerland Doug Beardsley • Karamaan Group askell is an advanced functional pro- the same inputs, always produce the same out- gramming language. The product of more put. This property means that you almost always H than 20 years of research, it enables rapid decompose a Haskell program into smaller con- development of robust, concise, and fast soft- stituent parts that you can test independently. ware. Haskell supports integration with other Haskell’s ecosystem also includes many power- languages and has loads of built-in concurrency, ful testing and code-coverage tools. parallelism primitives, and rich libraries. With Haskell also comes out of the box with a set its state-of-the-art testing tools and an active of easy-to-use primitives for parallel and con- community, Haskell makes it easier to produce current programming and for performance pro- flexible, maintainable, high-quality software. filing and tuning. Applications built with GHC The most popular Haskell implementation is enjoy solid multicore performance and can han- the Glasgow Haskell Compiler (GHC), a high- dle hundreds of thousands of concurrent net- performance optimizing native-code compiler. work connections. We’ve been delighted to find Here, we look at Snap, a Web-development that Haskell really shines for Web programming. framework for Haskell. Snap combines many other Web-development environments’ best fea- What’s Snap? tures: writing Web code in an expressive high- Snap offers programmers a simple, expressive level language, a rapid development cycle, fast Web programming interface at roughly the same performance for native code, and easy deploy- level of abstraction as Java servlets.
    [Show full text]
  • Final Study Report on CEF Automated Translation Value Proposition in the Context of the European LT Market/Ecosystem
    Final study report on CEF Automated Translation value proposition in the context of the European LT market/ecosystem FINAL REPORT A study prepared for the European Commission DG Communications Networks, Content & Technology by: Digital Single Market CEF AT value proposition in the context of the European LT market/ecosystem Final Study Report This study was carried out for the European Commission by Luc MEERTENS 2 Khalid CHOUKRI Stefania AGUZZI Andrejs VASILJEVS Internal identification Contract number: 2017/S 108-216374 SMART number: 2016/0103 DISCLAIMER By the European Commission, Directorate-General of Communications Networks, Content & Technology. The information and views set out in this publication are those of the author(s) and do not necessarily reflect the official opinion of the Commission. The Commission does not guarantee the accuracy of the data included in this study. Neither the Commission nor any person acting on the Commission’s behalf may be held responsible for the use which may be made of the information contained therein. ISBN 978-92-76-00783-8 doi: 10.2759/142151 © European Union, 2019. All rights reserved. Certain parts are licensed under conditions to the EU. Reproduction is authorised provided the source is acknowledged. 2 CEF AT value proposition in the context of the European LT market/ecosystem Final Study Report CONTENTS Table of figures ................................................................................................................................................ 7 List of tables ..................................................................................................................................................
    [Show full text]
  • “Web Development Using Python” 01 April 2021
    A Report on the Webinar “Web development using Python” 01 April 2021 Organized by ‘Anacron’, Students association of the Department of Computer Science and Engineering, Akshaya College of Engineering and Technology A webinar, “Web development using Python” was organized by the students’ association, ‘Anacron’ of the department of Computer Science and Engineering, on 1-4-21. A brief report of the same is given below. WELCOME ADDRESS: Welcome address was given by Dr. N. Rajkumar, HOD/CSE, ACET. INTRODUCTION OF CHIEF GUEST Ms. J. Rajichellam completed her UG degree B.E CSE in Madurai Institute of Engineering and Technology. She is having certificates of proficiency in C, C++, HTML5, CSS, Javascript, Jquery, etc.,. She is having more than 6 years of industrial experience and currently working as Technical trainer in Elysium Academy. CHIEF GUEST PRESENTATION: Ms. J. Rajichellam started her presentation with a brief note about the future for Web development using python and then explained about the career opportunities in Python. She also explained as to why students should be well versed in python. She also urged the students to have a goal for their career and for that they should envisage a plan. She opined that without a plan they can’t achieve success. She said, Web development is an umbrella term for conceptualizing, creating, deploying and operating web applications and application programming interfaces for the web. She basically gave explanation for three topics. 1. Why is web development important? The web has grown a mindboggling amount in the number of sites, users and implementation capabilities since the first website went live in 1989.
    [Show full text]
  • Analysing the Use of Outdated Javascript Libraries on the Web
    Updated in September 2017: Require valid versions for library detection throughout the paper. The vulnerability analysis already did so and remains identical. Modifications in Tables I, III and IV; Figures 4 and 7; Sections III-B, IV-B, IV-C, IV-F and IV-H. Additionally, highlight Ember’s security practices in Section V. Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web Tobias Lauinger, Abdelberi Chaabane, Sajjad Arshad, William Robertson, Christo Wilson and Engin Kirda Northeastern University {toby, 3abdou, arshad, wkr, cbw, ek}@ccs.neu.edu Abstract—Web developers routinely rely on third-party Java- scripts or HTML into vulnerable websites via a crafted tag. As Script libraries such as jQuery to enhance the functionality of a result, it is of the utmost importance for websites to manage their sites. However, if not properly maintained, such dependen- library dependencies and, in particular, to update vulnerable cies can create attack vectors allowing a site to be compromised. libraries in a timely fashion. In this paper, we conduct the first comprehensive study of To date, security research has addressed a wide range of client-side JavaScript library usage and the resulting security client-side security issues in websites, including validation [30] implications across the Web. Using data from over 133 k websites, we show that 37 % of them include at least one library with a and XSS ([17], [36]), cross-site request forgery [4], and session known vulnerability; the time lag behind the newest release of fixation [34]. However, the use of vulnerable JavaScript libraries a library is measured in the order of years.
    [Show full text]