Justin’s Blog

Web developer, I love this game.

针对javascript,对设计模式的思考。

November 13th, 2007 by Justin

JAVA中的一些特性,可以说都很好的匹配了这些个设计模式,并且,设计模式有很多好处。

但是在javascript中,寸土寸金,代码的量也是一个非常重要的考虑目标。代码小1K,下载速度就快一些,用户体验就好一些。

那么如何在javascript中,来实际应用这写设计模式。

像taobao小马同学,提出了为应用者,只提供工厂方法和工具方法。

这个思路很好,但是有个问题,在系统内部,我们又如何来团队合作?如何来增加扩展性?

都知道,JS里new一个对象的开销会比较大。这些设计模式多出了很多中间对象,我们该怎么办?

我还没想好,很乱,等晚上有空了静静思考下。哈哈


Posted in Web Development


2 Responses to “针对javascript,对设计模式的思考。”

大猫 | December 26th, 2007 at 4:06 pm

中文站首页开在那里,我的电脑就会明显慢一档…估计有N大的JS
还有闪啊闪的swf…


kindle case | June 15th, 2010 at 2:03 am

I’ve heard that Kindle is going to release a new waterproof cover in the spring. Is this true and will the issues of added glare and problems with the 5-way toggle be remedied? What is the release date for the product?


Leave a Reply