亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Learning Qooxdoo - 1

標簽:
資訊
qooxdoo is a comprehensive and innovative Ajax application framework. Leveraging object-oriented JavaScript allows developers to build impressive cross-browser applications. No HTML, CSS nor DOM knowledge is needed.

I follow the “Hello World” tutorial and setup my first qooxdoo application.

It’s amazing that through a single Python command, we can generate four different type of solution for an application. They are “Source version with debug support”, “Build version”, “API reference”, “Unit Testing”.

In qooxdoo, all things are exist inside JavaScript Class. Developers do not even contact with HTML page. See the generated default class:

qx.Class.define("helloworld.Application", { extend: qx.application.Standalone, members: { 

 	main: function() { 

 		this.base(arguments); 

 		if (qx.core.Variant.isSet("qx.debug", "on")) { 

 			qx.log.appender.Native; 

 			qx.log.appender.Console; 

 		} 

 		var button1 = new qx.ui.form.Button("My First Button", "helloworld/test.png");  

 		var doc = this.getRoot(); 

 		doc.add(button1, { 

 			left: 200, 

 			top: 50 

 		}); 

 		button1.addListener("execute", 

 		function(e) { 

 			alert("Hello World!"); 

 		}); 

 	} 

 } 

});

When i generated the release version, this code was compressed and merged with the framework code into a single file:

 

(function() {

 var d = "helloworld.Application",

 c = "First Button",

 b = "helloworld/test.png",

 a = "execute";

 qx.Class.define(d, {

  extend: qx.application.Standalone,

  members: {

  main: function() {

  arguments.callee.base.call(this); {};

  var f = new qx.ui.form.Button(c, b);

  var e = this.getRoot();

  e.add(f, {

  left: 100,

  top: 50

  });

  f.addListener(a,

  function(e) {

  alert("Hello World!");

  });

  }

  }

 });

})();
點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消