为了账号安全,请及时绑定邮箱和手机立即绑定

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
提交
取消