开发者

Which is more suited to JavaScript games development, CommonJS or RequireJS?

I'm planning on building a JavaScript, html5, nodejs based game. I know that Nodejs uses CommonJS, however I know RequireJS is a rival of CommonJS which is supposedly better suited to the client. Is RequireJS be a better alternative for my client-side JavaSc开发者_如何学编程ript?

I've got no experience in either of the APIs yet.

http://requirejs.org/

http://www.commonjs.org/


Your question doesn't really make sense. CommonJS is nothing more than a set of standards for common tasks in Javascript development. RequireJS is an implementation of the CommonJS module system for web browsers. Node is a server side Javascript platform, which implements various CommonJS standards.

In short, Node is used for server side Javascript programming and RequireJS is used for modularising client side Javascript code. You can use RequireJS in Node, as an alternative module system, but that is not its primary use case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