有没有人使用JS.Class并喜欢它? [英] Has anyone used JS.Class and liked it?

查看:67
本文介绍了有没有人使用JS.Class并喜欢它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人使用 JS.Class 并喜欢它?我之前使用过 Joose 并发现它非常适合创建非常好的干净代码可读和可维护。关于JS.Class的任何真实故事?

Has anyone used JS.Class and liked it? I 've used Joose before and find it really good in creating clean code that is very readable and maintainable. Any real life stories about JS.Class?

推荐答案

对不起这里的第一人称答案,但我还没有用过JS .Class,从Java / Javascript开发人员的角度来看,它看起来非常好。我们的团队致力于Java项目,我们的大多数前端使用自制的JavaScript(而不是少量的)。我们不使用任何JS框架(当我们的项目启动时jQuery不存在),我们甚至实现了我们自己的拖放/排序实用程序,它们大量使用了继承。

Sorry for the first-person answer here, but although I have not used JS.Class, from a Java/Javascript developer standpoint, it looks very good. Our team works on a Java project with most of our front end using home-brewed JavaScript (and not a small amount of it). We don't use any JS frameworks (jQuery didn't exist when our project started) and we've even implemented our own drag and drop/sort utilities that make extensive use of inheritance.

为了方便和使用继承的能力(以及通过大量的演变),我们最终开发的方法几乎与JS.Class完全相同(但不是那么广泛)。

For convenience and for the ability to use inheritance, (and through much evolution) we ended up developing methods that come to nearly the exact same patterns as JS.Class (but not nearly as extensive).

我在课程和模块,继承等文档中读到的所有东西看起来都很自然—事实上,看起来我们可以用替换新的JS.Class来替换我们所有的类创建方法(我们称之为 objectLib.createClass 的方法) 没有其他更改。

Everything I read in the docs on classes and modules, inheritance, etc. seemed very natural — in fact, it looks like we could probably replace all of our class-creation methods (a method we called objectLib.createClass) with new JS.Class with no other changes to make.

我们最终还开发了自己的Set类以及JS.Class包含的其他数组和对象实用程序。它是核心功能的一部分。

We also ended up developing our own Set classes and other array and object utilities that JS.Class includes as part of it's core functionality.

所以,虽然我不能说我已经使用过JS.Class并喜欢它,但我可以说这是一个Javascript开发者我需要解决JS.Class似乎解决的几乎所有问题。

So, while I can't say that I've used JS.Class and liked it, I can say that as a Javascript developer I have needed to solve nearly the exact problems that JS.Class appears to solve very well.

这篇关于有没有人使用JS.Class并喜欢它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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