仅具有AJAX功能的prototype.js [英] prototype.js with the AJAX functionality only

查看:75
本文介绍了仅具有AJAX功能的prototype.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!


是否有人只使用

的AJAX功能切割了prototype.js的版本?


>网站的70kb js代码仍然是一个巨大的负担。



我是prototype.js主题的新手,所以我认为这个任务

应由其他开发者完成。


也许protorype.js应该分成小块
带有分组功能的js脚本的

功能发布中的



谢谢

解决方案

Da ******** @ gmail.com 写道:


是否有人剪切了prototype.js的版本

仅限AJAX功能?

70kb的网站代码仍然是一个巨大的负担。

我是原型的新手。 js主题,所以我认为这个任务

应该由其他开发者完成。


也许protorype.js应该分成小块

具有分组功能的js脚本
功能发布中的



Prototype.js几乎是完全相互依赖的。它提供的所有更高级别的

设施完全依赖于剩余代码的大部分。这个

是Prototype.js中最基本的设计缺陷之一,并且

是如此根深蒂固,现在永远无法纠正。


Richard。


1月30日下午3:43,Richard Cornford < Rich ... @ litotes.demon.co.uk>

写道:


Dautkha ... @ gmail.com写道:


是否有人只使用

的AJAX功能切割了prototype.js的版本?


70kb网站的js代码仍然是一个巨大的负担。

我是prototype.js主题的新手,所以我认为这个任务

应该由其他开发者完成。



如果添加一些分号和gzip,我认为该文件小于16

kb。这根本不是使用Prototype.js的论据。我只是

说。那里有一些叫做Prototype light的东西。

删除了许多不太常用的功能。我想在这个较小的版本中必须说明Ajax部分

。但是我不认为这会更好用,因为Prototype充满了问题。


也许protorype.js应该拆分成小块


的js脚本具有分组功能

在功能发布中?



Prototype.js几乎是完全相互依赖的。它提供的所有更高级别的

设施完全依赖于剩余代码的大部分。这个

是Prototype.js中最基本的设计缺陷之一,并且

是如此根深蒂固,现在永远无法纠正。



为什么不能纠正?我认为他们很容易。可以编写

库,使其具有相同的API,并且库的内部不依赖于库的糖。

库的内部结构取决于库的糖。事实上他们不这样做是图书馆弱点的一个标志。

Prototype社区对模块化的好处不感兴趣,或者说很多其他优秀的编程实践。所以如果通过

根深蒂固的你的意思是文化根深蒂固然后我认为你是

可能是对的。


彼得


< blockquote> 1月30日,9:28 pm,Dautkha ... @ gmail.com写道:


你好!


是否有人只使用

的AJAX功能切割了prototype.js的版本?


70kb网站的js代码仍然是巨大的负担。



我认为它可以很容易地减小到大约30KB。但是如果你想要的只是AJAX功能,我就不推荐使用Prototype。


>

我是prototype.js主题的新手,所以我认为这个任务

应该由其他开发人员完成。



这不是讨论Prototype.js的地方,除非你想讨论
讨论它的一些特殊方面javascript in

general。


>

也许protorype.js应分成小块

具有分组功能的js脚本
功能发布中的



你最好与Prototype社区讨论这个问题,他们有自己的核心b $ b。新闻组。你有机会让他们这样做

非常苗条,虽然他们可能会指向你可能已经完成它的其他人。


以下AJAX库既可以使用,也可以使用更多功能以及更小的
并使用正常的javascript编码风格:


YAHOO! UI

< URL: http://developer.yahoo.com/yui/docs/...l.Connect.html >


AjaxToolbox

< URL: http://www.ajaxtoolbox.com/ >


FORK

< URL: http://www.forkjavascript.org/ajax/docs >

-

Rob


Hello !

Does anybody have cutted version of prototype.js with
the AJAX functionality only?

>70kb js code for a web site is still a huge burden.

I am a new in prototype.js topic, so I think this task
should be done by other developers.

Maybe protorype.js should be splitted into small pieces
of the js scripts with groupped functionality
in a feature releases?

Thanks

解决方案

Da********@gmail.com wrote:

Does anybody have cutted version of prototype.js with
the AJAX functionality only?

70kb js code for a web site is still a huge burden.
I am a new in prototype.js topic, so I think this task
should be done by other developers.

Maybe protorype.js should be splitted into small pieces
of the js scripts with groupped functionality
in a feature releases?

Prototype.js is almost completely interdependent. All of the higher level
facilities it provides rely 100% on the bulk of the remaining code. This
is one of the most fundamental of the design flaws in Prototype.js, and
is so ingrained that it can never now be rectified.

Richard.


On Jan 30, 3:43 pm, "Richard Cornford" <Rich...@litotes.demon.co.uk>
wrote:

Dautkha...@gmail.com wrote:

Does anybody have cutted version of prototype.js with
the AJAX functionality only?

70kb js code for a web site is still a huge burden.
I am a new in prototype.js topic, so I think this task
should be done by other developers.

If you add a few semicolons and gzip I think the file is less than 16
kb. That is not an argument to use Prototype.js at all. I''m just
saying. There is something out there called "Prototype light" that
removes a lot of less commonly used features. I imagine the Ajax part
must have stated in this smaller version. However I don''t think this
would be any better to use as Prototype is full of problems.

Maybe protorype.js should be splitted into small pieces

of the js scripts with groupped functionality
in a feature releases?


Prototype.js is almost completely interdependent. All of the higher level
facilities it provides rely 100% on the bulk of the remaining code. This
is one of the most fundamental of the design flaws in Prototype.js, and
is so ingrained that it can never now be rectified.

Why could it not be rectified? I think they could quite easily. The
library could be written so that it has the same API and that none of
the internals of the library depends on the library''s sugar. The fact
that they don''t do this is one sign of the library''s weakness. The
Prototype community has no interest in the benefits of modularity or
plenty of other good programming practices, however. So if by
"ingrained" you mean culturally ingrained then I think you are
probably right.

Peter


On Jan 30, 9:28 pm, Dautkha...@gmail.com wrote:

Hello !

Does anybody have cutted version of prototype.js with
the AJAX functionality only?

70kb js code for a web site is still a huge burden.

I think it can be reduced in size to around 30KB quite easily. But I
wouldn''t recommend Prototype if all you want is AJAX functionality.

>
I am a new in prototype.js topic, so I think this task
should be done by other developers.

This isn''t really the place to discuss Prototype.js unless you want to
discuss some particular aspect of it in regard to javascript in
general.

>
Maybe protorype.js should be splitted into small pieces
of the js scripts with groupped functionality
in a feature releases?

You''d better talk to the Prototype community about that, they have
their own "core" news group. You chances of getting them to do that
are very slim, though they may point you toward someone else who may
have done it.

The following AJAX libraries that are as, or more, functional as well
as smaller and use normal javascript coding style:

YAHOO! UI
<URL: http://developer.yahoo.com/yui/docs/...l.Connect.html >

AjaxToolbox
<URL: http://www.ajaxtoolbox.com/ >

FORK
<URL: http://www.forkjavascript.org/ajax/docs >
--
Rob


这篇关于仅具有AJAX功能的prototype.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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