Javascript库开发 [英] Javascript library development

查看:58
本文介绍了Javascript库开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从我一直在寻找的Javascript库开发,

支持Javascript 1.5 / ECMAScript 3 / JScript 5.5的浏览器看起来像

基准水平。


任何人都添加任何东西?


Aaron

解决方案

7月11日上午8:54,Aaron Gray < ang.use ... @ gmail.comwrote:


从我一直在寻找的Javascript库开发,



您打算自己编写库吗?


支持Javascript 1.5 / ECMAScript 3 / JScript 5.5的浏览器看起来像

基准水平。



大概是的。这取决于您的目标用户群和他们正在使用的浏览器

。如果它是针对一般网络和内部网的

每个人都在使用单个浏览器。


任何人都添加任何内容?



如果您使用功能检测和渐进增强,您的库

将在旧浏览器中正常失败。这是一种可持续的方法。

例如。 navigator.userAgent不应该出现在您的库中

代码。


有一个图书馆可以覆盖所有可能的诱饵

情况。这从来没有被证明是真实的,如果这样的库可以写成b / b,那将是巨大的。确定页面上

元素的位置是一个很大问题的例子。


确定库的要求然后找到或者

写一个库以满足这种需要。


Peter


" Peter Michaux" < pe ********** @ gmail.com写信息

新闻:a5 ******************** ************** @ t54g2000 hsg.googlegroups.com ...


7月11日上午8:54," ;亚伦格雷 < ang.use ... @ gmail.comwrote:


>从我一直在寻找的Javascript库开发,


你打算写自己的图书馆吗?



是。


>支持Javascript 1.5的浏览器/ ECMAScript 3 / JScript 5.5看起来像
基础级别。



大致是的。这取决于您的目标用户群和他们正在使用的浏览器

。如果是一般网络vs内部网,

每个人都使用一个浏览器。



是的,它看起来像是截止点。


有W3C DOM标准介绍和类似的东西br />
我试图解决的document.documentElement。


>任何人都添加了什么?



如果您使用功能检测和渐进增强功能,您的库

将在旧浏览器中正常失败。这是一种可持续的方法。

例如。 navigator.userAgent不应出现在您的库中

代码。



是的,除了错误报告:)


有一个图书馆可以引诱涵盖所有可能的

情况。这从来没有被证明是真实的,如果这样的库可以写成b / b,那将是巨大的。



是的,我正在寻找一个穷人ExtJS,因为ExtJS是双重许可证,而且商业用途非常昂贵。我正在寻找创建一个框架工作

与小部件结构一些基本的小部件并在LGPL下发布,

然后希望如果有任何其他人会贡献,那就是想法

无论如何。


确定页面上

元素的位置就是一个很大的例子问题。



对。我尝试尽可能使用附加到元素的事件。


确定您的库的要求然后找到或

写一个库以满足这种需要。



ExtJS是唯一的竞争者,但据我所说,

小规模商业用途是非常昂贵的。

Aaron


7月12日下午12:02,Aaron Gray < ang.use ... @ gmail.comwrote:


" Peter Michaux" < petermich ... @ gmail.com写信息

新闻:a5 *************************** ******* @ t54g2000 hsg.googlegroups.com ...


7月11日上午8:54,Aaron Gray < ang.use ... @ gmail.comwrote:


从我一直在寻找的Javascript库开发,


你打算写自己的图书馆吗?



是的。



尽管你有足够的尊重,如果你是足够新的浏览器脚本来询问你的问题,我建议你写一下一些库

并且在向全世界发布库之前,真正探索JavaScript语言和浏览器运行时

。通过探索,我的意思是花一两年时间阅读其他图书馆,编写示例库,

阅读Richard Cornford和Douglas等程序员的文章

克罗克福德。 Crockford的'javascript :好的部分"本书实际上只是一本关于JavaScript的书,它试图探索

JavaScript的lambda性质并利用它获得最大收益。有关Lisp的书籍和

计划(特别是计算机程序的结构和解释,以及由Abelson和Sussman提供的
)是lambda语言,通常很远

