哪个JavaScript库具有最全面的类继承支持? [英] Which JavaScript Library Has the Most Comprehensive Class Inheritance Support?

查看:64
本文介绍了哪个JavaScript库具有最全面的类继承支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在玩了十几个不同的JavaScript库,比如Prototype,jQuery,YUI之后,我发现每个不同的库都有不同的模拟某种类层次结构的方式,并提供某种类继承支持。 (除了jQuery)除了非常恼火,当你创建一个新类时,它必须依赖于库,除非你采用普通的方法。



我想知道哪个库提供了对类继承的最佳支持以及原因。



我希望有一天JavaScript Library的作者可以就类创建和继承的一种风格达成一致。

解决方案

我发现有一个以Ruby为模型的Javascript框架:



Js.Class



另一个好处是:



Joose-js (模仿驼鹿(perl))



我更喜欢Josse ,因为它似乎更积极地开发,语法看起来也很整洁! / p>

任何想法??? (也许这应该是另一个问题??)


After playing with a dozen different JavaScript Libraries such as Prototype, jQuery, YUI, just to name a few, I found every different library has a different way of simulating some sort of Class Hierarchy and provide some sort of Class Inheritance support. (Other than jQuery) Other than being very annoyed that when you create a new class, it has to be library dependent, unless you do the plain old way.

I'm wondering which library offers the best support for class inheritance in general and why.

I hope maybe one day JavaScript Library authors can agree on one style for Class creation and inheritance.

解决方案

I found out there is a Javascript Framework modeled after Ruby:

Js.Class

Another good one is:

Joose-js (modeled after moose (perl) )

I prefer Josse, because it seems to be more actively developed, and the syntax looks neat too!

Any thoughts??? (Maybe this should be another question??)

这篇关于哪个JavaScript库具有最全面的类继承支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