The open source escape route

T

The Magpie

As I am sure you've all noticed, the group seems to be spending more and
more time answering more and more questions from more and more people
about aspects of AJAX and XhtmlHTTPRequest. There is obviously a problem
out there in need of an answer and people seem to be coming here to get
that answer. So - is there a better way we can give it?

One obvious possibility is that we could provide an explicitly Open
Source and "black box" implementation of AJAX for simple and easy use.
It may not solve all the problems, but it would make life a lot easier
all round. It may be worth thinking about but it does raise a questions
that we would need to look at first - and being the mug who has been
first to mention it, I suppoe I should pose those questions and try to
answer them so that we can discuss it.

1. Could we do it?
==================
Well, this one is fairly simple - we almost certainly could. Many of us
have already used AJAX before, though like me they have all probably
done it as callable in-line code rather than as a "black box" service.
The real question is could we do it so that users can do things like add
a chunk of code like:-

ajax = new AJAXFactory();
ajax.source = "{path}";
ajax.get();

.... or something similar so that all the detail of AJAX is hidden from
the user. Obviously, we might not want to go for factory-method styles
as in Java, but I'm sure you follow what I mean.

I suspect many of us *could* do it, but what do you think?

2. Should we do it?
===================
Here we get to a problem: I don't think we should (although I do think
that someone should). Something like this is best done, in my opinion,
by a development group in the same way as for Linux, Firefox and so on.
Which, of course, we are not. Where I hit a problem is that although I
don't think we are the right people to do it, I am far from sure who
else might be the right people.

Over to the rest of you again. What do you think?

3. How should it be done?
=========================
Well, we wouldn't want to get into this too deeply since its pointless
if we don't go for building it and it gets taken up by someone else.
There are obvious points though:-

It should be a "black box" which probably means a class or prototype.
It should be under a GPL license of some sort.
It should be hosted somewhere to avoid having to paste it all in code.
It should be downloadable so it can be pasted in if need be.
It should include an on-line check to let it run on or off line.
It should include all the normal AJAX functions.
It should allow user-code listeners or functions to process results.
It should normally be free, and low-cost for commercial use.

That is as far as I think we need to take it at the moment. Before we
look at anything else (like where to host it, what licence to use, how
to write it and so on) we should think about it. I'm sure no-one wants
to do it alone, so do we want to do it together or not?

Over to you for your opinions.
 
J

Jim Ley

One obvious possibility is that we could provide an explicitly Open
Source and "black box" implementation of AJAX for simple and easy use.

no-one understands what AJAX is, the simple solution is just using the
object, any wrapper simply creates more confusion than just using the
object.
ajax = new AJAXFactory();
ajax.source = "{path}";
ajax.get();

... or something similar so that all the detail of AJAX is hidden from
the user.

obj= new Thingy()
obj.doWhenFinished=someFunction;
obj.open("url")
obj.send();

is just as complicated as

obj=new HTTPRequest();
obj.open("get","url",false);
obj.onreadystatechange=someFunction;
obj,send("");

There's simply nothing to be gained by the abstraction.

The problems people are having are not in the request, it's in related
things.

Jim.
 
M

Matt Kruse

The said:
One obvious possibility is that we could provide an explicitly Open
Source and "black box" implementation of AJAX for simple and easy use.

Why re-invent the wheel when others have already re-invented it? :)
For example, my library at http://www.AjaxToolbox.com is pretty black-box
with what I feel is a very logical and simple interface.

I wrote mine back when there weren't many libs out there. I didn't like any
of the interfaces available, so I wrote one that felt logical and easy to
me. You can take a look at it and all the other solutions, and if you don't
like _any_ of them, feel free to write one more ;)
 
T

The Magpie

Jim said:
no-one understands what AJAX is, the simple solution is just using the
object, any wrapper simply creates more confusion than just using the
object.

obj= new Thingy()
obj.doWhenFinished=someFunction;
obj.open("url")
obj.send();

is just as complicated as

obj=new HTTPRequest();
obj.open("get","url",false);
obj.onreadystatechange=someFunction;
obj,send("");

There's simply nothing to be gained by the abstraction.
Personally, I agree (which is why in the "should we" bit I said we
shouldn't do it). In an ideal world, the obvious answer is to simplify
the process through changes to the script language taken the normal
route through ECMA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top