【问题标题】:CommonJS for OOP in Appcelerator TitaniumAppcelerator Titanium 中面向 OOP 的 CommonJS
【发布时间】:2011-11-18 06:20:13
【问题描述】:

在 Appcelerator Titanium 移动应用程序中将 all javascript“类”编写为 CommonJS 模块而不是使用函数/对象表示法来创建新的“类”(或您如何称呼它们)是一种好习惯吗?无论如何在javascript中)?

var module = require('lib/module');

而不是

var object = new MyClass();

有什么缺点吗?

【问题讨论】:

    标签: javascript titanium commonjs


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2011-11-20
      • 2011-08-02
      • 1970-01-01
      • 2014-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-12
      相关资源
      最近更新 更多