比JavaScript书籍质量更高,但这些想法很容易转化为

JavaScript。关于浏览器脚本的优质书籍最难找到。


在网上已经可以下载
$ b的JavaScript库了。 $ b浏览器脚本使用已发布的API并随后

已修复由编写浏览器脚本的经验很少的人和

谁似乎带着很多行李和/或先入为主的想法

如何用他们写的任何语言进行编程

抵达JavaScript。 (通常他们用基于类的,非语言的b $ b语言进行编程,这种语言与JavaScript几乎完全相反。)这些

的努力导致图书馆不会最大限度地利用

JavaScript做得很好,不完全承认浏览器环境的现实,并使用特征检测来处理它们,

假设他们知道正确的做事方式并且最终得到了一个API

,这很难让他们使用的技术很难用b $ b选择更多经验。


如果你使用特征检测和渐进增强你的库

将会失败优雅地在旧浏览器中。这是一种可持续的方法。

例如。 navigator.userAgent不应出现在您的库中

代码。



是,除了错误报告:)



报告什么样的错误?


有一个诱饵,一个图书馆可以涵盖所有可能的

情况。这从来没有被证明是真实的,如果这样的库可以写成b / b,那将是巨大的。



是的,我正在寻找一个穷人的ExtJS,因为ExtJS是一个双重许可证,并且

非常昂贵的商业用途。我正在寻找创建一个框架工作

与小部件结构一些基本的小部件并在LGPL下发布,

然后希望如果有任何其他人会贡献,那就是想法

无论如何。


确定页面上

元素的位置就是一个很大的例子问题。



对。我尝试尽可能使用附加到元素的事件。



在这种情况下,事件目标解析不是我所指的。

这将是一个非常疯狂的方法来识别被点击的内容,对于

示例。


确定您的库的要求然后找到或者

写一个库来满足这个需要。



ExtJS是唯一的竞争者



为什么?这个小组的所有常客都写了浏览器脚本,我认为

none使用ExtJS。


但是正如我所说的那样非常昂贵的

小规模的商业用途。



如果ExtJS的质量被认为是可以接受的(可能会在这个新闻组中高度争论
)那么为什么不分叉呢? br />
版本的ExtJS可以免费用于商业用途吗?


Peter


From what I have been looking at for Javascript library development,
browsers that support Javascript 1.5/ECMAScript 3/JScript 5.5 looks like the
base level to pitch at.

Anyone add anything ?

Aaron

解决方案

On Jul 11, 8:54 am, "Aaron Gray" <ang.use...@gmail.comwrote:

From what I have been looking at for Javascript library development,

Are you going to be writing your own library?

browsers that support Javascript 1.5/ECMAScript 3/JScript 5.5 looks like the
base level to pitch at.

Roughly yes. It depends on your targeted user base and the browsers
they are using. If it is for the general web vs for an intranet where
everyone is using a single browser.

Anyone add anything ?

If you use feature detection and progressive enhancement your library
will fail gracefully in older browsers. It is a sustainable approach.
For example. navigator.userAgent should not appear in your library
code.

There is a lure that a single library can cover all possible
situations. That has never been shown to be true and if such a library
could be written it would be huge. Determining the position of an
element on the page is an example of a big problem.

Identify the requirements for you library and then either find or
write a library to suit that need.

Peter


"Peter Michaux" <pe**********@gmail.comwrote in message
news:a5**********************************@t54g2000 hsg.googlegroups.com...

On Jul 11, 8:54 am, "Aaron Gray" <ang.use...@gmail.comwrote:

>From what I have been looking at for Javascript library development,


Are you going to be writing your own library?

Yes.

>browsers that support Javascript 1.5/ECMAScript 3/JScript 5.5 looks like
the
base level to pitch at.


Roughly yes. It depends on your targeted user base and the browsers
they are using. If it is for the general web vs for an intranet where
everyone is using a single browser.

Yes, it looks like the cutoff point.

