66
http://qooxdoo.org 1

meet.js - QooXDoo

Embed Size (px)

DESCRIPTION

Presentation from meet.js about QooXDoo framework.

Citation preview

Page 1: meet.js - QooXDoo

http://qooxdoo.org

1

Page 2: meet.js - QooXDoo

EXAMPLES

2

Page 3: meet.js - QooXDoo

EXAMPLES

3

Page 4: meet.js - QooXDoo

EXAMPLES

4

Page 5: meet.js - QooXDoo

5

Page 6: meet.js - QooXDoo

IT'S NOT A TOY

6

Page 7: meet.js - QooXDoo

IT'S NOT A TOY

let's count files:

Penny:downloads singles$ wget http://downloads..../qooxdoo-1.5-sdk.zip [...]HTTP request sent, awaiting response... 200 OKLength: 67875249 (65M) [application/zip] !!!Saving to: `qooxdoo-1.5-sdk.zip'

100%[=======================================>] 67,875,249 616K/s in 96s

2011-10-01 19:10:51 (693 KB/s) - `qooxdoo-1.5-sdk.zip' saved [67875249/67875249]

Penny:downloads singles$ tar -xf qooxdoo-1.5-sdk.zip Penny:downloads singles$ ls -R qooxdoo-1.5-sdk | wc -l 15517 !!! (includes test files, icons for 3 themes etc.)

7

Page 8: meet.js - QooXDoo

IT'S NOT A TOY

let's see example api page:

8

Page 9: meet.js - QooXDoo

IT'S NOT A TOY

qx.Class.define("foo.lib.io.HttpRequest", { type: 'abstract', extend : qx.io.request.Xhr, implement: [IFooInterface, IBarInterface], include : [app.MMessage], properties : { showLoadingDialog : { check : "Boolean", init : true } }, construct : function(vUrl, vMethod) { this.base(arguments, vUrl); this.addListener("fail", this._onError, this); }, members : { _onError : function() { this.showError(Tools.tr("io.request:error")); }, }});

let's see some code:

9

Page 10: meet.js - QooXDoo

IT'S NOT A TOY

qx.Class.define("foo.lib.io.HttpRequest", { type: 'abstract', class type extend : qx.io.request.Xhr, implement: [IFooInterface, IBarInterface], include : [app.MMessage], properties : { showLoadingDialog : { check : "Boolean", init : true } }, construct : function(vUrl, vMethod) { this.base(arguments, vUrl); this.addListener("fail", this._onError, this); }, members : { _onError : function() { this.showError(Tools.tr("io.request:error")); }, }});

let's see some code:

10

Page 11: meet.js - QooXDoo

IT'S NOT A TOY

qx.Class.define("foo.lib.io.HttpRequest", { type: 'abstract', extend : qx.io.request.Xhr, inheritance implement: [IFooInterface, IBarInterface], include : [app.MMessage], properties : { showLoadingDialog : { check : "Boolean", init : true } }, construct : function(vUrl, vMethod) { this.base(arguments, vUrl); this.addListener("fail", this._onError, this); }, members : { _onError : function() { this.showError(Tools.tr("io.request:error")); }, }});

let's see some code:

11

Page 12: meet.js - QooXDoo

IT'S NOT A TOY

qx.Class.define("foo.lib.io.HttpRequest", { type: 'abstract', extend : qx.io.request.Xhr, implement: [IFooInterface, IBarInterface], interfaces include : [app.MMessage], properties : { showLoadingDialog : { check : "Boolean", init : true } }, construct : function(vUrl, vMethod) { this.base(arguments, vUrl); this.addListener("fail", this._onError, this); }, members : { _onError : function() { this.showError(Tools.tr("io.request:error")); }, }});

let's see some code:

12

Page 13: meet.js - QooXDoo

IT'S NOT A TOY

qx.Class.define("foo.lib.io.HttpRequest", { type: 'abstract', extend : qx.io.request.Xhr, implement: [IFooInterface, IBarInterface], include : [app.MMessage], mixins ! properties : { showLoadingDialog : { check : "Boolean", init : true } }, construct : function(vUrl, vMethod) { this.base(arguments, vUrl); this.addListener("fail", this._onError, this); }, members : { _onError : function() { this.showError(Tools.tr("io.request:error")); }, }});

let's see some code:

13

Page 14: meet.js - QooXDoo

IT'S NOT A TOY

qx.Class.define("foo.lib.io.HttpRequest", { type: 'abstract', extend : qx.io.request.Xhr, implement: [IFooInterface, IBarInterface], include : [app.MMessage], properties : { showLoadingDialog : { check : "Boolean", like C#, but better :) init : true } }, construct : function(vUrl, vMethod) { this.base(arguments, vUrl); this.addListener("fail", this._onError, this); }, members : { _onError : function() { this.showError(Tools.tr("io.request:error")); }, }});

let's see some code:

14

Page 15: meet.js - QooXDoo

IT'S NOT A TOY

qx.Class.define("foo.lib.io.HttpRequest", { type: 'abstract', extend : qx.io.request.Xhr, implement: [IFooInterface, IBarInterface], include : [app.MMessage], properties : { showLoadingDialog : { check : "Boolean", init : true } }, construct : function(vUrl, vMethod) { this.base(arguments, vUrl); this.addListener("fail", this._onError, this); }, members : { protected member (also private & public) _onError : function() { this.showError(Tools.tr("io.request:error")); }, }});

let's see some code:

15

Page 16: meet.js - QooXDoo

OVERENGINERED?

16

Page 17: meet.js - QooXDoo

OVERENGINERED?

NO.

17

Page 18: meet.js - QooXDoo

OVERENGINERED?

NO.

WELL DESIGNED!

18

Page 19: meet.js - QooXDoo

BUT!

19

Page 20: meet.js - QooXDoo

BUT!

YOU HAVE TO KNOW WHAT YOU ARE DOING

20

Page 21: meet.js - QooXDoo

BUT!

YOU HAVE TO KNOW WHAT YOU ARE DOING

IN ANOTHER CASE...

21

Page 22: meet.js - QooXDoo

22

Page 23: meet.js - QooXDoo

QOOXDOO

+FRAMEWORK

=

FRAMEWORKFRAMEWORK

GUI TOOLKIT

23

Page 24: meet.js - QooXDoo

LOT OF FEATURES

24

Page 25: meet.js - QooXDoo

LOT OF FEATURES

BUT WE DON'T HAVE TIME TO TALK ABOUT ALL OF

THEM, SO...

25

Page 26: meet.js - QooXDoo

LOT OF FEATURES

BUT WE DON'T HAVE TIME TO TALK ABOUT ALL OF

THEM, SO...

HTTP://QOOXDOO.ORG/ABOUT

26

Page 27: meet.js - QooXDoo

THINGS WORTH MENTIONING *

* IMHO

27

Page 28: meet.js - QooXDoo

DOCUMENTATION

28

Page 29: meet.js - QooXDoo

DOCUMENTATION

463����������� ������������������  pagesjust����������� ������������������  manualwithout����������� ������������������  api����������� ������������������  docs

29

Page 30: meet.js - QooXDoo

DOCUMENTATION

30

+ PLAYGROUND (RIA & MOBILE)

+ DEMOS

Page 31: meet.js - QooXDoo

MIXINS

31

Page 32: meet.js - QooXDoo

MIXINS

Something like interfaces, but with implementation.

32

Page 33: meet.js - QooXDoo

MIXINS

qx.Mixin.define("foo.lib.tools.MAwesomeLogger",{ members : { logWithTrace : function(what) { console.log(what); console.trace(); } }});

qx.Class.define("foo.app.Bar", { include: [foo.lib.tools.MAwesomeLogger], construct: function() { this.logWithTrace(this); }}

33

Page 34: meet.js - QooXDoo

PROPERTIES

34

Page 35: meet.js - QooXDoo

35

Page 36: meet.js - QooXDoo

qx.Class.define('foo.bar', { extend: qx.core.Object, properties: { phrase: { // autogenerate setter and getter and ... apply: '_applyPhrase' // fire on property modification (not init!) - return // value is ignored

nullable: true, // can be null event: 'someEvent' // default changeFoo - fires on property change check: ['suit up', 'bazinga'], // check possible inserts, also could be defined as a // function - works only in development!

transform: '_transformPhrase' // transform value - BEFORE check and apply validate: qx.util.Validate.string // works in development and production }, awesome: { init: false, check: 'Boolean' } nerd: { init: false, check: 'Boolean' } }, members: { _transformPhrase: function(value) { return value + '!'; } _applyPhrase: function(value, old, name) { if (value === 'suit up!') { this.toggleAwesome('awesome'); } else if (value === 'bazinga!') { this.toggleAwesome('nerd'); } } }});

36

Page 37: meet.js - QooXDoo

LOT OF CONSISTENT(!) GUI COMPONENTS

37

Page 38: meet.js - QooXDoo

GUI COMPONENTS

38

Page 39: meet.js - QooXDoo

GUI COMPONENTS

39

Page 40: meet.js - QooXDoo

GUI COMPONENTS

40

Page 41: meet.js - QooXDoo

GUI COMPONENTS

41

Page 42: meet.js - QooXDoo

GUI COMPONENTS

42

Themeable of course ;)

Page 43: meet.js - QooXDoo

EASY KEY/COMMANDS BINDING

43

Page 44: meet.js - QooXDoo

EASY KEY/COMMANDS BINDING

var findWindow = new qx.ui.window.Window('search');//findWindow configuration...

var find = new qx.event.Command("Ctrl+F"), close = new qx.event.Command('Esc'); find.addListener("execute", function() { findWindow.open();}, this);close.addListener("execute", function() { findWindow.close();}, this);

44

Page 45: meet.js - QooXDoo

EASY ELEMENTS POSITIONING

(WITH LAYOUTS)

45

Page 46: meet.js - QooXDoo

EASY ELEMENTS POSITIONING

46

Page 47: meet.js - QooXDoo

EASY REST CALLS

47

Page 48: meet.js - QooXDoo

EASY REST CALLS

48

var description = { index: { method: "GET", url: "/photos" } create: { method: "POST", url: "/photos" } show: { method: "GET", url: "/photos/:id" } update: { method: "PUT", url: "/photos/:id" }}var photos = new qx.io.rest.Resource(description); //declarativelyphotos.map('destroy', 'DELETE', '/photos/:id'); //programaticallyphotos.index(); // --> GET /photosphotos.show({id: 1}); // --> GET /photos/1

// "success" is fired when any request associated to resource receives a responsephotos.addListener("success", function(e) { e.getAction(); // --> "index" or "show"});

// "indexSuccess" is fired when the request associated to the index action receives a responsephotos.addListener("indexSuccess", function(e) { e.getAction(); // --> "index"});

Page 49: meet.js - QooXDoo

HTML EDITOR OUT OF THE BOX

49

Page 50: meet.js - QooXDoo

HTML EDITOR

50

"The html editor does have some issues. Just not to give the impression that it would try to compete with more advanced editors like ckEditor,

etc., because it doesn't. Still fine for many products, though." [Andreas Ecker]

Page 51: meet.js - QooXDoo

ADVANCED BUILD TOOL

51

Page 52: meet.js - QooXDoo

ADVANCED BUILD TOOL

52

Penny:frontend singles$ ./generate.py list>>> Available jobs: - api -- create api doc for the current library - api-data -- create api doc json data files - build - clean -- remove local cache and generated .js files (source/build) - distclean -- remove the cache and all generated artefacts of this library (source, build, ...) - fix -- normalize whitespace in .js files of the current library (tabs, eol, ...) - info -- collects environment information like the qooxdoo version etc., and prints it out - inspector -- create an inspector instance in the current library - lint -- check the source code of the .js files of the current library - migration -- migrate the .js files of the current library to the current qooxdoo version - pretty - profiling -- includer job, to activate profiling - simulation-build -- (experimental) create a runner app for simulated interaction tests - simulation-run -- (experimental) launches simulated interaction tests generated with simulation-build - source - source-all -- create source version of current application, with all classes - source-hybrid -- create a hybrid version (app classes as source files, others compiled) - test -- create a test runner app for unit tests of the current library - test-source -- create a test runner app for unit tests (source version) of the current library - translation -- create .po files for current library

Page 53: meet.js - QooXDoo

WORKS: STANDALONE (IN BROWSER), INSIDE EXISTING WEBPAGES OR

NATIVE (WITHOUT GUI)

53

Page 54: meet.js - QooXDoo

MOBILE SUPPORT

54

Page 55: meet.js - QooXDoo

MOBILE SUPPORT

55

Page 56: meet.js - QooXDoo

DEVELOPER FRIENDLY(TESTS & TOOLS)

56

Page 57: meet.js - QooXDoo

DEVELOPER FRIENDLY

57

Page 58: meet.js - QooXDoo

DEVELOPER FRIENDLY

58

Page 59: meet.js - QooXDoo

LOCALIZATION AND TRANSLATION

59

Page 60: meet.js - QooXDoo

AND MUCH MORE...

60

Page 61: meet.js - QooXDoo

"WAIT����������� ������������������  WAIT.����������� ������������������  IT����������� ������������������  LOOKS����������� ������������������  LIKE����������� ������������������  I����������� ������������������  CAN����������� ������������������  USE����������� ������������������  IT����������� ������������������  JUST����������� ������������������  FOR����������� ������������������  UGLY����������� ������������������  AN����������� ������������������  BORING����������� ������������������  WEB����������� ������������������  APPLICATIONS"

61

Page 62: meet.js - QooXDoo

NOT REALLY...

62

Page 63: meet.js - QooXDoo

63

HTTP://WWW.LORDOFULTIMA.COM/EN/

Page 64: meet.js - QooXDoo

QUESTIONS?

64

Page 65: meet.js - QooXDoo

THANKS!

65

Page 66: meet.js - QooXDoo

66

name: Radosław Benkel

nick: singles

www: http://www.rbenkel.me

twitter: @singlespl

* and I have nothing in common with http://www.singles.pl ;]