Redian新闻
>
Random thoughts on Javascript
avatar
Random thoughts on Javascript# Java - 爪哇娇娃
g*y
1
I haven't touched javascript for quite a few years. In my last memory, it is
an ugly language -- limited capability, hard to debug.
In the tide of AJAX, I take a look at current Javascript. "AJAX in action"
is my reference. Following are some random thoughts:
* I am surprised at javascript's support of functional programming. Java
plan to add it in SDK 7, falling behind. And it's interesting to know that
javascript has nothing to do with java.
* I really hate to see statement like:
Function.prot
avatar
c*t
2

is
feel
JavaScript sub-classing is a major pain in the rear. One interesting
thing about JavaScript is that there is not a unique way doing inheritance,
which can be confusing and annoying. You can google JavaScript inheritance
and there are many approaches. I think that one AJAX group created an
approach which looked simpliest and no major issues.
One of the most important reason behind the numerous approaches is
because of IE's serious memory leak problem. IE 7 beta 3 still did
not fix it

【在 g**********y 的大作中提到】
: I haven't touched javascript for quite a few years. In my last memory, it is
: an ugly language -- limited capability, hard to debug.
: In the tide of AJAX, I take a look at current Javascript. "AJAX in action"
: is my reference. Following are some random thoughts:
: * I am surprised at javascript's support of functional programming. Java
: plan to add it in SDK 7, falling behind. And it's interesting to know that
: javascript has nothing to do with java.
: * I really hate to see statement like:
: Function.prot

avatar
m*t
3
Interesting topic. I personally think that, whether we want to call it "web
2.0", Ajax is _the_ catalyst that will bring Web-based computing to the next
level - closer to the "ubiquitous computing" utopia, that is. 8-)
I have been working on an ajax application for the past year or so, and
found that the situation with javascript has improved immensely from last
time I had to work with it (about 5 years ago). Two things have changed:
browser support for both CSS and javascript has become much b
avatar
g*y
4
>> One interesting thing about JavaScript is that there is not a unique way
doing inheritance, which can be confusing and annoying.
This is pain for communication. I remember a nice suggestion in coding style
that convention might be, it is still way better than multiple ones co-
exist.
>> I find that composition in JavaScript is easy and good OOD usually can
be good enough.
I can live with composition only as well. But I can't live if there is no
good refactoring tool. It will kill me to track
avatar
m*t
5

It's not an OOL.
But you _can_ do these in javascript.
avatar
f*4
6
I added some AJAX features to our applications since last year.
The javascript library I tried include prototype, GWT, YUI and Dojo.
GWT, YUI and Dojo are more frameworks than library.
Personally, I like fancy AJAX applications such as Gmail, Google notebook,
Google map and so on. But javascript is really a big headache. It's so
flexible that it's very hard to understand the sophisticated javascript code
. Those javascript frameworks are efforts to ease the javascript pain for
most programmers.
avatar
m*t
7

It's not an OOL.
But you _can_ do these in javascript.
avatar
f*4
8

I'm also not familiar with those tricky stuff. But I did
search Google/Yahoo and find them
Here is the javascript inheritance example
http://www.crockford.com/javascript/inheritance.html
Regarding dynamic binding, I can't find a quick example in google,
but I remember in Dojohttp://dojotoolkit.org/
source code comments I read some trick for object instance dynamic binding,
which means javascript can do dynamic binding, but it is tricky.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。