There''s the W3C DOM standard introduction and things like
document.documentElement which I have tried to address.

>Anyone add anything ?


If you use feature detection and progressive enhancement your library
will fail gracefully in older browsers. It is a sustainable approach.
For example. navigator.userAgent should not appear in your library
code.

Yes, other than for error reporting :)

There is a lure that a single library can cover all possible
situations. That has never been shown to be true and if such a library
could be written it would be huge.

Yes, I am looking at a poormans ExtJS, as ExtJS is a dual licence and is
very expensive for commercial usage. I am looking at creating a frame work
with widget structure a few basic widgets and publish it under the LGPL,
then hopefully if it is anygood others will contribute, thats the idea
anyway.

Determining the position of an
element on the page is an example of a big problem.

Right. I try to use events attached to elements where ever possible.

Identify the requirements for you library and then either find or
write a library to suit that need.

ExtJS is the only contender but as I said it is prohibitorly expensive for
small scale commercial usage.

Aaron


On Jul 12, 12:02 pm, "Aaron Gray" <ang.use...@gmail.comwrote:

"Peter Michaux" <petermich...@gmail.comwrote in message
news:a5**********************************@t54g2000 hsg.googlegroups.com...

On Jul 11, 8:54 am, "Aaron Gray" <ang.use...@gmail.comwrote:

From what I have been looking at for Javascript library development,

Are you going to be writing your own library?


Yes.

With all due respect, if you are new enough to browser scripting to be
asking the questions that you are, I suggest you write a few libraries
and really explore the JavaScript language and the browser runtimes
before you release a library to the world. By explore, I mean spend at
least a year reading other libraries, writing example libraries,
reading articles by programmers like Richard Cornford and Douglas
Crockford. Crockford''s "javascript: the good parts" book is really the
only book on JavaScript that attempts to explore the lambda-nature of
JavaScript and exploit it for maximum gain. Books about Lisp and
Scheme (especially "Structure and Interpretation of Computer Programs"
by Abelson and Sussman) which are lambda languages, are generally far
higher quality than JavaScript books but the ideas translate to
JavaScript quite readily. Quality books on browser scripting are at
least hard to find.

On the web it is already possible to download JavaScript libraries for
browser scripting with APIs that were published and subsequently
"fixed" by people with little experience writing browser scripts and
who seemed to carry a lot of baggage and/or preconceived ideas about
how to program from whatever language they wrote in before they
arrived in JavaScript. (Usually they programmed in a class-based, non-
lambda language which is almost polar opposite to JavaScript.) These
efforts have resulted in libraries that don''t maximize use of the
things JavaScript does well, don''t fully acknowledge the realities of
the browser environment and use feature detection to deal with them,
assume they know the right way to do things and end up with an API
that is really difficult to make work with the techniques they would
choose with more experience.

If you use feature detection and progressive enhancement your library
will fail gracefully in older browsers. It is a sustainable approach.
For example. navigator.userAgent should not appear in your library
code.


Yes, other than for error reporting :)

What kind of error reporting?

There is a lure that a single library can cover all possible
situations. That has never been shown to be true and if such a library
could be written it would be huge.


Yes, I am looking at a poormans ExtJS, as ExtJS is a dual licence and is
very expensive for commercial usage. I am looking at creating a frame work
with widget structure a few basic widgets and publish it under the LGPL,
then hopefully if it is anygood others will contribute, thats the idea
anyway.

Determining the position of an
element on the page is an example of a big problem.


Right. I try to use events attached to elements where ever possible.

Event target resolution is not what I was referring to in this case.
That would be a really crazy way to identify what was clicked, for
example.

Identify the requirements for you library and then either find or
write a library to suit that need.


ExtJS is the only contender

Why? All the regulars on this group write browser scripts and I think
none uses ExtJS.

but as I said it is prohibitorly expensive for
small scale commercial usage.

If the quality of ExtJS is considered acceptable (which would likely
be highly debated on this newsgroup) then why not fork the last
version of ExtJS that was free for commercial use?

Peter


这篇关于Javascript库开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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