473,698 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

prototype.js with the AJAX functionality only

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

Jan 30 '07 #1
23 1759
Da********@gmai l.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.

Jan 30 '07 #2
On Jan 30, 3:43 pm, "Richard Cornford" <Rich...@litote s.demon.co.uk>
wrote:
Dautkha...@gmai l.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

Jan 31 '07 #3
On Jan 30, 9:28 pm, Dautkha...@gmai l.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

Jan 31 '07 #4
On 31 ñÎ×., 09:42, "RobG" <r...@iinet.net .auwrote:
>
YAHOO! UI
<URL:http://developer.yahoo .com/yui/docs/YAHOO.util.Conn ect.html>
I tested three ajax-support libraries today, including prototype.
FORK not even tested since it has no functionality that I'll possibly
require in the future.
I choose yui. It'll be used in productional. It has only 10kb
minimized js code
for ajax support.

Thanks, Rob and all

Jan 31 '07 #5
On 31 ñÎ×., 09:42, "RobG" <r...@iinet.net .auwrote:
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.
Anyway, I love some concepts of prototype.js like a $() and $F()
shortcuts. I have to integrate into my project.

Jan 31 '07 #6
Peter Michaux wrote:
Richard Cornford wrote:
<snip>
>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.
<snip>

Try it and find out for yourself. However, remember that the full
contract for the API has never been spelled out in ECMAScript terms so
reproducing the API would require reproducing _everything_ that the API
currently does (quirk for consequential quirk). Baring in mind that its
own authors don't fully understand what they have written.

However, I would include the API itself as part of library's inherent
design flaws, so reproducing it does not seem like a worthwhile exercise.

Richard.

Feb 3 '07 #7
On Feb 3, 5:43 am, "Richard Cornford" <Rich...@litote s.demon.co.uk>
wrote:
Peter Michaux wrote:
Richard Cornford wrote:
<snip>
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.

<snip>

Try it and find out for yourself. However, remember that the full
contract for the API has never been spelled out in ECMAScript terms so
reproducing the API would require reproducing _everything_ that the API
currently does (quirk for consequential quirk).
Ok. If you add that requirement then it is a different story, more
work and more pointless. I thought part of the deal would be to
implement the current API how they authors think it works.
Modularization of the current Prototype library could still be done by
in-lining code for calls to other parts of the library but the code
would expand at least some.
Baring in mind that its
own authors don't fully understand what they have written.
What makes you think that? (I'm not disagreeing.)
However, I would include the API itself as part of library's inherent
design flaws, so reproducing it does not seem like a worthwhile exercise.
Agreed.

Peter

Feb 3 '07 #8
Peter Michaux said the following on 2/3/2007 12:23 PM:
On Feb 3, 5:43 am, "Richard Cornford" <Rich...@litote s.demon.co.uk>
wrote:
<snip>
>Baring in mind that its
own authors don't fully understand what they have written.

What makes you think that? (I'm not disagreeing.)
Considering most of the flaws and problems with prototype.js doesn't
that question seem to answer itself? If the authors truly understood
what they had written - and the impacts of it - then it wouldn't suffer
most of the problems it suffers from.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 3 '07 #9
On Feb 3, 11:04 am, Randy Webb <HikksNotAtH... @aol.comwrote:
Peter Michaux said the following on 2/3/2007 12:23 PM:
On Feb 3, 5:43 am, "Richard Cornford" <Rich...@litote s.demon.co.uk>
wrote:

<snip>
Baring in mind that its
own authors don't fully understand what they have written.
What makes you think that? (I'm not disagreeing.)

Considering most of the flaws and problems with prototype.js doesn't
that question seem to answer itself? If the authors truly understood
what they had written - and the impacts of it - then it wouldn't suffer
most of the problems it suffers from.
I am guilty of this also but whenever Prototype is criticized would be
a good idea to have a concrete reason for the criticism for the given
context. This would mean knowing how the current Prototype code works.
It seems the Prototype group puts in a huge struggle to try to change
anything in that code. It could be too many cooks in the kitchen now
and they can't agree on anything. Moving mountains is tricky too. I
don't know what's going on in that group and why they can't get a few
thousand lines of code together. I was just curious which details
Richard thinks are particularly offensive. Maybe the faq should have
an up-to-date entry like Matt's page about why Prototype is a bad idea
to use. It comes up here so often and the faq is the official
response.

Peter

Feb 3 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
14562
by: Jean-Philippe Encausse | last post by:
Hi, I got 2 bugs using AJAX with ISO-8859-1: 1. While serializing form's value using prototype.js I lost accent éàè ... because it use encodeURIComponent() function. I saw on google, for ISO-8859-1 encoding I have to use escape(). It works fine ! 2. While receving content from AJAX Request with header <?xml
2
1545
by: phocis | last post by:
Hello, I'm writing a AJAX based content management system for kicks (not for money), and I want to create a seemless integration of AJAX and html forms. Inorder to do this, I need to rewrite alot of the basic javascript functionality of objects. What I need to do... Is prototype the Form object's submit() function. But I cannot figure out how.
5
2533
by: cmercier | last post by:
Hi everyone! I am using the Prototype library and ran into a serious limitation. I need to make many concurrent AJAX calls to the server, but Prototype is queueing them instead. Obviously, this is slowing my web application a lot. Is it a Javascript or Prototype limitation? If Prototype is in cause, is there a work around? I'd rather keep Prototype since I also use script.aculo.us.
17
3294
by: Chaprasi | last post by:
Hi I need help with prototype while doing ajax calls. So this is my JS which does a ajax calls var ajax1 = new Ajax.Request ( url, { method: 'get', parameters: params, onComplete: showResults, onFailure: showFailure
45
3016
by: bigdadro | last post by:
I've created a new class using prototype.js. After I make the ajax.request all references to this.myClassMethodorVariable are lost. Does the ajax method blow out the object persistance? I'm fairly new to OOP javascript so could be (and probably am) overlooking some detail. Below is the logic of what i'm trying to do. //Javascript code var myClass = Class.create(); myClass.prototype={ initialize: function(fm) {
5
20071
by: dougwig | last post by:
I'm trying to handle the scenario where a user's session times out and and their ajax request triggers a redirection by the webserver (302 error?). I'm using Prototype 1.4 and the my works great with Firefox,but with IE6 the onFailure never gets called and the request never completes. My code: var ajaxReq = new Ajax.Request( url, {method: 'post', parameters:
31
3136
by: Tony | last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET distribution - I'm pretty concerned about this. Does anyone know if this is the same "prototype.js" that is not well-liked around here? If so, do you know if Ajax.NET can be used without prototype.js? -- "The most convoluted explanation that fits all of the made-up facts is the most likely to be believed by conspiracy theorists. Fitting the
5
4185
by: Gerry Vandermaesen | last post by:
Hi, Does anyone have a freely available JavaScript JSON stringifier. So far my search has been in vain, the one offered on http://www.json.org/json.js does not seem to work for me.
3
3579
by: jacobstr | last post by:
I've noticed Object.extend used in a few different ways and I'm having trouble distinguishing why certain usages apply to a given situation. On line 804 Ajax.Base is defined as follows: Ajax.Base = function() {}; Ajax.Base.prototype = { setOptions: function(options) { <...>
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2328
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.